aboutsummaryrefslogtreecommitdiffstats
path: root/dist/svg.js
diff options
context:
space:
mode:
Diffstat (limited to 'dist/svg.js')
-rwxr-xr-xdist/svg.js22
1 files changed, 18 insertions, 4 deletions
diff --git a/dist/svg.js b/dist/svg.js
index 37d3b01..ea2672c 100755
--- a/dist/svg.js
+++ b/dist/svg.js
@@ -6,7 +6,7 @@
* @copyright Wout Fierens <wout@impinc.co.uk>
* @license MIT
*
-* BUILT: Mon Jun 15 2015 16:36:12 GMT+0200 (Mitteleuropäische Sommerzeit)
+* BUILT: Wed Jun 17 2015 15:45:48 GMT+0200 (Mitteleuropäische Sommerzeit)
*/;
(function(root, factory) {
@@ -2345,8 +2345,8 @@ SVG.off = function(node, event, listener) {
delete SVG.listeners[index][ev][ns || '*'][listener]
}
- } else if (ns) {
- // remove all listeners for the namespaced event
+ } else if (ns && ev) {
+ // remove all listeners for a namespaced event
if (SVG.listeners[index][ev] && SVG.listeners[index][ev][ns]) {
for (listener in SVG.listeners[index][ev][ns])
SVG.off(node, [ev, ns].join('.'), listener)
@@ -2354,6 +2354,16 @@ SVG.off = function(node, event, listener) {
delete SVG.listeners[index][ev][ns]
}
+ } else if (ns){
+ // remove all listeners for a specific namespace
+ for(event in SVG.listeners[index]){
+ for(namespace in SVG.listeners[index][event]){
+ if(ns === namespace){
+ SVG.off(node, [event, ns].join('.'))
+ }
+ }
+ }
+
} else if (ev) {
// remove all listeners for the event
if (SVG.listeners[index][ev]) {
@@ -2391,7 +2401,11 @@ SVG.extend(SVG.Element, {
, fire: function(event, data) {
// Dispatch event
- this.node.dispatchEvent(new CustomEvent(event, {detail:data}))
+ if(event instanceof Event){
+ this.node.dispatchEvent(event)
+ }else{
+ this.node.dispatchEvent(new CustomEvent(event, {detail:data}))
+ }
return this
}