From e28eb9158a50d7e6d97dbc68066e591ac600c241 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 5 Jun 2012 21:40:44 -0700 Subject: removing all model creators. The elementModel is now a getter that will create a new model when needed. Signed-off-by: Valerio Virgillito --- js/helper-classes/3D/snap-manager.js | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'js/helper-classes/3D') 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, { { var snapRec = this._elementCache[i]; var elt = snapRec.getElement(); - if (elt.elementModel) - elt.elementModel.isIn2DSnapCache = false; - else - console.log( "element in the 2D cache does not have an elementModel" ); + elt.elementModel.isIn2DSnapCache = false; + } this._elementCache = null; @@ -541,10 +539,6 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { snapRec.init( elt ); this._elementCache.push( snapRec ); - if (!elt.elementModel) - { - NJUtils.makeModelFromElement(elt); - } elt.elementModel.isIn2DSnapCache = true; } else if (elt.elementModel) @@ -613,10 +607,6 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { snapRec.init( elt ); this._elementCache.push( snapRec ); - if (!elt.elementModel) - { - NJUtils.makeModelFromElement(elt); - } elt.elementModel.isIn2DSnapCache = true; } else if (elt.elementModel) -- cgit v1.2.3