From 2ba4a6fab3b81b537521760ee5f95f1bc80027f9 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Thu, 17 May 2012 11:09:45 -0700 Subject: Adding default padding for banner templates. Signed-off-by: Nivesh Rajbhandari --- js/document/views/design.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'js/document/views') diff --git a/js/document/views/design.js b/js/document/views/design.js index 3b2eb11f..2ccb82d1 100755 --- a/js/document/views/design.js +++ b/js/document/views/design.js @@ -184,6 +184,10 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, { this._bodyFragment = null; //Calling standard method to finish opening document this.bodyContentLoaded(null); + + // TODO: Clean up this code + this.application.ninja.stage.documentOffsetLeft = parseInt((this.document.body.scrollWidth - this._template.size.width)/2); + this.application.ninja.stage.documentOffsetTop = parseInt((this.document.body.scrollHeight - this._template.size.height)/2); } }, //////////////////////////////////////////////////////////////////// -- cgit v1.2.3