aboutsummaryrefslogtreecommitdiff
path: root/js/document/mediators
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-06-22 17:02:55 -0700
committerNivesh Rajbhandari2012-06-22 17:02:55 -0700
commit11ae8b91c30322074adb3cae753193d0bae3c995 (patch)
tree0915f8ff9e39f460136fb37f2a553f9b6b4b139d /js/document/mediators
parent0f62fd5d06af6933530a151126fe054bf1b68419 (diff)
downloadninja-11ae8b91c30322074adb3cae753193d0bae3c995.tar.gz
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 <mqg734@motorola.com>
Diffstat (limited to 'js/document/mediators')
-rwxr-xr-xjs/document/mediators/template.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/js/document/mediators/template.js b/js/document/mediators/template.js
index c5b46c3a..f43b1a2c 100755
--- a/js/document/mediators/template.js
+++ b/js/document/mediators/template.js
@@ -158,6 +158,15 @@ exports.TemplateDocumentMediator = Montage.create(Component, {
158 ninjaContentTagDoc.removeAttribute('style'); 158 ninjaContentTagDoc.removeAttribute('style');
159 ninjaContentTagDoc.removeAttribute('data-ninja-style'); 159 ninjaContentTagDoc.removeAttribute('data-ninja-style');
160 } 160 }
161 // TODO - clean up into single method
162 ninjaContentTagMem = template.document.getElementsByTagName('ninja-viewport')[0], ninjaContentTagDoc = template.file.content.document.getElementsByTagName('ninja-viewport')[0];
163 if (ninjaContentTagMem && ninjaContentTagMem.getAttribute('data-ninja-style') !== null) {
164 ninjaContentTagDoc.setAttribute('style', ninjaContentTagMem.getAttribute('data-ninja-style'));
165 ninjaContentTagDoc.removeAttribute('data-ninja-style');
166 } else if (ninjaContentTagMem && ninjaContentTagMem.getAttribute('data-ninja-style') === null) {
167 ninjaContentTagDoc.removeAttribute('style');
168 ninjaContentTagDoc.removeAttribute('data-ninja-style');
169 }
161 } else { 170 } else {
162 if (template.body && template.body.getAttribute('data-ninja-style') !== null) { 171 if (template.body && template.body.getAttribute('data-ninja-style') !== null) {
163 template.file.content.document.body.setAttribute('style', template.body.getAttribute('data-ninja-style')); 172 template.file.content.document.body.setAttribute('style', template.body.getAttribute('data-ninja-style'));