aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xjs/components/layout/stage-mode.reel/stage-mode.js12
-rw-r--r--js/controllers/objects-controller.js6
-rw-r--r--js/controllers/presets-controller.js20
-rwxr-xr-xjs/ninja.reel/ninja.html2
-rwxr-xr-xjs/ninja.reel/ninja.js16
-rwxr-xr-xjs/panels/CSSPanel/css-shorthand-map.js11
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js40
-rw-r--r--js/panels/css-panel/styles-view-delegate.js22
-rwxr-xr-xjs/panels/properties.reel/properties.css8
-rwxr-xr-xjs/panels/properties.reel/sections/custom.reel/custom.js2
-rwxr-xr-xjs/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.js30
-rwxr-xr-xjs/stage/binding-view.reel/binding-hud.reel/binding-hud.css38
-rwxr-xr-xjs/stage/binding-view.reel/binding-hud.reel/binding-hud.html3
-rwxr-xr-xjs/stage/binding-view.reel/binding-hud.reel/binding-hud.js105
-rwxr-xr-xjs/stage/binding-view.reel/binding-view.html8
-rwxr-xr-xjs/stage/binding-view.reel/binding-view.js38
-rw-r--r--js/tools/bindingTool.js20
17 files changed, 258 insertions, 123 deletions
diff --git a/js/components/layout/stage-mode.reel/stage-mode.js b/js/components/layout/stage-mode.reel/stage-mode.js
index cb42276b..b772d688 100755
--- a/js/components/layout/stage-mode.reel/stage-mode.js
+++ b/js/components/layout/stage-mode.reel/stage-mode.js
@@ -9,17 +9,17 @@ var Montage = require("montage/core/core").Montage,
9 9
10exports.StageMode = Montage.create(Component, { 10exports.StageMode = Montage.create(Component, {
11 11
12 _livePreview: { 12 _chromePreview: {
13 value: null 13 value: null
14 }, 14 },
15 15
16 livePreview: { 16 chromePreview: {
17 get: function() { 17 get: function() {
18 return this._livePreview; 18 return this._chromePreview;
19 }, 19 },
20 set: function(value) { 20 set: function(value) {
21 if(value !== this._livePreview) { 21 if(value !== this._chromePreview) {
22 this._livePreview = value; 22 this._chromePreview = value;
23 this.needsDraw = true; 23 this.needsDraw = true;
24 } 24 }
25 } 25 }
@@ -46,7 +46,7 @@ exports.StageMode = Montage.create(Component, {
46 46
47 handleClick: { 47 handleClick: {
48 value: function(event) { 48 value: function(event) {
49 this.livePreview = !this.livePreview; 49 this.chromePreview = !this.chromePreview;
50 } 50 }
51 } 51 }
52}); \ No newline at end of file 52}); \ No newline at end of file
diff --git a/js/controllers/objects-controller.js b/js/controllers/objects-controller.js
index 6557c14e..6ca869ba 100644
--- a/js/controllers/objects-controller.js
+++ b/js/controllers/objects-controller.js
@@ -27,7 +27,7 @@ var objectsController = exports.ObjectsController = Montage.create(Montage, {
27 setTimeout(function() { 27 setTimeout(function() {
28 this.bindToModelObjects(); 28 this.bindToModelObjects();
29 }.bind(this), 1000); 29 }.bind(this), 1000);
30 30 this.currentObjectBindings = [];
31 this._currentDocument = doc; 31 this._currentDocument = doc;
32 }, 32 },
33 enumerable : false 33 enumerable : false
@@ -150,9 +150,9 @@ var objectsController = exports.ObjectsController = Montage.create(Montage, {
150 var properties = []; 150 var properties = [];
151 151
152 for(var key in object) { 152 for(var key in object) {
153 if(object.hasOwnProperty(key)) { 153 //if(object.hasOwnProperty(key)) {
154 properties.push(key); 154 properties.push(key);
155 } 155 //}
156 } 156 }
157 157
158 if(excludeUnderscoreProperties) { 158 if(excludeUnderscoreProperties) {
diff --git a/js/controllers/presets-controller.js b/js/controllers/presets-controller.js
index 4c177189..65a56a74 100644
--- a/js/controllers/presets-controller.js
+++ b/js/controllers/presets-controller.js
@@ -53,6 +53,8 @@ exports.PresetsController = Montage.create(Component, {
53 //// TODO: replace this hack when webkit supports transitionStart event (see above) 53 //// TODO: replace this hack when webkit supports transitionStart event (see above)
54 window.clearTimeout(el.njTimeout); 54 window.clearTimeout(el.njTimeout);
55 55
56 this._dispatchChange();
57
56 el.classList.remove(this.transitionClass); 58 el.classList.remove(this.transitionClass);
57 el.removeEventListener("webkitTransitionEnd", this, true); 59 el.removeEventListener("webkitTransitionEnd", this, true);
58 } 60 }
@@ -107,6 +109,10 @@ exports.PresetsController = Montage.create(Component, {
107 } 109 }
108 }, this); 110 }, this);
109 111
112 if(!useTransition) {
113 this._dispatchChange();
114 }
115
110 } 116 }
111 }, 117 },
112 118
@@ -126,5 +132,19 @@ exports.PresetsController = Montage.create(Component, {
126 132
127 return keysString; 133 return keysString;
128 } 134 }
135 },
136
137 _dispatchChange : {
138 value: function(property, value) {
139 this.application.ninja.stage.updatedStage = true;
140 NJevent('elementChange', {
141 type : 'presetChange',
142 data: {
143 "prop": property,
144 "value": value
145 },
146 redraw: null
147 });
148 }
129 } 149 }
130}); \ No newline at end of file 150}); \ No newline at end of file
diff --git a/js/ninja.reel/ninja.html b/js/ninja.reel/ninja.html
index 5429e7d0..1ebf8413 100755
--- a/js/ninja.reel/ninja.html
+++ b/js/ninja.reel/ninja.html
@@ -163,7 +163,7 @@
163 "element": {"#": "stageMode"} 163 "element": {"#": "stageMode"}
164 }, 164 },
165 "bindings" : { 165 "bindings" : {
166 "livePreview": {"<->": "@appModel.livePreview"} 166 "chromePreview": {"<->": "@appModel.chromePreview"}
167 } 167 }
168 }, 168 },
169 169
diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js
index 859268a0..94f69ed8 100755
--- a/js/ninja.reel/ninja.js
+++ b/js/ninja.reel/ninja.js
@@ -511,25 +511,17 @@ exports.Ninja = Montage.create(Component, {
511 511
512 executeLivePreview: { 512 executeLivePreview: {
513 value: function() { 513 value: function() {
514 var background, overflow, transitionStopRule; 514 var transitionStopRule;
515 this.stage.hideCanvas(this.appModel.livePreview); 515// this.stage.hideCanvas(this.appModel.livePreview);
516 516
517 // TODO: Remove marker for old template: NINJA-STAGE-REWORK
518 if(this.appModel.livePreview) { 517 if(this.appModel.livePreview) {
519// background = "#000000";
520// overflow = "hidden";
521 transitionStopRule = "nj-css-garbage-selector"; 518 transitionStopRule = "nj-css-garbage-selector";
519 this.stage.bindingView.hide = true;
522 } else { 520 } else {
523// background = "#808080";
524// overflow = "visible";
525 transitionStopRule = "*" 521 transitionStopRule = "*"
522 this.stage.bindingView.hide = false;
526 } 523 }
527 524
528 // TODO: Remove marker for old template: NINJA-STAGE-REWORK
529// this.currentDocument.model.documentRoot.elementModel.controller.setProperty(this.currentDocument.model.documentRoot, "body-background", background);
530// this.currentDocument.model.documentRoot.elementModel.controller.setProperty(this.currentDocument.model.documentRoot, "overflow", overflow);
531// this.currentDocument.model.documentRoot.elementModel.controller.changeSelector(this.currentDocument.model.documentRoot, "transitionStopRule", transitionStopRule);
532
533 this.application.ninja.stylesController._stageStylesheet.rules[0].selectorText = transitionStopRule; 525 this.application.ninja.stylesController._stageStylesheet.rules[0].selectorText = transitionStopRule;
534 526
535 this._toggleWebGlAnimation(this.appModel.livePreview); 527 this._toggleWebGlAnimation(this.appModel.livePreview);
diff --git a/js/panels/CSSPanel/css-shorthand-map.js b/js/panels/CSSPanel/css-shorthand-map.js
index d469e2a1..e38627f7 100755
--- a/js/panels/CSSPanel/css-shorthand-map.js
+++ b/js/panels/CSSPanel/css-shorthand-map.js
@@ -68,7 +68,15 @@ exports.CSS_SHORTHAND_MAP = {
68 'padding-left' : ['padding'], 68 'padding-left' : ['padding'],
69 'padding-right' : ['padding'], 69 'padding-right' : ['padding'],
70 'padding-top' : ['padding'], 70 'padding-top' : ['padding'],
71 71
72 '-webkit-animation-name' : ['-webkit-animation'],
73 '-webkit-animation-duration' : ['-webkit-animation'],
74 '-webkit-animation-timing-function' : ['-webkit-animation'],
75 '-webkit-animation-delay' : ['-webkit-animation'],
76 '-webkit-animation-iteration-count' : ['-webkit-animation'],
77 '-webkit-animation-direction' : ['-webkit-animation'],
78 '-webkit-animation-fill-mode' : ['-webkit-animation'],
79
72 '-webkit-transition-property' : ['-webkit-transition'], 80 '-webkit-transition-property' : ['-webkit-transition'],
73 '-webkit-transition-duration' : ['-webkit-transition'], 81 '-webkit-transition-duration' : ['-webkit-transition'],
74 '-webkit-transition-timing-function' : ['-webkit-transition'], 82 '-webkit-transition-timing-function' : ['-webkit-transition'],
@@ -91,6 +99,7 @@ exports.CSS_SHORTHAND_TO_SUBPROP_MAP = {
91 'list' : ["list-style-type", "list-style-image", "list-style-position"], 99 'list' : ["list-style-type", "list-style-image", "list-style-position"],
92 'margin' : ["margin-top", "margin-right", "margin-bottom", "margin-left"], 100 'margin' : ["margin-top", "margin-right", "margin-bottom", "margin-left"],
93 'padding' : ["padding-top", "padding-right", "padding-bottom", "padding-left"], 101 'padding' : ["padding-top", "padding-right", "padding-bottom", "padding-left"],
102 '-webkit-animation': ["webkit-animation-name", "webkit-animation-duration", "webkit-animation-timing-function", "webkit-animation-delay", "webkit-animation-iteration-count", "webkit-animation-direction", "webkit-animation-fill-mode"],
94 '-webkit-transition' : ["-webkit-transition-property", "-webkit-transition-duration", 103 '-webkit-transition' : ["-webkit-transition-property", "-webkit-transition-duration",
95 "-webkit-transition-timing-function", "-webkit-transition-delay"] 104 "-webkit-transition-timing-function", "-webkit-transition-delay"]