From 7283884c39df537694b21419a3ea9e3ca7793b4b Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Thu, 23 Feb 2012 13:43:35 -0800 Subject: switch html document - re-initialize draw-utils and snap-manager on opening a document and while switching documents Signed-off-by: Ananya Sen --- js/controllers/elements/element-controller.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'js/controllers/elements/element-controller.js') diff --git a/js/controllers/elements/element-controller.js b/js/controllers/elements/element-controller.js index ac14def4..d6f2bc56 100755 --- a/js/controllers/elements/element-controller.js +++ b/js/controllers/elements/element-controller.js @@ -27,7 +27,11 @@ var ElementController = exports.ElementController = Montage.create(NJComponent, getProperty: { value: function(el, prop, fallbackOnComputed, isStageElement) { - return this.application.ninja.stylesController.getElementStyle(el, prop, fallbackOnComputed, isStageElement); + if(el.nodeType !== 3){ + return this.application.ninja.stylesController.getElementStyle(el, prop, fallbackOnComputed, isStageElement); + }else{ + return null; + } } }, -- cgit v1.2.3