From 862b0c33de7cdc8865db274d37744058256936e0 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Wed, 21 Mar 2012 12:01:44 -0700 Subject: We should draw tag outlines only for nodeType = 1. Signed-off-by: Nivesh Rajbhandari --- js/stage/layout.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/stage') diff --git a/js/stage/layout.js b/js/stage/layout.js index 6be2df1d..2de67538 100755 --- a/js/stage/layout.js +++ b/js/stage/layout.js @@ -162,7 +162,7 @@ exports.Layout = Montage.create(Component, { drawTagOutline: { value: function (item) { - if(!item) return; + if(!item || (item.nodeType !== 1)) return; // TODO Bind the layoutview mode to the current document // var mode = this.application.ninja.currentDocument.layoutMode; -- cgit v1.2.3 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') 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 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