aboutsummaryrefslogtreecommitdiff
path: root/js/panels/binding-panel.reel/binding-panel.js
diff options
context:
space:
mode:
authorArmen Kesablyan2012-06-11 10:25:49 -0700
committerArmen Kesablyan2012-06-11 10:25:49 -0700
commitaaac232727c82361771a0804049ada8fae17a549 (patch)
treecd9110dacb9e39e98a5d8bbd7f1dad2780cbcc1a /js/panels/binding-panel.reel/binding-panel.js
parent6a27268ebf1cd5fa7bf8313eb5712fd5f6985758 (diff)
parentdbb36888eda1f25387852ea79aef89d22dfd7799 (diff)
downloadninja-aaac232727c82361771a0804049ada8fae17a549.tar.gz
Merge pull request #11 from ericguzman/binding
Binding
Diffstat (limited to 'js/panels/binding-panel.reel/binding-panel.js')
-rw-r--r--js/panels/binding-panel.reel/binding-panel.js18
1 files changed, 16 insertions, 2 deletions
diff --git a/js/panels/binding-panel.reel/binding-panel.js b/js/panels/binding-panel.reel/binding-panel.js
index c2ce556c..0641ecf5 100644
--- a/js/panels/binding-panel.reel/binding-panel.js
+++ b/js/panels/binding-panel.reel/binding-panel.js
@@ -6,7 +6,6 @@ exports.BindingPanel = Montage.create(Component, {
6 6
7 bindings : { value: null }, 7 bindings : { value: null },
8 editView : { value: null }, 8 editView : { value: null },
9 editingClass : { value: 'editing-binding' },
10 _editing: { value: null }, 9 _editing: { value: null },
11 editing: { 10 editing: {
12 get: function() { 11 get: function() {
@@ -24,14 +23,27 @@ exports.BindingPanel = Montage.create(Component, {
24 23
25 displayEditView : { 24 displayEditView : {
26 value: function(bindingArgs) { 25 value: function(bindingArgs) {
26 this.editView.bindingArgs = bindingArgs;
27 this.editing = true; 27 this.editing = true;
28 } 28 }
29 }, 29 },
30 30
31 /* ------------------------- 31 /* -------------------------
32 Draw Cycle 32 Toolbar Button Actions
33 ------------------------- */ 33 ------------------------- */
34 34
35 handleAddAction : {
36 value: function(e) {
37 var newBindingArgs = {
38 sourceObject : this.application.ninja.objectsController.currentObject
39 };
40
41 this.displayEditView(newBindingArgs);
42 }
43 },
44
45
46
35 templateDidLoad : { 47 templateDidLoad : {
36 value: function() { 48 value: function() {
37 Object.defineBinding(this, 'bindings', { 49 Object.defineBinding(this, 'bindings', {
@@ -56,8 +68,10 @@ exports.BindingPanel = Montage.create(Component, {
56 68
57 if(this.editing) { 69 if(this.editing) {
58 this.editView.element.style.setProperty(transStr, 'translate3d(-'+ this._translateDistance + 'px,0,0)'); 70 this.editView.element.style.setProperty(transStr, 'translate3d(-'+ this._translateDistance + 'px,0,0)');
71 this.editView.element.style.setProperty('box-shadow', '0 0 10px rgba(0,0,0,0.2)')
59 } else { 72 } else {
60 this.editView.element.style.removeProperty(transStr); 73 this.editView.element.style.removeProperty(transStr);
74 this.editView.element.style.removeProperty('box-shadow');
61 } 75 }
62 } 76 }
63 } 77 }