Famous / famous-angular

Bring structure to your Famo.us apps with the power of AngularJS. Famo.us/Angular integrates seamlessly with existing Angular and Famo.us apps.
https://famo.us/angular
Mozilla Public License 2.0
1.92k stars 275 forks source link

Fix: BulkUpdate when removing a Draggable Object #279

Closed SuPenguin closed 9 years ago

SuPenguin commented 9 years ago

https://github.com/Famous/famous-angular/issues/185

When $destroy is called on a Draggable, from deleting an item in a ng-repeat or from ui-router. It appears that it goes through $destroy without testing if it's a modifier so it tries to renderNode.unpipe(EventHandler). I've corrected this by testing it again before updating the pipes.

pencilcheck commented 9 years ago

+1 This is necessary to integrate with other UI framework such as ionic.

pencilcheck commented 9 years ago

Please someone review this PR. This is a severe bug, there is no workaround for this bug yet.

zackbrown commented 9 years ago

Thank you for contributing this, @SuPenguin, as well as for signing the CLA and for your patience. I expanded the ternary expression into a full if/else expression to make the linter and Travis CI happy, but otherwise this looks great.

SuPenguin commented 9 years ago

You're welcome @zackbrown. I just remembered about this other issue with the same kind of problem using fa-options https://github.com/Famous/famous-angular/issues/298, should i do another pull request with this workaround ?