From f11ed767396996c236bb8ef0e5f89fedddcaa0d7 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Tue, 17 Apr 2012 13:27:40 -0700 Subject: Grid should redraw on elementChanging as well as elementChange. Signed-off-by: Nivesh Rajbhandari --- js/helper-classes/3D/draw-utils.js | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'js') diff --git a/js/helper-classes/3D/draw-utils.js b/js/helper-classes/3D/draw-utils.js index a5428ea3..ec8eea0f 100755 --- a/js/helper-classes/3D/draw-utils.js +++ b/js/helper-classes/3D/draw-utils.js @@ -111,6 +111,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { this.eventManager.addEventListener("elementAdded", this, false); this.eventManager.addEventListener("elementsRemoved", this, false); this.eventManager.addEventListener("elementChange", this, false); + this.eventManager.addEventListener("elementChanging", this, false); this.eventManager.addEventListener("closeDocument", this, false); this.eventManager.addEventListener("elementReplaced", this, false); } @@ -227,20 +228,26 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { // TODO - Check why handleElementChange is being fired before handleAddElement handleElementChange: { value: function(event) { - if(!event.detail || !event.detail.data) - { + this._elementChangeHelper(event); + } + }, + + handleElementChanging: { + value: function(event) { + this._elementChangeHelper(event); + } + }, + + _elementChangeHelper: { + value: function(event) { + if(!event.detail || !event.detail.data) { return; } var els = event.detail.data.els; - if(els && this._shouldUpdatePlanes(event.detail.data.prop)) - { - var len = els.length, - i = 0, - item; - - for(i=0; i < len; i++) { - if(els[i].elementModel.props3D.elementPlane) - { + if(els && this._shouldUpdatePlanes(event.detail.data.prop)) { + var len = els.length; + for(var i=0; i < len; i++) { + if(els[i].elementModel.props3D.elementPlane) { els[i].elementModel.props3D.elementPlane.init(); } } -- cgit v1.2.3 From 2e04af953463643791f6362bd8ef4c6ba190abfa Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 18 Apr 2012 13:48:51 -0700 Subject: Squashed commit of the following: commit 2054551bfb01a0f4ca2e138b9d724835462d45cd Merge: 765c2da 616a853 Author: Valerio Virgillito Date: Wed Apr 18 13:48:21 2012 -0700 Merge branch 'refs/heads/master' into integration commit 765c2da8e1aa03550caf42b2bd5f367555ad2843 Author: Valerio Virgillito Date: Tue Apr 17 15:29:41 2012 -0700 updating the picasa carousel Signed-off-by: Valerio Virgillito commit 9484f1c82b81e27edf2dc0a1bcc1fa3b12077406 Merge: d27f2df cacb4a2 Author: Valerio Virgillito Date: Tue Apr 17 15:03:50 2012 -0700 Merge branch 'refs/heads/master' into integration commit d27f2df4d846064444263d7832d213535962abe7 Author: Valerio Virgillito Date: Wed Apr 11 10:39:36 2012 -0700 integrating new picasa carousel component Signed-off-by: Valerio Virgillito commit 6f98384c9ecbc8abe55ccfe1fc25a0c7ce22c493 Author: Valerio Virgillito Date: Tue Apr 10 14:33:00 2012 -0700 fixed the text area case issue Text area was renamed from TextArea to Textarea Signed-off-by: Valerio Virgillito commit 1e83e26652266136802bc7af930379c1ecd631a6 Author: Valerio Virgillito Date: Mon Apr 9 22:10:45 2012 -0700 integrating montage v0.8 into ninja. Signed-off-by: Valerio Virgillito Signed-off-by: Valerio Virgillito --- js/panels/components-panel.reel/components-panel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/panels/components-panel.reel/components-panel.js b/js/panels/components-panel.reel/components-panel.js index cfacd461..5d3c0a73 100755 --- a/js/panels/components-panel.reel/components-panel.js +++ b/js/panels/components-panel.reel/components-panel.js @@ -367,7 +367,7 @@ exports.ComponentsPanel = Montage.create(Component, { break; case "textarea": el = NJUtils.makeNJElement("textarea", "TextArea", "component"); - el.elementModel.pi = "TextAreaPi"; + el.elementModel.pi = "TextareaPi"; break; case "toggleButton": el = NJUtils.makeNJElement("button", "Toggle Button", "component"); -- cgit v1.2.3