diff options
author | Nivesh Rajbhandari | 2012-02-10 15:14:35 -0800 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-02-10 15:14:35 -0800 |
commit | de65f73c0f129a26aa9007b69e8fce31d0e92d00 (patch) | |
tree | e0fd4bbc44b96909d7619593b29d9b063209a7ce /js/mediators | |
parent | 9e40945a5bf4330d1088b56b8011ee625b1adab9 (diff) | |
parent | 48977780443d97b9e97b047066639c9056788041 (diff) | |
download | ninja-de65f73c0f129a26aa9007b69e8fce31d0e92d00.tar.gz |
Merge branch 'refs/heads/ninja-internal' into WebGLFixes
Diffstat (limited to 'js/mediators')
-rw-r--r-- | js/mediators/element-mediator.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/js/mediators/element-mediator.js b/js/mediators/element-mediator.js index 9aefbca6..95aec2a3 100644 --- a/js/mediators/element-mediator.js +++ b/js/mediators/element-mediator.js | |||
@@ -105,6 +105,25 @@ exports.ElementMediator = Montage.create(NJComponent, { | |||
105 | } | 105 | } |
106 | }, | 106 | }, |
107 | 107 | ||
108 | deleteElements: { | ||
109 | value: function(items) { | ||
110 | // Add the Undo/Redo | ||
111 | var len, el; | ||
112 | |||
113 | len = items.length; | ||
114 | |||
115 | if(len) { | ||
116 | |||
117 | for(var i = len - 1; i >= 0; i--) { | ||
118 | el = items[i]._element || items[i]; | ||
119 | this._removeElement(el); | ||
120 | } | ||
121 | |||
122 | NJevent( "deleteSelection", items ); | ||
123 | } | ||
124 | } | ||
125 | }, | ||
126 | |||
108 | _removeElement: { | 127 | _removeElement: { |
109 | value: function(el, rules) { | 128 | value: function(el, rules) { |
110 | ElementController.removeElement(el, rules); | 129 | ElementController.removeElement(el, rules); |