From 11ae8b91c30322074adb3cae753193d0bae3c995 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Fri, 22 Jun 2012 17:02:55 -0700 Subject: Make stage transparent when rotating/zooming templates and draw an outline around the user's root instead. Also, fixed the background color setting on banner and animation templates' "body." Stage outline draws using drawGridLines code so it can show intersection with element planes. Signed-off-by: Nivesh Rajbhandari --- js/document/views/design.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'js/document/views/design.js') diff --git a/js/document/views/design.js b/js/document/views/design.js index 44c61617..d5c5c6c4 100755 --- a/js/document/views/design.js +++ b/js/document/views/design.js @@ -281,6 +281,7 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, { this.document.body.removeChild(this.document.getElementsByTagName('ninjaloadinghack')[0]); //Getting style and link tags in document var htags = this.document.getElementsByTagName('html'), + bannerWrapper, userStyles, stags = this.document.getElementsByTagName('style'), ltags = this.document.getElementsByTagName('link'), i, orgNodes, @@ -326,6 +327,7 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, { //TODO: Verify appropiate location for this operation if (this._template && this._template.type === 'banner') { this.documentRoot = this.document.body.getElementsByTagName('ninja-content')[0]; + bannerWrapper = this.documentRoot.parentNode; } else { this.documentRoot = this.document.body; } @@ -348,6 +350,11 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, { if(userStyles = this.documentRoot.getAttribute('style')) { this.documentRoot.setAttribute('data-ninja-style', userStyles); } + } + if(bannerWrapper) { + if(userStyles = bannerWrapper.getAttribute('style')) { + bannerWrapper.setAttribute('data-ninja-style', userStyles); + } } //Making callback if specified if (this._callback) this._callback(); -- cgit v1.2.3