From 586c3f7bbea04e62638e5ed8cdce9933e88c0b67 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Mon, 13 Feb 2012 10:27:27 -0800 Subject: Presets - Committing half-baked drag and drop --- js/panels/presets/style-presets.reel/style-presets.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'js/panels/presets/style-presets.reel/style-presets.js') diff --git a/js/panels/presets/style-presets.reel/style-presets.js b/js/panels/presets/style-presets.reel/style-presets.js index 3a71c344..f25c8067 100644 --- a/js/panels/presets/style-presets.reel/style-presets.js +++ b/js/panels/presets/style-presets.reel/style-presets.js @@ -79,11 +79,15 @@ exports.StylesLibrary = Montage.create(Component, { // }); } }, - applyPresetSelection : { + handleNodeActivation: { value: function(presetData) { var selection = this.application.ninja.selectedElements, self = this; + if(!selection || !selection.length || selection.length === 0) { + return false; + } + function setStopRuleSelector(selector) { self.application.ninja .currentDocument.documentRoot @@ -106,6 +110,11 @@ exports.StylesLibrary = Montage.create(Component, { } }, + handleDragEnd : { + value: function(sourceObject) { + console.log(sourceObject); + } + }, shouldChangeSelection : { value : function(controller, newSelection, oldSelection) { // -- cgit v1.2.3