From 307a55d74e1ecd448ec1c5f8073dd7cd81be961f Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Sun, 10 Jun 2012 16:34:14 -0700 Subject: Binding Panel Toolbar - Add action handler --- js/panels/binding-panel.reel/binding-panel.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'js/panels') diff --git a/js/panels/binding-panel.reel/binding-panel.js b/js/panels/binding-panel.reel/binding-panel.js index 3b20a88f..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, { bindings : { value: null }, editView : { value: null }, - editingClass : { value: 'editing-binding' }, _editing: { value: null }, editing: { get: function() { @@ -30,9 +29,21 @@ exports.BindingPanel = Montage.create(Component, { }, /* ------------------------- - Draw Cycle + Toolbar Button Actions ------------------------- */ + handleAddAction : { + value: function(e) { + var newBindingArgs = { + sourceObject : this.application.ninja.objectsController.currentObject + }; + + this.displayEditView(newBindingArgs); + } + }, + + + templateDidLoad : { value: function() { Object.defineBinding(this, 'bindings', { @@ -57,8 +68,10 @@ exports.BindingPanel = Montage.create(Component, { if(this.editing) { this.editView.element.style.setProperty(transStr, 'translate3d(-'+ this._translateDistance + 'px,0,0)'); + this.editView.element.style.setProperty('box-shadow', '0 0 10px rgba(0,0,0,0.2)') } else { this.editView.element.style.removeProperty(transStr); + this.editView.element.style.removeProperty('box-shadow'); } } } -- cgit v1.2.3