aboutsummaryrefslogtreecommitdiff
path: root/js/stage
diff options
context:
space:
mode:
authorValerio Virgillito2012-02-20 23:03:48 -0800
committerValerio Virgillito2012-02-20 23:03:48 -0800
commitf9d34a54baf61ccdf77732b1aaedb29d296b8c2e (patch)
tree52821ec87e002b8a704a1355ce70ac65872c5568 /js/stage
parent9e566515f7e3a4ae26b39a2581008a15cf662c95 (diff)
downloadninja-f9d34a54baf61ccdf77732b1aaedb29d296b8c2e.tar.gz
enabling nested selection
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/stage')
-rwxr-xr-xjs/stage/layout.js29
1 files changed, 24 insertions, 5 deletions
diff --git a/js/stage/layout.js b/js/stage/layout.js
index 1a491210..56bb70bf 100755
--- a/js/stage/layout.js
+++ b/js/stage/layout.js
@@ -195,11 +195,30 @@ exports.Layout = Montage.create(Component, {
195 bounds3D[j] = tmpPt; 195 bounds3D[j] = tmpPt;
196 } 196 }
197 197
198 // Draw the Item ouline 198 if(item.uuid === this.application.ninja.currentSelectedContainer.uuid) {
199 this._dashedLine(bounds3D[3][0] - 0.5,bounds3D[3][1]- 0.5,bounds3D[0][0] + 2.5, bounds3D[0][1] - 0.5,[5,5]); 199 this.ctx.save();
200 this._dashedLine(bounds3D[0][0] - 0.5, bounds3D[0][1] - 0.5, bounds3D[1][0]- 0.5, bounds3D[1][1] + 0.5, [5,5] ); 200 this.ctx.strokeStyle = "#C61F00";
201 this._dashedLine(bounds3D[1][0] - 0.5 , bounds3D[1][1] + 0.5, bounds3D[2][0]+ 0.5, bounds3D[2][1] + 0.5, [5,5] ); 201
202 this._dashedLine(bounds3D[2][0] + 0.5, bounds3D[2][1] + 0.5, bounds3D[3][0] + 0.5, bounds3D[3][1] - 0.5, [5,5] ); 202 this.ctx.beginPath();
203
204 this.ctx.moveTo( bounds3D[3][0] + 0.5 , bounds3D[3][1] - 0.5 );
205
206 this.ctx.lineTo( bounds3D[0][0] - 0.5 , bounds3D[0][1] - 0.5 );
207 this.ctx.lineTo( bounds3D[1][0] - 0.5 , bounds3D[1][1] + 0.5 );
208 this.ctx.lineTo( bounds3D[2][0] + 0.5 , bounds3D[2][1] + 0.5 );
209 this.ctx.lineTo( bounds3D[3][0] + 0.5 , bounds3D[3][1] + 0.5 );
210
211 this.ctx.closePath();
212 this.ctx.stroke();
213
214 this.ctx.restore();
215 } else {
216 // Draw the Item ouline
217 this._dashedLine(bounds3D[3][0] - 0.5,bounds3D[3][1]- 0.5,bounds3D[0][0] + 2.5, bounds3D[0][1] - 0.5,[5,5]);
218 this._dashedLine(bounds3D[0][0] - 0.5, bounds3D[0][1] - 0.5, bounds3D[1][0]- 0.5, bounds3D[1][1] + 0.5, [5,5] );
219 this._dashedLine(bounds3D[1][0] - 0.5 , bounds3D[1][1] + 0.5, bounds3D[2][0]+ 0.5, bounds3D[2][1] + 0.5, [5,5] );
220 this._dashedLine(bounds3D[2][0] + 0.5, bounds3D[2][1] + 0.5, bounds3D[3][0] + 0.5, bounds3D[3][1] - 0.5, [5,5] );
221 }
203 222
204 // Draw the Label is all mode 223 // Draw the Label is all mode
205 if(this.layoutView === "layoutAll") { 224 if(this.layoutView === "layoutAll") {