diff options
Diffstat (limited to 'js/document')
-rwxr-xr-x | js/document/document-html.js | 2 | ||||
-rwxr-xr-x | js/document/templates/banner/index.html | 19 | ||||
-rwxr-xr-x | js/document/views/design.js | 2 |
3 files changed, 19 insertions, 4 deletions
diff --git a/js/document/document-html.js b/js/document/document-html.js index f8e88ede..b5203e92 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js | |||
@@ -105,7 +105,7 @@ exports.HtmlDocument = Montage.create(Component, { | |||
105 | this.documentRoot = this.model.views.design.document.body; | 105 | this.documentRoot = this.model.views.design.document.body; |
106 | } | 106 | } |
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.documentRoot.getElementsByTagName('*'); |
109 | //Initiliazing document model | 109 | //Initiliazing document model |
110 | document.application.njUtils.makeElementModel(this.documentRoot, "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 |
diff --git a/js/document/templates/banner/index.html b/js/document/templates/banner/index.html index 9da6699b..7b29c038 100755 --- a/js/document/templates/banner/index.html +++ b/js/document/templates/banner/index.html | |||
@@ -50,6 +50,18 @@ | |||
50 | .nj-preset-transition { | 50 | .nj-preset-transition { |
51 | -webkit-transition: all 450ms linear !important; | 51 | -webkit-transition: all 450ms linear !important; |
52 | } | 52 | } |
53 | |||
54 | ninja-viewport { | ||
55 | display: block; | ||
56 | margin: 0; | ||
57 | padding: 0; | ||
58 | border: 0; | ||
59 | position: absolute; | ||
60 | overflow: visible; | ||
61 | top: 0; | ||
62 | left: 0; | ||
63 | background: #FFF; | ||
64 | } | ||
53 | 65 | ||
54 | ninja-banner { | 66 | ninja-banner { |
55 | display: block; | 67 | display: block; |
@@ -60,7 +72,7 @@ | |||
60 | overflow: visible; | 72 | overflow: visible; |
61 | top: 0; | 73 | top: 0; |
62 | left: 0; | 74 | left: 0; |
63 | background: #FFF; | 75 | background: transparent; |
64 | -webkit-transform-style: preserve-3d; | 76 | -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); | 77 | -webkit-transform: perspective(1400) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); |
66 | 78 | ||
@@ -89,7 +101,10 @@ | |||
89 | 101 | ||
90 | <body> | 102 | <body> |
91 | <ninjaloadinghack></ninjaloadinghack> | 103 | <ninjaloadinghack></ninjaloadinghack> |
92 | <ninja-banner></ninja-banner> | 104 | <ninja-viewport> |
105 | <!--TODO - rename--> | ||
106 | <ninja-banner></ninja-banner> | ||
107 | </ninja-viewport> | ||
93 | </body> | 108 | </body> |
94 | 109 | ||
95 | </html> \ No newline at end of file | 110 | </html> \ No newline at end of file |
diff --git a/js/document/views/design.js b/js/document/views/design.js index bff65b7f..3378ad71 100755 --- a/js/document/views/design.js +++ b/js/document/views/design.js | |||
@@ -169,7 +169,7 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, { | |||
169 | } | 169 | } |
170 | //Adjusting margin per size of document | 170 | //Adjusting margin per size of document |
171 | //this.document.head.getElementsByTagName('style')[0].innerHTML += '\n ninja-banner {overflow: visible !important; margin-top: -'+Math.floor(this._template.size.height/2)+'px; margin-left: -'+Math.floor(this._template.size.width/2)+'px}'; | 171 | //this.document.head.getElementsByTagName('style')[0].innerHTML += '\n ninja-banner {overflow: visible !important; margin-top: -'+Math.floor(this._template.size.height/2)+'px; margin-left: -'+Math.floor(this._template.size.width/2)+'px}'; |
172 | this.document.head.getElementsByTagName('style')[0].innerHTML += '\n ninja-banner {overflow: visible !important;}'; | 172 | this.document.head.getElementsByTagName('style')[0].innerHTML += '\n ninja-banner {overflow: visible !important;} ninja-banner, ninja-viewport {width: ' + this._template.size.width + 'px; height: ' + this._template.size.height + 'px;}'; |
173 | //Setting content in template | 173 | //Setting content in template |
174 | ninjaBanner.innerHTML = banner.innerHTML; | 174 | ninjaBanner.innerHTML = banner.innerHTML; |
175 | //Garbage collection | 175 | //Garbage collection |