From 75e7d29352787ee8182928403ecae09627117d57 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Tue, 27 Mar 2012 16:09:51 -0700 Subject: IKNINJA-1378 - Line Tool's drawing preview changes tool canvas's line style. Signed-off-by: Nivesh Rajbhandari --- js/stage/stage.reel/stage.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'js/stage/stage.reel/stage.js') diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js index 00b72490..dd23fbae 100755 --- a/js/stage/stage.reel/stage.js +++ b/js/stage/stage.reel/stage.js @@ -796,6 +796,8 @@ exports.Stage = Montage.create(Component, { drawLine: { value:function(x0, y0, x1, y1, strokeSize, strokeColor) { this.clearDrawingCanvas(); + var origStrokeStyle = this._drawingContext.strokeStyle; + var origLineWidth = this._drawingContext.lineWidth; this._drawingContext.strokeStyle = strokeColor; this._drawingContext.lineWidth = strokeSize; @@ -826,6 +828,9 @@ exports.Stage = Montage.create(Component, { var w = Math.round(Math.abs(x1-x0)); this._drawingContext.fillText("H: " + h, txtX + 38, txtY - 4); this._drawingContext.fillText("W: " + w, txtX - 5, txtY + 12); + + this._drawingContext.strokeStyle = origStrokeStyle; + this._drawingContext.lineWidth = origLineWidth; } }, -- 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/stage.reel/stage.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'js/stage/stage.reel/stage.js') 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