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

fixed callbacks types #1096

Merged
merged 2 commits into from Dec 17, 2019
Merged

fixed callbacks types #1096

merged 2 commits into from Dec 17, 2019

Commits on Dec 17, 2019

  1. fixed callbacks types

    * fixed callbacks to get either `added, removed, change` or combination if adding a node require also to change its (x,y) for example
    (we use to always get 'change' duplicated callback)
    * you can now call `batchUpdate()` before calling a bunch of `addWidget()` and get a single event callback (more efficient).
    * update two.hml to show callbacks (good debuging setup)
    Note: moving items in float=false will still sometimes have change CB with all items, not just those that moved. this is due to how _fixCollisions() does this
    if (!this.float && !hasLocked) {
      nn = {x: 0, y: node.y, width: this.column, height: node.height};
    }
    causing all items to temporarly move. I don't claim to understand that code yet...
    * added a comment for #789 as to why _packNodes() can't check for
    n._dirty = n._origY != newY;
    adumesny committed Dec 17, 2019
    Configuration menu
    Copy the full SHA
    463193f View commit details
    Browse the repository at this point in the history
  2. more change event fixes

    * pass the original nodes for addEvent/removeEvent instead of clones
    * _triggerChangeEvent() no longer forced called (with no data, what's the point ?)
    * commit() calls remove, added, change in that order
    * updated more samples - use batch calls
    (the difference in callbacks noise of 0.5.5 vs this code is UDGE for serialize.html as an example)
    * fixed error when dragging add item over the trash, and then over second grid
    adumesny committed Dec 17, 2019
    Configuration menu
    Copy the full SHA
    4f6ae38 View commit details
    Browse the repository at this point in the history