aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Guzman2012-02-13 10:27:27 -0800
committerEric Guzman2012-02-13 10:27:27 -0800
commit586c3f7bbea04e62638e5ed8cdce9933e88c0b67 (patch)
treebb083f81852c3c8a4bb7789c74c9a9994613d854
parent0aab9ab253550ddcda2f465cd7bbd7e737d44b3f (diff)
downloadninja-586c3f7bbea04e62638e5ed8cdce9933e88c0b67.tar.gz
Presets - Committing half-baked drag and drop
-rw-r--r--js/panels/presets/style-presets.reel/style-presets.html1
-rw-r--r--js/panels/presets/style-presets.reel/style-presets.js11
2 files changed, 11 insertions, 1 deletions
diff --git a/js/panels/presets/style-presets.reel/style-presets.html b/js/panels/presets/style-presets.reel/style-presets.html
index 58af617f..b5c40d9c 100644
--- a/js/panels/presets/style-presets.reel/style-presets.html
+++ b/js/panels/presets/style-presets.reel/style-presets.html
@@ -40,6 +40,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
40 "element" : {"#": "libraryContainer"}, 40 "element" : {"#": "libraryContainer"},
41 "branchComponent" : {"@": "branch" }, 41 "branchComponent" : {"@": "branch" },
42 "contentController": {"@": "presetsController"}, 42 "contentController": {"@": "presetsController"},
43 "activationEvent" : "dblclick",
43 "showRoot" : false 44 "showRoot" : false
44 } 45 }
45 }, 46 },
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, {
79// }); 79// });
80 } 80 }
81 }, 81 },
82 applyPresetSelection : { 82 handleNodeActivation: {
83 value: function(presetData) { 83 value: function(presetData) {
84 var selection = this.application.ninja.selectedElements, 84 var selection = this.application.ninja.selectedElements,
85 self = this; 85 self = this;
86 86
87 if(!selection || !selection.length || selection.length === 0) {
88 return false;
89 }
90
87 function setStopRuleSelector(selector) { 91 function setStopRuleSelector(selector) {
88 self.application.ninja 92 self.application.ninja
89 .currentDocument.documentRoot 93 .currentDocument.documentRoot
@@ -106,6 +110,11 @@ exports.StylesLibrary = Montage.create(Component, {
106 110
107 } 111 }
108 }, 112 },
113 handleDragEnd : {
114 value: function(sourceObject) {
115 console.log(sourceObject);
116 }
117 },
109 shouldChangeSelection : { 118 shouldChangeSelection : {
110 value : function(controller, newSelection, oldSelection) { 119 value : function(controller, newSelection, oldSelection) {
111 // 120 //