From af1c0007fffa3e9db6d11949a9ddec4bd697ee69 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Fri, 8 Jun 2012 15:57:57 -0700 Subject: Binding Panel - supply binding args to edit view --- js/panels/binding/binding-item.reel/binding-item.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'js/panels/binding/binding-item.reel/binding-item.js') diff --git a/js/panels/binding/binding-item.reel/binding-item.js b/js/panels/binding/binding-item.reel/binding-item.js index 55230fc3..a2b66008 100644 --- a/js/panels/binding/binding-item.reel/binding-item.js +++ b/js/panels/binding/binding-item.reel/binding-item.js @@ -12,6 +12,10 @@ exports.BindingItem = Montage.create(Component, { sourceObjectLabel : { value: null }, boundObjectLabel : { value: null }, + bindingArgs : { + value: null + }, + _sourceObject : { value: null }, sourceObject : { get: function() { @@ -88,7 +92,7 @@ exports.BindingItem = Montage.create(Component, { handleEditButtonAction : { value: function(e) { - this.parentComponent.parentComponent.displayEditView(); + this.parentComponent.parentComponent.displayEditView(this.bindingArgs); } }, -- cgit v1.2.3 From 9fe73eaccdd7e3d82bb4cd5326f126ee683a2d25 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Sun, 10 Jun 2012 17:22:01 -0700 Subject: Binding Panel - Direction toggle changes are savable. --- js/panels/binding/binding-item.reel/binding-item.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'js/panels/binding/binding-item.reel/binding-item.js') diff --git a/js/panels/binding/binding-item.reel/binding-item.js b/js/panels/binding/binding-item.reel/binding-item.js index a2b66008..2dad2aaf 100644 --- a/js/panels/binding/binding-item.reel/binding-item.js +++ b/js/panels/binding/binding-item.reel/binding-item.js @@ -77,7 +77,9 @@ exports.BindingItem = Montage.create(Component, { }, set: function(value) { if(value === this._oneway) { return; } + this._oneway = value; + this.needsDraw = true; } }, @@ -87,6 +89,10 @@ exports.BindingItem = Montage.create(Component, { handleDirectionToggleButtonAction : { value: function(e) { this.oneway = !this.oneway; + this.application.ninja.objectsController.editBinding(this.bindingArgs, { + oneway: !this.bindingArgs.oneway + }); + this.application.ninja.objectsController. } }, -- cgit v1.2.3 From 7b5b65fc9183026633d97c310cbe6500082be8dd Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Mon, 11 Jun 2012 07:17:11 -0700 Subject: Binding Item - Direction Toggle button calls controller --- js/panels/binding/binding-item.reel/binding-item.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'js/panels/binding/binding-item.reel/binding-item.js') diff --git a/js/panels/binding/binding-item.reel/binding-item.js b/js/panels/binding/binding-item.reel/binding-item.js index 2dad2aaf..a1017020 100644 --- a/js/panels/binding/binding-item.reel/binding-item.js +++ b/js/panels/binding/binding-item.reel/binding-item.js @@ -88,11 +88,13 @@ exports.BindingItem = Montage.create(Component, { handleDirectionToggleButtonAction : { value: function(e) { + var controller = this.application.ninja.objectsController; + this.oneway = !this.oneway; - this.application.ninja.objectsController.editBinding(this.bindingArgs, { + controller.editBinding(this.bindingArgs, { oneway: !this.bindingArgs.oneway }); - this.application.ninja.objectsController. + controller.currentItem = controller.currentItem; } }, -- cgit v1.2.3