diff options
author | Jose Antonio Marquez | 2012-03-15 20:16:25 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-03-15 20:16:25 -0700 |
commit | eda07f5122cc552737fa6f647ef7f6721c4001b8 (patch) | |
tree | 419d14435dd8f4b7568f6e9e68afff6ad30d7bf0 /js/mediators | |
parent | 88796fb80e042aa0d2d4d22b5c15bceda592e949 (diff) | |
download | ninja-eda07f5122cc552737fa6f647ef7f6721c4001b8.tar.gz |
Fixing offset bug for drag-and-drop
Diffstat (limited to 'js/mediators')
-rwxr-xr-x | js/mediators/drag-drop-mediator.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/mediators/drag-drop-mediator.js b/js/mediators/drag-drop-mediator.js index cc384704..c8e781a6 100755 --- a/js/mediators/drag-drop-mediator.js +++ b/js/mediators/drag-drop-mediator.js | |||
@@ -112,8 +112,8 @@ exports.DragDropMediator = Montage.create(Component, { | |||
112 | // | 112 | // |
113 | rules = { | 113 | rules = { |
114 | 'position': 'absolute', | 114 | 'position': 'absolute', |
115 | 'top' : e.currentTarget.filePosition.y + 'px', | 115 | 'top' : (parseInt(e.currentTarget.filePosition.y) - parseInt(this.application.ninja.stage.userContentTop)) + 'px', |
116 | 'left' : e.currentTarget.filePosition.x + 'px' | 116 | 'left' : (parseInt(e.currentTarget.filePosition.x) - parseInt(this.application.ninja.stage.userContentLeft)) + 'px' |
117 | }; | 117 | }; |
118 | // | 118 | // |
119 | NJevent("elementAdding", {el: element, data: rules}); | 119 | NJevent("elementAdding", {el: element, data: rules}); |