diff options
author | Jon Reid | 2012-06-15 10:10:41 -0700 |
---|---|---|
committer | Jon Reid | 2012-06-15 10:10:41 -0700 |
commit | 526ac54f73d53e1e2a3d6a4dbf4f9992c143baf7 (patch) | |
tree | 65939e59615aaa10a7db77211e71616ad531bd0e /js/helper-classes | |
parent | b5b760ee82e5cc4da176914983a6002cbf86c11a (diff) | |
parent | 5ee0c89fa0c7acc280ff3b884767e8513fd0b315 (diff) | |
download | ninja-526ac54f73d53e1e2a3d6a4dbf4f9992c143baf7.tar.gz |
Merge remote-tracking branch 'ninja-internal/master' into test-merge
Conflicts:
js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html
js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
Diffstat (limited to 'js/helper-classes')
-rwxr-xr-x | js/helper-classes/3D/draw-utils.js | 18 | ||||
-rwxr-xr-x | js/helper-classes/3D/snap-manager.js | 6 |
2 files changed, 13 insertions, 11 deletions
diff --git a/js/helper-classes/3D/draw-utils.js b/js/helper-classes/3D/draw-utils.js index bef1e435..6a84c86b 100755 --- a/js/helper-classes/3D/draw-utils.js +++ b/js/helper-classes/3D/draw-utils.js | |||
@@ -117,7 +117,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { | |||
117 | }, | 117 | }, |
118 | 118 | ||
119 | initializeFromDocument:{ | 119 | initializeFromDocument:{ |
120 | value:function(){ | 120 | value:function(adjustScrollOffsets){ |
121 | var i, | 121 | var i, |
122 | documentRootChildren = this.application.ninja.currentDocument.model.views.design.getLiveNodeList(true), | 122 | documentRootChildren = this.application.ninja.currentDocument.model.views.design.getLiveNodeList(true), |
123 | stage = this.application.ninja.stage, | 123 | stage = this.application.ninja.stage, |
@@ -144,13 +144,15 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { | |||
144 | for(i=0; i<len; i++) { | 144 | for(i=0; i<len; i++) { |
145 | elt = documentRootChildren[i]; | 145 | elt = documentRootChildren[i]; |
146 | plane = this.addElement(elt); | 146 | plane = this.addElement(elt); |
147 | l = plane._rect.m_left - docLeft; | 147 | if(adjustScrollOffsets) { |
148 | t = plane._rect.m_top - docTop; | 148 | l = plane._rect.m_left - docLeft; |
149 | if(l < minLeft) { | 149 | t = plane._rect.m_top - docTop; |
150 | minLeft = l; | 150 | if(l < minLeft) { |
151 | } | 151 | minLeft = l; |
152 | if(t < minTop) { | 152 | } |
153 | minTop = t; | 153 | if(t < minTop) { |
154 | minTop = t; | ||
155 | } | ||
154 | } | 156 | } |
155 | } | 157 | } |
156 | if(minLeft !== initL) { | 158 | if(minLeft !== initL) { |
diff --git a/js/helper-classes/3D/snap-manager.js b/js/helper-classes/3D/snap-manager.js index a8b6e739..0157140f 100755 --- a/js/helper-classes/3D/snap-manager.js +++ b/js/helper-classes/3D/snap-manager.js | |||
@@ -496,7 +496,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { | |||
496 | this._elementCache = new Array; | 496 | this._elementCache = new Array; |
497 | 497 | ||
498 | // var stage = this.getStage(); | 498 | // var stage = this.getStage(); |
499 | var stage = this.application.ninja.currentSelectedContainer || this.getStage(); | 499 | var stage = this.application.ninja.currentDocument.model.domContainer || this.getStage(); |
500 | this.hLoadElementCache( stage, plane, 0 ); | 500 | this.hLoadElementCache( stage, plane, 0 ); |
501 | this._isCacheInvalid = false; | 501 | this._isCacheInvalid = false; |
502 | 502 | ||
@@ -987,7 +987,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { | |||
987 | value: function( screenPt, hitRecs ) { | 987 | value: function( screenPt, hitRecs ) { |
988 | // start at the stage. | 988 | // start at the stage. |
989 | // var stage = this.getStage(); | 989 | // var stage = this.getStage(); |
990 | var stage = this.application.ninja.currentSelectedContainer || this.getStage(); | 990 | var stage = this.application.ninja.currentDocument.model.domContainer || this.getStage(); |
991 | 991 | ||
992 | // the root should be the 'view' canvas, so the first matrix is the camera | 992 | // the root should be the 'view' canvas, so the first matrix is the camera |
993 | viewUtils.setViewportObj( stage ); | 993 | viewUtils.setViewportObj( stage ); |
@@ -1009,7 +1009,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { | |||
1009 | } | 1009 | } |
1010 | // hit test the current object | 1010 | // hit test the current object |
1011 | var hit; | 1011 | var hit; |
1012 | var snapToStage = ((depth === 0) && (elt === this.application.ninja.currentSelectedContainer) && (elt.nodeName === 'CANVAS')); | 1012 | var snapToStage = ((depth === 0) && (elt === this.application.ninja.currentDocument.model.domContainer) && (elt.nodeName === 'CANVAS')); |
1013 | if ((depth > 0) || snapToStage) // don't snap to the root unles we are working inside a canvas | 1013 | if ((depth > 0) || snapToStage) // don't snap to the root unles we are working inside a canvas |
1014 | { | 1014 | { |
1015 | // if the element is in the 2D cache snapping is done there | 1015 | // if the element is in the 2D cache snapping is done there |