diff options
author | Ananya Sen | 2012-07-20 12:19:09 -0700 |
---|---|---|
committer | Ananya Sen | 2012-07-20 12:19:09 -0700 |
commit | bf4bd611e6fadf45fa9dc50ad72902040075ff0c (patch) | |
tree | 6fcb99cc7f497dfdddb7fd0e00b80a9c7c911099 /js/stage | |
parent | 0d414eaeae13bb520e52ddace0a83c03eb9e7769 (diff) | |
parent | 9053e2037821a5c8405fabb74db9635deacfe8d5 (diff) | |
download | ninja-bf4bd611e6fadf45fa9dc50ad72902040075ff0c.tar.gz |
Merge branch 'refs/heads/ninja-internal-master' into copy-paste-bugfix
Diffstat (limited to 'js/stage')
-rwxr-xr-x | js/stage/stage.reel/stage.js | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js index 7ac64976..b7235d19 100755 --- a/js/stage/stage.reel/stage.js +++ b/js/stage/stage.reel/stage.js | |||
@@ -1349,6 +1349,70 @@ exports.Stage = Montage.create(Component, { | |||
1349 | 1349 | ||
1350 | this.drawUtils.initializeFromDocument(adjustScrollOffsets); | 1350 | this.drawUtils.initializeFromDocument(adjustScrollOffsets); |
1351 | } | 1351 | } |
1352 | }, | ||
1353 | |||
1354 | _timelinePlay: { | ||
1355 | value: false | ||
1356 | }, | ||
1357 | |||
1358 | timelinePlay: { | ||
1359 | get: function() { | ||
1360 | return this._timelinePlay; | ||
1361 | }, | ||
1362 | set: function(value) { | ||
1363 | if(this._timelinePlay !== value) { | ||
1364 | this._timelinePlay = value; | ||
1365 | this._timelinePlay ? this.playTimeline() : this.stopTimeline(); | ||
1366 | } | ||
1367 | } | ||
1368 | }, | ||
1369 | |||
1370 | playTimeline: { | ||
1371 | value: function() { | ||
1372 | this._canvas.style.visibility = "hidden"; | ||
1373 | this._layoutCanvas.style.visibility = "hidden"; | ||
1374 | this._gridCanvas.style.visibility = "hidden"; | ||
1375 | |||
1376 | this._drawingCanvas.removeEventListener("mousedown", this, false); | ||
1377 | this._drawingCanvas.removeEventListener("mouseup", this, false); | ||
1378 | this._drawingCanvas.removeEventListener("dblclick", this, false); | ||
1379 | this._drawingCanvas.removeEventListener("mousewheel", this, false); | ||
1380 | this._drawingCanvas.removeEventListener("mousemove", this, false); | ||
1381 | |||
1382 | this.clearDrawingCanvas(); | ||
1383 | this._drawingContext.save(); | ||
1384 | this._drawingContext.strokeStyle = "rgba(255,0,0,1)"; | ||
1385 | this._drawingContext.lineWidth = 4; | ||
1386 | |||
1387 | this._drawingContext.strokeRect(0, 0, this._drawingCanvas.width, this._drawingCanvas.height); | ||
1388 | |||
1389 | document.removeEventListener("keydown", this, false); | ||
1390 | document.removeEventListener("keyup", this, false); | ||
1391 | this.bindingView.hide = true; | ||
1392 | this.application.ninja.stylesController._stageStylesheet.rules[0].selectorText = "nj-css-garbage-selector"; | ||
1393 | } | ||
1394 | }, | ||
1395 | |||
1396 | stopTimeline: { | ||
1397 | value: function() { | ||
1398 | this._canvas.style.visibility = "visible"; | ||
1399 | this._layoutCanvas.style.visibility = "visible"; | ||
1400 | this._gridCanvas.style.visibility = "visible"; | ||
1401 | |||
1402 | this._drawingCanvas.addEventListener("mousedown", this, false); | ||
1403 | this._drawingCanvas.addEventListener("mouseup", this, false); | ||
1404 | this._drawingCanvas.addEventListener("dblclick", this, false); | ||
1405 | this._drawingCanvas.addEventListener("mousewheel", this, false); | ||
1406 | this._drawingCanvas.addEventListener("mousemove", this, false); | ||
1407 | |||
1408 | this.clearDrawingCanvas(); | ||
1409 | this._drawingContext.restore(); | ||
1410 | |||
1411 | document.addEventListener("keydown", this, false); | ||
1412 | document.addEventListener("keyup", this, false); | ||
1413 | this.bindingView.hide = false; | ||
1414 | this.application.ninja.stylesController._stageStylesheet.rules[0].selectorText = "*"; | ||
1415 | } | ||
1352 | } | 1416 | } |
1353 | 1417 | ||
1354 | }); \ No newline at end of file | 1418 | }); \ No newline at end of file |