diff options
author | Valerio Virgillito | 2012-06-28 18:00:07 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-06-28 18:00:07 -0700 |
commit | 54f68d3635941489e34e53d9925c3659b3eeabbf (patch) | |
tree | 26cda6bb6f8a7f2af80a2bcf405b379f37d7600a /js | |
parent | b4b54f6cc084b3f7483ebed1e15c1b4770949d58 (diff) | |
parent | cd563af62e937f49406caca55549cd72b13ee228 (diff) | |
download | ninja-54f68d3635941489e34e53d9925c3659b3eeabbf.tar.gz |
Merge pull request #355 from dhg637/GIO_binding-view
Gio binding view bugs and fixes
Diffstat (limited to 'js')
-rw-r--r-- | js/controllers/objects-controller.js | 6 | ||||
-rwxr-xr-x | js/ninja.reel/ninja.js | 2 | ||||
-rwxr-xr-x | js/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.js | 30 | ||||
-rwxr-xr-x | js/stage/binding-view.reel/binding-hud.reel/binding-hud.css | 38 | ||||
-rwxr-xr-x | js/stage/binding-view.reel/binding-hud.reel/binding-hud.html | 3 | ||||
-rwxr-xr-x | js/stage/binding-view.reel/binding-hud.reel/binding-hud.js | 105 | ||||
-rwxr-xr-x | js/stage/binding-view.reel/binding-view.html | 8 | ||||
-rwxr-xr-x | js/stage/binding-view.reel/binding-view.js | 38 | ||||
-rw-r--r-- | js/tools/bindingTool.js | 20 |
9 files changed, 165 insertions, 85 deletions
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/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index e325316b..94f69ed8 100755 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js | |||
@@ -516,8 +516,10 @@ exports.Ninja = Montage.create(Component, { | |||
516 | 516 | ||
517 | if(this.appModel.livePreview) { | 517 | if(this.appModel.livePreview) { |
518 | transitionStopRule = "nj-css-garbage-selector"; | 518 | transitionStopRule = "nj-css-garbage-selector"; |
519 | this.stage.bindingView.hide = true; | ||
519 | } else { | 520 | } else { |
520 | transitionStopRule = "*" | 521 | transitionStopRule = "*" |
522 | this.stage.bindingView.hide = false; | ||
521 | } | 523 | } |
522 | 524 | ||
523 | this.application.ninja.stylesController._stageStylesheet.rules[0].selectorText = transitionStopRule; | 525 | this.application.ninja.stylesController._stageStylesheet.rules[0].selectorText = transitionStopRule; |
diff --git a/js/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.js b/js/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.js index fb0fd57e..a7fbb297 100755 --- a/js/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.js +++ b/js/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.js | |||
@@ -26,8 +26,28 @@ exports.BindingHudOption = Montage.create(Component, { | |||
26 | } | 26 | } |
27 | }, | 27 | }, |
28 | 28 | ||
29 | bound: { | 29 | _promoted : { value: null }, |
30 | value: false | 30 | promoted : { |
31 | get : function() { return this._promoted; }, | ||
32 | set : function(value) { | ||
33 | if(value === this._promoted) { return; } | ||
34 | |||
35 | this._promoted = value; | ||
36 | |||
37 | this.needsDraw = true; | ||
38 | } | ||
39 | }, | ||
40 | |||
41 | _bound : { value: null }, | ||
42 | bound : { | ||
43 | get : function() { return this._bound; }, | ||
44 | set : function(value) { | ||
45 | if(value === this._bound) { return; } | ||
46 | |||
47 | this._bound = value; | ||
48 | |||
49 | this.needsDraw = true; | ||
50 | } | ||
31 | }, | 51 | }, |
32 | 52 | ||
33 | prepareForDraw: { | 53 | prepareForDraw: { |
@@ -47,6 +67,12 @@ exports.BindingHudOption = Montage.create(Component, { | |||
47 | } else { | 67 | } else { |
48 | this.element.classList.remove("bound"); | 68 | this.element.classList.remove("bound"); |
49 | } | 69 | } |
70 | |||
71 | if(this.promoted || this.bound) { | ||
72 | this.element.classList.add("promoted"); | ||
73 | } else { | ||
74 | this.element.classList.remove("promoted"); | ||
75 | } | ||
50 | // if(this.bindings.length > 0) { | 76 | // if(this.bindings.length > 0) { |
51 | // this.element.classList.add("bound"); | 77 | // this.element.classList.add("bound"); |
52 | // } else { | 78 | // } else { |
diff --git a/js/stage/binding-view.reel/binding-hud.reel/binding-hud.css b/js/stage/binding-view.reel/binding-hud.reel/binding-hud.css index 680f9183..1536c706 100755 --- a/js/stage/binding-view.reel/binding-hud.reel/binding-hud.css +++ b/js/stage/binding-view.reel/binding-hud.reel/binding-hud.css | |||
@@ -6,14 +6,12 @@ | |||
6 | 6 | ||
7 | .bindingHud { | 7 | .bindingHud { |
8 | position: absolute; | 8 | position: absolute; |
9 | background: rgba(0, 0, 0, 0.85); | 9 | background: rgba(24, 24, 24, 0.85); |
10 | /*padding: 0px;*/ | ||
11 | color: #C4C4C4; | 10 | color: #C4C4C4; |
12 | font-size: 11px; | 11 | font-size: 11px; |
13 | box-shadow: inset 0px 0px 0px 0px #CCC; | 12 | box-shadow: 3px 3px 20px rgba(0, 0, 0, 0.61); |
14 | border-radius: 6px; | 13 | border-radius: 6px; |
15 | padding: 3px 1px 1px; | 14 | padding: 3px; |
16 | border:1px solid #000; | ||
17 | text-shadow: 1px 1px 0px #000; | 15 | text-shadow: 1px 1px 0px #000; |
18 | } | 16 | } |
19 | 17 | ||
@@ -31,6 +29,8 @@ | |||
31 | /*background: rgba(0, 0, 0, 0.3);*/ | 29 | /*background: rgba(0, 0, 0, 0.3);*/ |
32 | line-height:16px; | 30 | line-height:16px; |
33 | /*box-shadow: inset 0px 0px 4px #333, 1px 1px 0px #3A3A3A;*/ | 31 | /*box-shadow: inset 0px 0px 4px #333, 1px 1px 0px #3A3A3A;*/ |
32 | padding-top: 4px; | ||
33 | margin: 0 5px; | ||
34 | min-width: 80px; | 34 | min-width: 80px; |
35 | } | 35 | } |
36 | 36 | ||
@@ -40,7 +40,10 @@ | |||
40 | line-height:16px; | 40 | line-height:16px; |
41 | padding:1px 25px 1px 8px; | 41 | padding:1px 25px 1px 8px; |
42 | } | 42 | } |
43 | 43 | .bindingHud .hudOption.promoted { | |
44 | color: #FFF; | ||
45 | font-weight: bold; | ||
46 | } | ||
44 | .bindingHud .hudOption .connectorBubble:hover { | 47 | .bindingHud .hudOption .connectorBubble:hover { |
45 | background-color: #1B52A7; | 48 | background-color: #1B52A7; |
46 | box-shadow: inset 0px 2px 2px 1px rgba(15, 15, 15, 0.78), 0 1px #474747; | 49 | box-shadow: inset 0px 2px 2px 1px rgba(15, 15, 15, 0.78), 0 1px #474747; |
@@ -58,35 +61,35 @@ | |||
58 | 61 | ||
59 | .bindingHud .hudOption .connectorBubble { | 62 | .bindingHud .hudOption .connectorBubble { |
60 | position: absolute; | 63 | position: absolute; |
61 | right: 5px; | 64 | right: 2px; |
62 | top: 3px; | 65 | top: 3px; |
63 | border-radius: 50%; | 66 | border-radius: 50%; |
64 | width: 10px; | 67 | width: 10px; |
65 | height: 10px; | 68 | height: 10px; |
66 | border-left: 0px; | 69 | border-left: 0px; |
67 | display: block; | 70 | display: block; |
68 | background-color: #313131; | 71 | background-color: #353535; |
69 | box-shadow: inset 0px 2px 7px 1px #0F0F0F, 0 1px #424242; | 72 | box-shadow: inset 0px 2px 3px 1px #222, 0 1px #666; |
70 | 73 | ||
71 | } | 74 | } |
72 | 75 | ||
73 | .splitter.scrollArea { | 76 | .splitter.scrollArea { |
74 | background-color: transparent; | 77 | background-color: transparent; |
75 | background-size: 12%; | 78 | background-size: 10%; |
76 | background-position-y: 2px; | 79 | background-position-y: 2px; |
77 | display: none; | 80 | display: none; |
78 | height:11px; | 81 | height:11px; |
79 | text-align: center; | 82 | text-align: center; |
80 | } | 83 | } |
81 | .splitter.scrollAreaTop { | 84 | .splitter.scrollAreaTop { |
82 | border-top: 1px solid #353535; | 85 | border-bottom: 1px solid #141414; |
83 | box-shadow: 0 -1px 0 0 #141414; | 86 | box-shadow: 0 1px 0 0 #525252; |
84 | } | 87 | } |
85 | .splitter.scrollAreaBottom { | 88 | .splitter.scrollAreaBottom { |
86 | -webkit-transform: rotate(180deg); | 89 | -webkit-transform: rotate(180deg); |
87 | border-top-left-radius: 6px; | 90 | border-top-left-radius: 6px; |
88 | border-top-right-radius: 6px; | 91 | border-top-right-radius: 6px; |
89 | border-bottom: 1px solid #353535; | 92 | border-bottom: 1px solid #525252; |
90 | box-shadow: 0 1px 0 0 #141414; | 93 | box-shadow: 0 1px 0 0 #141414; |
91 | margin-top: 4px; | 94 | margin-top: 4px; |
92 | } | 95 |