From c62273126004f057de40ce91ecda5606643f4c92 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 20 Apr 2012 16:37:47 -0700 Subject: reverting old template to current working status. New template work. Signed-off-by: Valerio Virgillito --- js/ninja.reel/ninja.js | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) (limited to 'js/ninja.reel') diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index 9b5081dd..2fedd71d 100755 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js @@ -10,6 +10,7 @@ var Montage = require("montage/core/core").Montage, AppData = require("js/data/appdata").AppData; var matrix = require("js/lib/math/matrix"); +var NjUtils = require("js/lib/NJUtils").NJUtils; exports.Ninja = Montage.create(Component, { @@ -143,6 +144,7 @@ exports.Ninja = Montage.create(Component, { value: function() { this.ninjaVersion = window.ninjaVersion.ninja.version; this.undoManager = document.application.undoManager = UndoManager.create(); + document.application.njUtils = NjUtils; } }, @@ -187,28 +189,18 @@ exports.Ninja = Montage.create(Component, { willDraw: { value: function() { - } }, draw: { value: function() { if(this.isResizing) { - if (this.height - this._resizedHeight < 46) { - this.timelineSplitter.collapsed = true; - } else { - this.timelineSplitter.collapsed = false; - } - - if (this.width - this._resizedWidth < 30) { - this.panelSplitter.collapsed = true; - } else { - this.panelSplitter.collapsed = false; - } - + this.timelineSplitter.collapsed = this.height - this._resizedHeight < 46; + this.panelSplitter.collapsed = this.width - this._resizedWidth < 30; } - this.rightPanelContainer.style.width = (this.width - this._resizedWidth) + "px"; - this.timeline.element.style.height = (this.height - this._resizedHeight) + "px"; + + this.rightPanelContainer.style.width = (this.width - this._resizedWidth) + "px"; + this.timeline.element.style.height = (this.height - this._resizedHeight) + "px"; } }, -- cgit v1.2.3