diff options
author | Nivesh Rajbhandari | 2012-03-27 16:09:51 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-03-27 16:09:51 -0700 |
commit | 75e7d29352787ee8182928403ecae09627117d57 (patch) | |
tree | 9b4c852ce631120002f9e45b0b77f7e0b0526149 | |
parent | b5d16f318e23a98d2b75afb902a7d0da6d18a10d (diff) | |
download | ninja-75e7d29352787ee8182928403ecae09627117d57.tar.gz |
IKNINJA-1378 - Line Tool's drawing preview changes tool canvas's line style.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
-rwxr-xr-x | js/stage/stage.reel/stage.js | 5 |
1 files changed, 5 insertions, 0 deletions
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, { | |||
796 | drawLine: { | 796 | drawLine: { |
797 | value:function(x0, y0, x1, y1, strokeSize, strokeColor) { | 797 | value:function(x0, y0, x1, y1, strokeSize, strokeColor) { |
798 | this.clearDrawingCanvas(); | 798 | this.clearDrawingCanvas(); |
799 | var origStrokeStyle = this._drawingContext.strokeStyle; | ||
800 | var origLineWidth = this._drawingContext.lineWidth; | ||
799 | this._drawingContext.strokeStyle = strokeColor; | 801 | this._drawingContext.strokeStyle = strokeColor; |
800 | this._drawingContext.lineWidth = strokeSize; | 802 | this._drawingContext.lineWidth = strokeSize; |
801 | 803 | ||
@@ -826,6 +828,9 @@ exports.Stage = Montage.create(Component, { | |||
826 | var w = Math.round(Math.abs(x1-x0)); | 828 | var w = Math.round(Math.abs(x1-x0)); |
827 | this._drawingContext.fillText("H: " + h, txtX + 38, txtY - 4); | 829 | this._drawingContext.fillText("H: " + h, txtX + 38, txtY - 4); |
828 | this._drawingContext.fillText("W: " + w, txtX - 5, txtY + 12); | 830 | this._drawingContext.fillText("W: " + w, txtX - 5, txtY + 12); |
831 | |||
832 | this._drawingContext.strokeStyle = origStrokeStyle; | ||
833 | this._drawingContext.lineWidth = origLineWidth; | ||
829 | } | 834 | } |
830 | }, | 835 | }, |
831 | 836 | ||