aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes
diff options
context:
space:
mode:
Diffstat (limited to 'js/helper-classes')
-rwxr-xr-xjs/helper-classes/3D/draw-utils.js4
-rwxr-xr-xjs/helper-classes/3D/snap-manager.js14
2 files changed, 4 insertions, 14 deletions
diff --git a/js/helper-classes/3D/draw-utils.js b/js/helper-classes/3D/draw-utils.js
index eef28dce..bef1e435 100755
--- a/js/helper-classes/3D/draw-utils.js
+++ b/js/helper-classes/3D/draw-utils.js
@@ -1206,7 +1206,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, {
1206 // set the element to be the viewport object - temporarily 1206 // set the element to be the viewport object - temporarily
1207 var tmpCanvas = this.application.ninja.stage.canvas; 1207 var tmpCanvas = this.application.ninja.stage.canvas;
1208 var tmpStage = this.application.ninja.currentDocument.model.documentRoot; 1208 var tmpStage = this.application.ninja.currentDocument.model.documentRoot;
1209 this.viewUtils.pushViewportObj( tmpCanvas ); 1209// this.viewUtils.pushViewportObj( tmpCanvas );
1210 1210
1211 // save the source space object and set to the target object 1211 // save the source space object and set to the target object
1212 var saveSource = this._sourceSpaceElt; 1212 var saveSource = this._sourceSpaceElt;
@@ -1279,7 +1279,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, {
1279 this.drawArrowHead(rO, zO); 1279 this.drawArrowHead(rO, zO);
1280 1280
1281 // restore the state 1281 // restore the state
1282 this.viewUtils.popViewportObj(); 1282// this.viewUtils.popViewportObj();
1283 this._drawingContext.restore(); 1283 this._drawingContext.restore();
1284 this.setDrawingSurfaceElement(saveContext); 1284 this.setDrawingSurfaceElement(saveContext);
1285 this._lineColor = saveColor; 1285 this._lineColor = saveColor;
diff --git a/js/helper-classes/3D/snap-manager.js b/js/helper-classes/3D/snap-manager.js
index e3756f32..a8b6e739 100755
--- a/js/helper-classes/3D/snap-manager.js
+++ b/js/helper-classes/3D/snap-manager.js
@@ -481,10 +481,8 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
481 { 481 {
482 var snapRec = this._elementCache[i]; 482 var snapRec = this._elementCache[i];
483 var elt = snapRec.getElement(); 483 var elt = snapRec.getElement();
484 if (elt.elementModel) 484 elt.elementModel.isIn2DSnapCache = false;
485 elt.elementModel.isIn2DSnapCache = false; 485
486 else
487 console.log( "element in the 2D cache does not have an elementModel" );
488 } 486 }
489 487
490 this._elementCache = null; 488 this._elementCache = null;
@@ -541,10 +539,6 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
541 snapRec.init( elt ); 539 snapRec.init( elt );
542 this._elementCache.push( snapRec ); 540 this._elementCache.push( snapRec );
543 541
544 if (!elt.elementModel)
545 {
546 NJUtils.makeModelFromElement(elt);
547 }
548 elt.elementModel.isIn2DSnapCache = true; 542 elt.elementModel.isIn2DSnapCache = true;
549 } 543 }
550 else if (elt.elementModel) 544 else if (elt.elementModel)
@@ -613,10 +607,6 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
613 snapRec.init( elt ); 607 snapRec.init( elt );
614 this._elementCache.push( snapRec ); 608 this._elementCache.push( snapRec );
615 609
616 if (!elt.elementModel)
617 {
618 NJUtils.makeModelFromElement(elt);
619 }
620 elt.elementModel.isIn2DSnapCache = true; 610 elt.elementModel.isIn2DSnapCache = true;
621 } 611 }
622 else if (elt.elementModel) 612 else if (elt.elementModel)