aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rwxr-xr-xjs/controllers/document-controller.js5
-rwxr-xr-xjs/document/document-html.js2
-rwxr-xr-xjs/document/templates/banner/index.html5
-rwxr-xr-xjs/helper-classes/3D/view-utils.js6
-rw-r--r--js/mediators/io-mediator.js2
5 files changed, 14 insertions, 6 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js
index e6b543d7..3f4fe2ed 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -686,8 +686,11 @@ if(this.activeDocument && this.application.ninja.coreIoApi.cloudAvailable()){
686 } 686 }
687 687
688 if(needsRule) { 688 if(needsRule) {
689 rule = sc.addRule('body{}'); 689// rule = sc.addRule('body{}');
690// sc.setStyles(rule, styles);
691 rule = sc.addRule('.ninjaUserDoc{}');
690 sc.setStyles(rule, styles); 692 sc.setStyles(rule, styles);
693 sc.addClass(docRoot, "ninjaUserDoc");
691 } 694 }
692 } 695 }
693 } 696 }
diff --git a/js/document/document-html.js b/js/document/document-html.js
index 4767271f..f8e88ede 100755
--- a/js/document/document-html.js
+++ b/js/document/document-html.js
@@ -107,7 +107,7 @@ exports.HtmlDocument = Montage.create(Component, {
107 //TODO: Why is this needed? 107 //TODO: Why is this needed?
108 this._liveNodeList = this.model.views.design.document.body.getElementsByTagName('*'); 108 this._liveNodeList = this.model.views.design.document.body.getElementsByTagName('*');
109 //Initiliazing document model 109 //Initiliazing document model
110 document.application.njUtils.makeElementModel(this.model.views.design.document.body, "Body", "body"); 110 document.application.njUtils.makeElementModel(this.documentRoot, "Body", "body");
111 //Adding observer to know when template is ready 111 //Adding observer to know when template is ready
112 this._observer = new WebKitMutationObserver(this.handleTemplateReady.bind(this)); 112 this._observer = new WebKitMutationObserver(this.handleTemplateReady.bind(this));
113 this._observer.observe(this.model.views.design.document.head, {childList: true}); 113 this._observer.observe(this.model.views.design.document.head, {childList: true});
diff --git a/js/document/templates/banner/index.html b/js/document/templates/banner/index.html
index 8e8c96d6..9da6699b 100755
--- a/js/document/templates/banner/index.html
+++ b/js/document/templates/banner/index.html
@@ -27,8 +27,6 @@
27 margin: 0; 27 margin: 0;
28 padding: 0; 28 padding: 0;
29 position: absolute; 29 position: absolute;
30 -webkit-transform-style: preserve-3d;
31 -webkit-transform: perspective(1400) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
32 } 30 }
33 31
34 html { 32 html {
@@ -63,6 +61,9 @@
63 top: 0; 61 top: 0;
64 left: 0; 62 left: 0;
65 background: #FFF; 63 background: #FFF;
64 -webkit-transform-style: preserve-3d;
65 -webkit-transform: perspective(1400) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
66
66 } 67 }
67 </style> 68 </style>
68 69
diff --git a/js/helper-classes/3D/view-utils.js b/js/helper-classes/3D/view-utils.js
index 22446403..8c338f84 100755
--- a/js/helper-classes/3D/view-utils.js
+++ b/js/helper-classes/3D/view-utils.js
@@ -358,9 +358,13 @@ exports.ViewUtils = Montage.create(Component, {
358 { 358 {
359 pt = this.childToParent( pt, child ); 359 pt = this.childToParent( pt, child );
360 360
361 if (child === this._stageElement) break; 361// if (child === this._stageElement) break;
362// child = child.offsetParent;
362 363
364 if (child === this._stageElement) break;
365 if (child === this._rootElement) break;
363 child = child.offsetParent; 366 child = child.offsetParent;
367 if (child === this._rootElement) break;
364 } 368 }
365 369
366 ///////////////////////////////////////////////////////// 370 /////////////////////////////////////////////////////////
diff --git a/js/mediators/io-mediator.js b/js/mediators/io-mediator.js
index c9c7203f..7d55b20f 100644
--- a/js/mediators/io-mediator.js
+++ b/js/mediators/io-mediator.js
@@ -83,7 +83,7 @@ exports.IoMediator = Montage.create(Component, {
83 dimensions = {width: String(dimensions[0])+'px', height: String(dimensions[1])+'px'}; 83 dimensions = {width: String(dimensions[0])+'px', height: String(dimensions[1])+'px'};
84 // 84 //
85 content = content.replace(/Dimensions@@@/gi, "Dimensions@@@"+template.id); 85 content = content.replace(/Dimensions@@@/gi, "Dimensions@@@"+template.id);
86 content = content.replace(/ninja-banner {}/gi, "ninja-banner {overflow: hidden; width: "+dimensions.width+"; height: "+dimensions.height+"}"); 86 content = content.replace(/ninja-banner {}/gi, "ninja-banner {overflow: visible; width: "+dimensions.width+"; height: "+dimensions.height+"}");
87 } 87 }
88 // 88 //
89 return content; 89 return content;