diff --git a/TODO.md b/TODO.md index 1936e76..bc90690 100644 --- a/TODO.md +++ b/TODO.md @@ -75,5 +75,5 @@ * For map objects, group the $elem and the object together, everywhere, as one MapObject -* BUG: When moving an object on the map, an additional mouseup event is added - and never removed. +* BUG: Switch from fill to tiles and then back, some of the map objects in the + tiles layer are still moveable. diff --git a/app/javascripts/editor/drag_object.coffee b/app/javascripts/editor/drag_object.coffee index c93065a..697965d 100644 --- a/app/javascripts/editor/drag_object.coffee +++ b/app/javascripts/editor/drag_object.coffee @@ -218,9 +218,10 @@ define 'editor.DragObject', -> dragObject = DragObject.create(this, options) $this.data('dragObject', dragObject) if typeof args[0] is 'string' - method = args.shift() + method = args[0] if typeof dragObject[method] is 'function' - dragObject[method](args...) + console.log "calling #{method} on ##{$this.data('node-uid')}" + dragObject[method](args[1..-1]) if method is 'destroy' $this.data('dragObject', null) $.ender(enderMethods, true)