aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/3D/view-utils.js
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-05-23 16:09:22 -0700
committerNivesh Rajbhandari2012-05-23 16:09:22 -0700
commitf97590388467b5a3316f6f155162fc293915fddc (patch)
treea2888e65b53704caeb9f4f84d5a85dbdb19e4ff6 /js/helper-classes/3D/view-utils.js
parentf1dbf7c58e91a27c80f3a607e87ad122d803c500 (diff)
downloadninja-f97590388467b5a3316f6f155162fc293915fddc.tar.gz
Fixed scrolling and centering stage code. Also, moved liveNodeList into the design view and added an option to exclude styles and text nodes when retrieving the live nodes.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/helper-classes/3D/view-utils.js')
-rwxr-xr-xjs/helper-classes/3D/view-utils.js13
1 files changed, 3 insertions, 10 deletions
diff --git a/js/helper-classes/3D/view-utils.js b/js/helper-classes/3D/view-utils.js
index 0080bf90..24b30298 100755
--- a/js/helper-classes/3D/view-utils.js
+++ b/js/helper-classes/3D/view-utils.js
@@ -24,9 +24,6 @@ exports.ViewUtils = Montage.create(Component, {
24 // keep a stack of viewport objects 24 // keep a stack of viewport objects
25 _viewportObjStack: { value: []}, 25 _viewportObjStack: { value: []},
26 26
27 _userContentLeft: { value: null},
28 _userContentTop: { value: null},
29
30 /////////////////////////////////////////////////////////////////////// 27 ///////////////////////////////////////////////////////////////////////
31 // Property accessors 28 // Property accessors
32 /////////////////////////////////////////////////////////////////////// 29 ///////////////////////////////////////////////////////////////////////
@@ -39,9 +36,6 @@ exports.ViewUtils = Montage.create(Component, {
39 }, 36 },
40 getViewportObj: { value: function() { return this.m_viewportObj; } }, 37 getViewportObj: { value: function() { return this.m_viewportObj; } },
41 38
42 setUserContentLeft: { value: function(value) { this._userContentLeft = value; }},
43 setUserContentTop: { value: function(value) { this._userContentTop = value; }},
44
45 getPerspectiveDistance: { value: function () { return this._perspectiveDist; } }, 39 getPerspectiveDistance: { value: function () { return this._perspectiveDist; } },
46 40
47 /////////////////////////////////////////////////////////////////////// 41 ///////////////////////////////////////////////////////////////////////
@@ -385,7 +379,7 @@ exports.ViewUtils = Montage.create(Component, {
385 // transform the bounds up the tree 379 // transform the bounds up the tree
386 var parent = child.offsetParent; 380 var parent = child.offsetParent;
387 // TODO - Should have a different way to check for new template mode 381 // TODO - Should have a different way to check for new template mode
388 if ( parent || ((child === this.application.ninja.currentDocument.documentRoot) && (child.id !== "UserContent")) ) 382 if ( parent || (child === this.application.ninja.currentDocument.documentRoot) )
389 { 383 {
390 this.setViewportObj( child ); 384 this.setViewportObj( child );
391 385
@@ -703,8 +697,8 @@ exports.ViewUtils = Montage.create(Component, {
703 { 697 {
704 // TODO - Call a routine from the user document controller to get the offsets/margins 698 // TODO - Call a routine from the user document controller to get the offsets/margins
705 // Once we expose the document controller to ViewUtils 699 // Once we expose the document controller to ViewUtils
706 offset[0] += this._userContentLeft; 700 offset[0] += this.application.ninja.stage._userContentLeft;
707 offset[1] += this._userContentTop; 701 offset[1] += this.application.ninja.stage._userContentTop;
708 } 702 }
709 703
710 return offset; 704 return offset;
@@ -1282,7 +1276,6 @@ exports.ViewUtils = Montage.create(Component, {
1282// stageManager._canvas: this.application.ninja.stage.canvas 1276// stageManager._canvas: this.application.ninja.stage.canvas
1283// stageManager.layoutCanvas: this.application.ninja.stage.layoutCanvas 1277// stageManager.layoutCanvas: this.application.ninja.stage.layoutCanvas
1284// stageManager.drawingCanvas: this.application.ninja.stage.drawingCanvas 1278// stageManager.drawingCanvas: this.application.ninja.stage.drawingCanvas
1285// stageManager.userContentLeft this.application.ninja.stage.userContentLeft
1286// viewUtils: stage.viewUtils; 1279// viewUtils: stage.viewUtils;
1287// snapManager stage.snapManager; 1280// snapManager stage.snapManager;
1288// 1281//