From 49596f2a6b518ed0ee945006787d3c69e40a5757 Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Thu, 22 Mar 2012 14:31:12 -0700 Subject: Updated Resizers for Panels and timeline Signed-off-by: Armen Kesablyan --- js/stage/stage-view.reel/stage-view.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'js/stage') diff --git a/js/stage/stage-view.reel/stage-view.js b/js/stage/stage-view.reel/stage-view.js index ad67cada..1f471431 100755 --- a/js/stage/stage-view.reel/stage-view.js +++ b/js/stage/stage-view.reel/stage-view.js @@ -200,14 +200,18 @@ exports.StageView = Montage.create(Component, { }, showRulers:{ value:function(){ - this.application.ninja.rulerTop.style.background = "url('../images/temp/ruler-top.png')"; - this.application.ninja.rulerLeft.style.background = "url('../images/temp/ruler-left.png')"; + this.application.ninja.rulerTop.style.display = "block"; + this.application.ninja.rulerLeft.style.display = "block"; +// this.application.ninja.rulerTop.style.background = "url('../images/temp/ruler-top.png')"; +// this.application.ninja.rulerLeft.style.background = "url('../images/temp/ruler-left.png')"; } }, hideRulers:{ value:function(){ - this.application.ninja.rulerTop.style.background = "rgb(128,128,128)"; - this.application.ninja.rulerLeft.style.background = "rgb(128,128,128)"; + this.application.ninja.rulerTop.style.display = "none"; + this.application.ninja.rulerLeft.style.display = "none"; +// this.application.ninja.rulerTop.style.background = "rgb(128,128,128)"; +// this.application.ninja.rulerLeft.style.background = "rgb(128,128,128)"; } }, -- cgit v1.2.3 From 29df692bbe42150c2cb6a58587b9e9ae2d791389 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Tue, 3 Apr 2012 13:44:37 -0700 Subject: IKNinja-635 - Can't see 3d handles if div is red, green or blue color. Signed-off-by: Nivesh Rajbhandari --- js/stage/tool-handle.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'js/stage') diff --git a/js/stage/tool-handle.js b/js/stage/tool-handle.js index f16d8324..d353da47 100755 --- a/js/stage/tool-handle.js +++ b/js/stage/tool-handle.js @@ -235,6 +235,8 @@ exports.RotateHandle = Montage.create(ToolHandle, { context.strokeStyle = this._strokeStyle; context.fillStyle = this._fillStyle; context.lineWidth = this._lineWidth; + context.shadowBlur = 2; + context.shadowColor = "rgba(0, 0, 0, 0.8)"; var pointOnElt = base.slice(0); // this._origin = viewUtils.localToGlobal(pointOnElt, item); @@ -400,7 +402,8 @@ exports.RotateHandle = Montage.create(ToolHandle, { var context = this.application.ninja.stage.drawingContext; context.save(); - context.strokeStyle = this._strokeStyle; + context.strokeStyle = "rgba(0,0,0,1)"; + context.lineWidth = 2; context.fillStyle = this._fillStyle; context.globalAlpha = 0.2; @@ -574,6 +577,8 @@ exports.TranslateHandle = Montage.create(ToolHandle, { context.strokeStyle = this._strokeStyle; context.fillStyle = this._fillStyle; context.lineWidth = this._lineWidth; + context.shadowBlur = 2; + context.shadowColor = "rgba(0, 0, 0, 0.8)"; var pointOnElt = base.slice(0); // this._origin = viewUtils.localToGlobal(pointOnElt, item); -- cgit v1.2.3 From a11ef2eed7049835c8bdfa50a2b893632c46eaa0 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 4 Apr 2012 11:11:58 -0700 Subject: Squashed commit of Preparing for the montage undo-manager: Architecture changes Reworked the add and remove elements into 1 function which can take 1 or more elements. Removed the _element from the selection array Many other changes related to those 2 changes Undo/Redo shortcuts are now using montage undo/redo manager. Signed-off-by: Valerio Virgillito --- js/stage/layout.js | 18 ++++++++---------- js/stage/stage.reel/stage.js | 5 ++--- 2 files changed, 10 insertions(+), 13 deletions(-) (limited to 'js/stage') diff --git a/js/stage/layout.js b/js/stage/layout.js index 6be2df1d..ae9260fc 100755 --- a/js/stage/layout.js +++ b/js/stage/layout.js @@ -53,12 +53,8 @@ exports.Layout = Montage.create(Component, { this.ctx.lineWidth = this.ctxLineWidth; this.ctx.fillStyle = this.drawFillColor; -// this.eventManager.addEventListener("elementAdded", this, false); - this.eventManager.addEventListener("elementDeleted", this, false); - this.eventManager.addEventListener("selectionChange", this, false); - - this.eventManager.addEventListener("deleteSelection", this, false); + this.eventManager.addEventListener("elementsRemoved", this, false); } }, @@ -76,7 +72,7 @@ exports.Layout = Montage.create(Component, { }, // Redraw stage only once after all deletion is completed - handleDeleteSelection: { + handleElementsRemoved: { value: function(event) { this.draw(); this.draw3DInfo(false); @@ -110,10 +106,8 @@ exports.Layout = Montage.create(Component, { // Draw the non selected elements if(!event.detail.isDocument) { - var tmp = event.detail.elements.map(function(element){ return element._element}); - this.elementsToDraw = this.domTree.filter(function(value) { - return (tmp.indexOf(value) === -1); + return (event.detail.elements.indexOf(value) === -1); }); } else { this.elementsToDraw = Array.prototype.slice.call(this.domTree, 0); @@ -345,7 +339,11 @@ exports.Layout = Montage.create(Component, { _elementName: { value: function(item) { - return this.application.ninja.elementMediator.getNJProperty(item, "selection"); + if(item.elementModel && item.elementModel.hasOwnProperty("selection")) { + return item.elementModel['selection']; + } else { + return ""; + } } } diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js index 00b72490..3500b6a3 100755 --- a/js/stage/stage.reel/stage.js +++ b/js/stage/stage.reel/stage.js @@ -560,8 +560,7 @@ exports.Stage = Montage.create(Component, { elt = this.application.ninja.currentDocument.GetElementFromPoint(point.x + this.scrollLeft,point.y + this.scrollTop); // workaround Chrome 3d bug - if(this.application.ninja.toolsData.selectedToolInstance._canSnap && this.application.ninja.currentDocument.inExclusion(elt) !== -1) - { + if(this.application.ninja.toolsData.selectedToolInstance._canSnap && this.application.ninja.currentDocument.inExclusion(elt) !== -1) { return this._getElementUsingSnapping(point); } else { return elt; @@ -605,7 +604,7 @@ exports.Stage = Montage.create(Component, { var selArray = new Array(); for(var i = 0; this.application.ninja.selectedElements[i];i++) { - var curElement = this.application.ninja.selectedElements[i]._element; + var curElement = this.application.ninja.selectedElements[i]; // Add element to array that is used to calculate 3d-bounding box of all elements selArray.push( curElement ); -- cgit v1.2.3