diff options
author | Jose Antonio Marquez | 2012-04-10 11:24:35 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-04-10 11:24:35 -0700 |
commit | e663e336ee7e832b5059a82748061506b414cb04 (patch) | |
tree | a09d932319365067f437780e90aeab4ef19f74b4 /js/stage | |
parent | c3022de5ba2e24737184dba7454233b165da0a20 (diff) | |
parent | bd43ce383b050d03b0f92cc923c517febc66ca28 (diff) | |
download | ninja-e663e336ee7e832b5059a82748061506b414cb04.tar.gz |
Merge branch 'refs/heads/Ninja-Internal' into Document
Diffstat (limited to 'js/stage')
-rwxr-xr-x | js/stage/layout.js | 2 | ||||
-rwxr-xr-x | js/stage/stage.reel/stage.js | 5 | ||||
-rwxr-xr-x | js/stage/tool-handle.js | 7 |
3 files changed, 12 insertions, 2 deletions
diff --git a/js/stage/layout.js b/js/stage/layout.js index ae9260fc..a096848e 100755 --- a/js/stage/layout.js +++ b/js/stage/layout.js | |||
@@ -156,7 +156,7 @@ exports.Layout = Montage.create(Component, { | |||
156 | drawTagOutline: { | 156 | drawTagOutline: { |
157 | value: function (item) { | 157 | value: function (item) { |
158 | 158 | ||
159 | if(!item) return; | 159 | if(!item || (item.nodeType !== 1)) return; |
160 | 160 | ||
161 | // TODO Bind the layoutview mode to the current document | 161 | // TODO Bind the layoutview mode to the current document |
162 | // var mode = this.application.ninja.currentDocument.layoutMode; | 162 | // var mode = this.application.ninja.currentDocument.layoutMode; |
diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js index 3500b6a3..ec8c0e55 100755 --- a/js/stage/stage.reel/stage.js +++ b/js/stage/stage.reel/stage.js | |||
@@ -795,6 +795,8 @@ exports.Stage = Montage.create(Component, { | |||
795 | drawLine: { | 795 | drawLine: { |
796 | value:function(x0, y0, x1, y1, strokeSize, strokeColor) { | 796 | value:function(x0, y0, x1, y1, strokeSize, strokeColor) { |
797 | this.clearDrawingCanvas(); | 797 | this.clearDrawingCanvas(); |
798 | var origStrokeStyle = this._drawingContext.strokeStyle; | ||
799 | var origLineWidth = this._drawingContext.lineWidth; | ||
798 | this._drawingContext.strokeStyle = strokeColor; | 800 | this._drawingContext.strokeStyle = strokeColor; |
799 | this._drawingContext.lineWidth = strokeSize; | 801 | this._drawingContext.lineWidth = strokeSize; |
800 | 802 | ||
@@ -825,6 +827,9 @@ exports.Stage = Montage.create(Component, { | |||
825 | var w = Math.round(Math.abs(x1-x0)); | 827 | var w = Math.round(Math.abs(x1-x0)); |
826 | this._drawingContext.fillText("H: " + h, txtX + 38, txtY - 4); | 828 | this._drawingContext.fillText("H: " + h, txtX + 38, txtY - 4); |
827 | this._drawingContext.fillText("W: " + w, txtX - 5, txtY + 12); | 829 | this._drawingContext.fillText("W: " + w, txtX - 5, txtY + 12); |
830 | |||
831 | this._drawingContext.strokeStyle = origStrokeStyle; | ||
832 | this._drawingContext.lineWidth = origLineWidth; | ||
828 | } | 833 | } |
829 | }, | 834 | }, |
830 | 835 | ||
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, { | |||
235 | context.strokeStyle = this._strokeStyle; | 235 | context.strokeStyle = this._strokeStyle; |
236 | context.fillStyle = this._fillStyle; | 236 | context.fillStyle = this._fillStyle; |
237 | context.lineWidth = this._lineWidth; | 237 | context.lineWidth = this._lineWidth; |
238 | context.shadowBlur = 2; | ||
239 | context.shadowColor = "rgba(0, 0, 0, 0.8)"; | ||
238 | 240 | ||
239 | var pointOnElt = base.slice(0); | 241 | var pointOnElt = base.slice(0); |
240 | // this._origin = viewUtils.localToGlobal(pointOnElt, item); | 242 | // this._origin = viewUtils.localToGlobal(pointOnElt, item); |
@@ -400,7 +402,8 @@ exports.RotateHandle = Montage.create(ToolHandle, { | |||
400 | var context = this.application.ninja.stage.drawingContext; | 402 | var context = this.application.ninja.stage.drawingContext; |
401 | context.save(); | 403 | context.save(); |
402 | 404 | ||
403 | context.strokeStyle = this._strokeStyle; | 405 | context.strokeStyle = "rgba(0,0,0,1)"; |
406 | context.lineWidth = 2; | ||
404 | context.fillStyle = this._fillStyle; | 407 | context.fillStyle = this._fillStyle; |
405 | context.globalAlpha = 0.2; | 408 | context.globalAlpha = 0.2; |
406 | 409 | ||
@@ -574,6 +577,8 @@ exports.TranslateHandle = Montage.create(ToolHandle, { | |||
574 | context.strokeStyle = this._strokeStyle; | 577 | context.strokeStyle = this._strokeStyle; |
575 | context.fillStyle = this._fillStyle; | 578 | context.fillStyle = this._fillStyle; |
576 | context.lineWidth = this._lineWidth; | 579 | context.lineWidth = this._lineWidth; |
580 | context.shadowBlur = 2; | ||
581 | context.shadowColor = "rgba(0, 0, 0, 0.8)"; | ||
577 | 582 | ||
578 | var pointOnElt = base.slice(0); | 583 | var pointOnElt = base.slice(0); |
579 | // this._origin = viewUtils.localToGlobal(pointOnElt, item); | 584 | // this._origin = viewUtils.localToGlobal(pointOnElt, item); |