aboutsummaryrefslogtreecommitdiff
path: root/js/stage
diff options
context:
space:
mode:
Diffstat (limited to 'js/stage')
-rwxr-xr-xjs/stage/binding-view.reel/binding-view.js2
-rwxr-xr-xjs/stage/stage.reel/stage.js64
2 files changed, 65 insertions, 1 deletions
diff --git a/js/stage/binding-view.reel/binding-view.js b/js/stage/binding-view.reel/binding-view.js
index 3e83281e..b207cc3d 100755
--- a/js/stage/binding-view.reel/binding-view.js
+++ b/js/stage/binding-view.reel/binding-view.js
@@ -365,7 +365,7 @@ exports.BindingView = Montage.create(Component, {
365 this.mouseOverHud = overHud; 365 this.mouseOverHud = overHud;
366 if(this._isDrawingConnection && !overHud) { 366 if(this._isDrawingConnection && !overHud) {
367 //NOTE : Continue This content. mouse over select 367 //NOTE : Continue This content. mouse over select
368 var obj = this.application.ninja.stage.getElement(event, true); 368 var obj = this.application.ninja.stage.getElement(e, true);
369 if (obj && obj !== this.selectedElement) 369 if (obj && obj !== this.selectedElement)
370 { 370 {
371 if (!obj.controller || obj === null) 371 if (!obj.controller || obj === null)
diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js
index 7c2fa903..817220d4 100755
--- a/js/stage/stage.reel/stage.js
+++ b/js/stage/stage.reel/stage.js
@@ -1351,6 +1351,70 @@ exports.Stage = Montage.create(Component, {
1351 1351
1352 this.drawUtils.initializeFromDocument(adjustScrollOffsets); 1352 this.drawUtils.initializeFromDocument(adjustScrollOffsets);
1353 } 1353 }
1354 },
1355
1356 _timelinePlay: {
1357 value: false
1358 },
1359
1360 timelinePlay: {
1361 get: function() {
1362 return this._timelinePlay;
1363 },
1364 set: function(value) {
1365 if(this._timelinePlay !== value) {
1366 this._timelinePlay = value;
1367 this._timelinePlay ? this.playTimeline() : this.stopTimeline();
1368 }
1369 }
1370 },
1371
1372 playTimeline: {
1373 value: function() {
1374 this._canvas.style.visibility = "hidden";
1375 this._layoutCanvas.style.visibility = "hidden";
1376 this._gridCanvas.style.visibility = "hidden";
1377
1378 this._drawingCanvas.removeEventListener("mousedown", this, false);
1379 this._drawingCanvas.removeEventListener("mouseup", this, false);
1380 this._drawingCanvas.removeEventListener("dblclick", this, false);
1381 this._drawingCanvas.removeEventListener("mousewheel", this, false);
1382 this._drawingCanvas.removeEventListener("mousemove", this, false);
1383
1384 this.clearDrawingCanvas();
1385 this._drawingContext.save();
1386 this._drawingContext.strokeStyle = "rgba(255,0,0,1)";
1387 this._drawingContext.lineWidth = 4;
1388
1389 this._drawingContext.strokeRect(0, 0, this._drawingCanvas.width, this._drawingCanvas.height);
1390
1391 document.removeEventListener("keydown", this, false);
1392 document.removeEventListener("keyup", this, false);
1393 this.bindingView.hide = true;
1394 this.application.ninja.stylesController._stageStylesheet.rules[0].selectorText = "nj-css-garbage-selector";
1395 }
1396 },
1397
1398 stopTimeline: {
1399 value: function() {
1400 this._canvas.style.visibility = "visible";
1401 this._layoutCanvas.style.visibility = "visible";
1402 this._gridCanvas.style.visibility = "visible";
1403
1404 this._drawingCanvas.addEventListener("mousedown", this, false);
1405 this._drawingCanvas.addEventListener("mouseup", this, false);
1406 this._drawingCanvas.addEventListener("dblclick", this, false);
1407 this._drawingCanvas.addEventListener("mousewheel", this, false);
1408 this._drawingCanvas.addEventListener("mousemove", this, false);
1409
1410 this.clearDrawingCanvas();
1411 this._drawingContext.restore();
1412
1413 document.addEventListener("keydown", this, false);
1414 document.addEventListener("keyup", this, false);
1415 this.bindingView.hide = false;
1416 this.application.ninja.stylesController._stageStylesheet.rules[0].selectorText = "*";
1417 }
1354 } 1418 }
1355 1419
1356}); \ No newline at end of file 1420}); \ No newline at end of file