aboutsummaryrefslogtreecommitdiff
path: root/js/panels/presets/transitions-presets.reel/transitions-presets.js
diff options
context:
space:
mode:
authorEric Guzman2012-04-02 15:36:08 -0700
committerEric Guzman2012-04-02 15:36:08 -0700
commit0241bf331b7e06e206a54be441edf2f4c7261f63 (patch)
treeb7e2f9cad73eed4fc616cf1841cd0be02bd955d4 /js/panels/presets/transitions-presets.reel/transitions-presets.js
parentdde5b5054f93db493e5d4d502e677f5781334b08 (diff)
parentc6de22bf42be90b403491b5f87b1818d9020310c (diff)
downloadninja-0241bf331b7e06e206a54be441edf2f4c7261f63.tar.gz
Merge branch 'refs/heads/master' into CSSPanelUpdates
Diffstat (limited to 'js/panels/presets/transitions-presets.reel/transitions-presets.js')
-rw-r--r--js/panels/presets/transitions-presets.reel/transitions-presets.js20
1 files changed, 1 insertions, 19 deletions
diff --git a/js/panels/presets/transitions-presets.reel/transitions-presets.js b/js/panels/presets/transitions-presets.reel/transitions-presets.js
index f7d84085..ace38dbb 100644
--- a/js/panels/presets/transitions-presets.reel/transitions-presets.js
+++ b/js/panels/presets/transitions-presets.reel/transitions-presets.js
@@ -22,25 +22,7 @@ exports.TransitionsLibrary = Montage.create(Component, {
22 }, 22 },
23 handleNodeActivation: { 23 handleNodeActivation: {
24 value: function(presetData) { 24 value: function(presetData) {
25 var selection = this.application.ninja.selectedElements, 25 this.application.ninja.presetsController.applyPreset(presetData);
26 stylesController = this.application.ninja.stylesController,
27 selectorBase = presetData.selectorBase,
28 self = this;
29
30 if(!selection || !selection.length || selection.length === 0) {
31 return false;
32 }
33
34 selectorBase = stylesController.generateClassName(selectorBase);
35
36 presetData.rules.forEach(function(rule) {
37 this.application.ninja.stylesController.addRule('.' + selectorBase + rule.selectorSuffix, rule.styles);
38 }, this);
39
40 selection.forEach(function(el) {
41 el._element.classList.add(selectorBase);
42 }, this);
43
44 } 26 }
45 } 27 }
46}); 28});