aboutsummaryrefslogtreecommitdiff
path: root/js/stage/stage.reel/stage.js
diff options
context:
space:
mode:
authorPushkar Joshi2012-02-28 14:01:05 -0800
committerPushkar Joshi2012-02-28 14:01:05 -0800
commit63307c9abf120985d979a40a53a0598d3f0d5c5a (patch)
tree57d9cffd7aa0959ea31fe0fa2d89a9080198bcb3 /js/stage/stage.reel/stage.js
parente1a65d0c2a13e12ee53be98c731616e35aa07a41 (diff)
parent7c9291a5bab4abd849547f8878f6fb962fc88250 (diff)
downloadninja-63307c9abf120985d979a40a53a0598d3f0d5c5a.tar.gz
Merge branch 'master' into pentool
Conflicts: manifest.json
Diffstat (limited to 'js/stage/stage.reel/stage.js')
-rwxr-xr-xjs/stage/stage.reel/stage.js18
1 files changed, 11 insertions, 7 deletions
diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js
index 641ac247..4c1d046b 100755
--- a/js/stage/stage.reel/stage.js
+++ b/js/stage/stage.reel/stage.js
@@ -37,6 +37,10 @@ exports.Stage = Montage.create(Component, {
37 get: function() { return this.stageDeps.snapManager; } 37 get: function() { return this.stageDeps.snapManager; }
38 }, 38 },
39 39
40 drawUtils: {
41 get: function() { return this.stageDeps.drawUtils; }
42 },
43
40 resizeCanvases: { 44 resizeCanvases: {
41 get: function() { 45 get: function() {
42 return this._resizeCanvases; 46 return this._resizeCanvases;
@@ -144,12 +148,12 @@ exports.Stage = Montage.create(Component, {
144 148
145 userContentLeft: { 149 userContentLeft: {
146 get: function() { return this._userContentLeft; }, 150 get: function() { return this._userContentLeft; },
147 set: function(value) { this._userContentLeft = value; } 151 set: function(value) { this._userContentLeft = value;}
148 }, 152 },
149 153
150 userContentTop: { 154 userContentTop: {
151 get: function() { return this._userContentTop; }, 155 get: function() { return this._userContentTop; },
152 set: function(value) { this._userContentTop = value; } 156 set: function(value) { this._userContentTop = value;}
153 }, 157 },
154 158
155 userContentBorder: { 159 userContentBorder: {
@@ -258,6 +262,8 @@ exports.Stage = Montage.create(Component, {
258 this.application.ninja.toolsData.selectedToolInstance._configure(true); 262 this.application.ninja.toolsData.selectedToolInstance._configure(true);
259 263
260 this.addEventListener("change@appModel.show3dGrid", this, false); 264 this.addEventListener("change@appModel.show3dGrid", this, false);
265
266 this.layout.handleOpenDocument();
261 } 267 }
262 }, 268 },
263 269
@@ -433,12 +439,11 @@ exports.Stage = Montage.create(Component, {
433 */ 439 */
434 handleScroll: { 440 handleScroll: {
435 value: function() { 441 value: function() {
436
437 this._scrollLeft = this._iframeContainer.scrollLeft; 442 this._scrollLeft = this._iframeContainer.scrollLeft;
438 this._scrollTop = this._iframeContainer.scrollTop; 443 this._scrollTop = this._iframeContainer.scrollTop;
439 444
440 this._userContentLeft = this._documentOffsetLeft - this._scrollLeft + this._userContentBorder; 445 this.userContentLeft = this._documentOffsetLeft - this._scrollLeft + this._userContentBorder;
441 this._userContentTop = this._documentOffsetTop - this._scrollTop + this._userContentBorder; 446 this.userContentTop = this._documentOffsetTop - this._scrollTop + this._userContentBorder;
442 447
443 // Need to clear the snap cache and set up the drag plane 448 // Need to clear the snap cache and set up the drag plane
444 //snapManager.setupDragPlaneFromPlane( workingPlane ); 449 //snapManager.setupDragPlaneFromPlane( workingPlane );
@@ -446,7 +451,6 @@ exports.Stage = Montage.create(Component, {
446 451
447 this.needsDraw = true; 452 this.needsDraw = true;
448 this.layout.draw(); 453 this.layout.draw();
449
450 //this._toolsList.action("DrawHandles"); 454 //this._toolsList.action("DrawHandles");
451 455
452 } 456 }
@@ -519,7 +523,7 @@ exports.Stage = Montage.create(Component, {
519 elt = this.application.ninja.currentDocument.GetElementFromPoint(point.x + this.scrollLeft,point.y + this.scrollTop); 523 elt = this.application.ninja.currentDocument.GetElementFromPoint(point.x + this.scrollLeft,point.y + this.scrollTop);
520 524
521 // workaround Chrome 3d bug 525 // workaround Chrome 3d bug
522 if(this.application.ninja.currentDocument.inExclusion(elt) !== -1) 526 if(this.application.ninja.toolsData.selectedToolInstance._canSnap && this.application.ninja.currentDocument.inExclusion(elt) !== -1)
523 { 527 {
524 return this._getElementUsingSnapping(point); 528 return this._getElementUsingSnapping(point);
525 } else { 529 } else {