Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deferred destroy not removing views from sequence #153

Closed
mcbain opened this issue Nov 22, 2014 · 2 comments
Closed

deferred destroy not removing views from sequence #153

mcbain opened this issue Nov 22, 2014 · 2 comments
Labels

Comments

@mcbain
Copy link
Collaborator

mcbain commented Nov 22, 2014

When removing one middle column [-] in the #Animate example there is always a small white gap between the remaining columns.

http://meteorpad.com/pad/rXrmAYnMtuP7rnFeD/#Animate

Debugging into the used SequentialLayout shows that there are still three views in the ViewSequence, after invoking View.destroy() after transition end.

destroybug

The code path from meteorFamousView.js with all the TODO is taken in my example.

 // If we're part of a sequence, now is the time to remove ourselves
  if (fview.parent.sequence) {
    if (fview.sequence) {
       // TODO, we're a child sequence, remove the child (TODO in sequencer.js)
      // log.debug("child sequence");
    } else {
      famous.core.Engine.defer(function() {
        fview.parent.sequence.remove(fview);  // less flicker in a defer
      });
    }
  }
@gadicc
Copy link
Owner

gadicc commented Nov 22, 2014

Copy that, will check it out. Good opportunity to add more tests :)

@gadicc
Copy link
Owner

gadicc commented Jan 27, 2015

Flawed logic on my part :( Removing child sequences isn't so urgent/important, but the if condition should have always removed the child until the other code is written. Fixed, made that clearer, and will be in 0.1.31.

gadicc added a commit that referenced this issue Jan 29, 2015
* Bugfix (#famous regression): Revert back to Blaze.render (for non-Surfaces)
  to ensure rendered callbacks of nested templates are correctly run (#199)

* Bugfix (#famous regression): direction="1" now works again (#207)

* Bugfix (#RenderController): fview._transition is now properly honoured (#193)

* Bugfix: `fview.destroy()` now correctly removes children from
  child sequences (#153)

* Enhancement (#famousEach): Allow overrides on all famousEach observe within
  the containing fview.  See Views README for details. (#201)

* Enhancement (#Surface): watchSize now uses javascript-detect-element-resize
  lib to detect size changes on

* Enhancement (#Surface): Defer running of Surface rendered callbacks for
  smoother performance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants