Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

$animate#enter logic does not totally make sense #6276

Closed
caitp opened this issue Feb 15, 2014 · 2 comments
Closed

$animate#enter logic does not totally make sense #6276

caitp opened this issue Feb 15, 2014 · 2 comments

Comments

@caitp
Copy link
Contributor

caitp commented Feb 15, 2014

      enter: function(element, parent, after, done) {
        if (after) {
          after.after(element);
        } else {
          if (!parent || !parent[0]) {
            /* caitp note: `after` is falsy here, what are we doing? */
            parent = after.parent();
          }
          /* caitp note: I feel like if `after` is null, the expected behaviour would be
             to prepend. I'm sure there's a precedent for this somewhere, but I
             can't seem to find it on MDN. But someone on IRC was asking about
             how to make $animate#enter() prepend rather than append. */
          parent.append(element);
        }
        done && $timeout(done, 0, false);
      },

note I did sort of post this before doing a proper investigation to see how broken this is, but I'll do a quick test and close this if I think the behaviour is acceptable.

Oh, the IRC user posted an issue re: this too, #6274. Anyways, taking a quick look

@matsko
Copy link
Contributor

matsko commented Feb 15, 2014

You created this issue twice. Closing this in favour of: #6275

@matsko matsko closed this as completed Feb 15, 2014
@caitp
Copy link
Contributor Author

caitp commented Feb 15, 2014

I have no idea why my browser did that, but I guess I'll copy my comments into that one then

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants