diff options
author | Eric Guzman | 2012-06-19 01:20:36 -0700 |
---|---|---|
committer | Eric Guzman | 2012-06-19 01:20:36 -0700 |
commit | 2ef72cdf0e59fb3623a2c13251ac707522f3dc5a (patch) | |
tree | f69f4e3de7e4441311ef2b38770e0ce26067aac4 /js/helper-classes/3D/snap-manager.js | |
parent | 5260d3dfd99d79924c4aaa3ab798e90c7d328d7d (diff) | |
parent | 1007cbf983ad0f2460a4122a492a96023fdb4439 (diff) | |
download | ninja-2ef72cdf0e59fb3623a2c13251ac707522f3dc5a.tar.gz |
Merge branch 'binding' of github.com:dhg637/ninja-internal into binding
Conflicts:
js/stage/binding-view.reel/binding-view.js
Diffstat (limited to 'js/helper-classes/3D/snap-manager.js')
-rwxr-xr-x | js/helper-classes/3D/snap-manager.js | 6 |
1 files changed, 3 insertions, 3 deletions
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 |