From 0ebb822b0535bf1bb100b3f3cb396c8b6d3383f1 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 16 May 2012 11:23:12 -0700 Subject: fixing some of the document bindings. Signed-off-by: Valerio Virgillito --- js/stage/stage.reel/stage.html | 3 +++ js/stage/stage.reel/stage.js | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+) (limited to 'js/stage/stage.reel') diff --git a/js/stage/stage.reel/stage.html b/js/stage/stage.reel/stage.html index 30c3d231..88cd6149 100755 --- a/js/stage/stage.reel/stage.html +++ b/js/stage/stage.reel/stage.html @@ -22,6 +22,9 @@ "prototype": "js/stage/stage-deps", "properties": { "stage": {"@": "owner"} + }, + "bindings": { + "currentDocument": {"<-": "@owner.activeDocument"} } }, diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js index deed4112..125155d8 100755 --- a/js/stage/stage.reel/stage.js +++ b/js/stage/stage.reel/stage.js @@ -164,6 +164,29 @@ exports.Stage = Montage.create(Component, { set: function(value) { this._userContentBorder = value; } }, + _activeDocument : { + value : null, + enumerable : false + }, + + activeDocument : { + get : function() { + return this._activeDocument; + }, + set : function(document) { + ///// If the document is null set default stylesheets to null + + if(!document) { + return false; + } + + ///// setting document via binding + this._activeDocument = document; + + }, + enumerable : false + }, + willDraw: { value: function() { if(this.resizeCanvases) { -- cgit v1.2.3