diff options
author | Valerio Virgillito | 2012-05-11 15:49:03 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-05-11 15:49:03 -0700 |
commit | 9464de58d5bb8b467829926b9d01c0760ec4d790 (patch) | |
tree | f6aa6548db45bb0d09fc4e01909028d03015e0ec | |
parent | 1fb663b5f348fe2ff5ce86a80e8a61be289eba70 (diff) | |
parent | d114f222cb48a101ffdb1b88d43823ca16f2c7df (diff) | |
download | ninja-9464de58d5bb8b467829926b9d01c0760ec4d790.tar.gz |
Merge pull request #223 from joseeight/Document
Fixing Overflow
-rwxr-xr-x | js/document/document-html.js | 1 | ||||
-rwxr-xr-x | js/document/views/design.js | 2 | ||||
-rw-r--r-- | js/mediators/io-mediator.js | 2 |
3 files changed, 2 insertions, 3 deletions
diff --git a/js/document/document-html.js b/js/document/document-html.js index 7e1f1806..4767271f 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js | |||
@@ -100,7 +100,6 @@ exports.HtmlDocument = Montage.create(Component, { | |||
100 | this._document = this.model.views.design.document; | 100 | this._document = this.model.views.design.document; |
101 | //TODO: Remove usage, seems as not needed | 101 | //TODO: Remove usage, seems as not needed |
102 | if (template && template.type === 'banner') { | 102 | if (template && template.type === 'banner') { |
103 | //this.documentRoot = this.model.views.design.document.body; | ||
104 | this.documentRoot = this.model.views.design.document.body.getElementsByTagName('ninja-banner')[0]; | 103 | this.documentRoot = this.model.views.design.document.body.getElementsByTagName('ninja-banner')[0]; |
105 | } else { | 104 | } else { |
106 | this.documentRoot = this.model.views.design.document.body; | 105 | this.documentRoot = this.model.views.design.document.body; |
diff --git a/js/document/views/design.js b/js/document/views/design.js index e838dd49..16d1ac06 100755 --- a/js/document/views/design.js +++ b/js/document/views/design.js | |||
@@ -168,7 +168,7 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, { | |||
168 | } | 168 | } |
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 {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 | //Setting content in template | 172 | //Setting content in template |
173 | ninjaBanner.innerHTML = banner.innerHTML; | 173 | ninjaBanner.innerHTML = banner.innerHTML; |
174 | //Garbage collection | 174 | //Garbage collection |
diff --git a/js/mediators/io-mediator.js b/js/mediators/io-mediator.js index 0bff1f3b..c9c7203f 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 {width: "+dimensions.width+"; height: "+dimensions.height+"}"); | 86 | content = content.replace(/ninja-banner {}/gi, "ninja-banner {overflow: hidden; width: "+dimensions.width+"; height: "+dimensions.height+"}"); |
87 | } | 87 | } |
88 | // | 88 | // |
89 | return content; | 89 | return content; |