alloy-widget-nl.fokkezb.drawer
Advanced tools
Comparing version 1.1.2 to 1.1.3
@@ -296,11 +296,11 @@ var args = arguments[0] || {}; | ||
$.on = function (event, callback, context) { | ||
return $.instance.addEventListener(event, callback); | ||
return $.instance.addEventListener(translateEvent(event), callback); | ||
}; | ||
$.off = function (event, callback, context) { | ||
return $.instance.removeEventListener(event, callback); | ||
return $.instance.removeEventListener(translateEvent(event), callback); | ||
}; | ||
$.trigger = function (event, args) { | ||
return $.instance.fireEvent(event, args); | ||
return $.instance.fireEvent(translateEvent(event), args); | ||
}; | ||
@@ -349,1 +349,27 @@ | ||
}); | ||
function translateEvent(event) { | ||
if (mod === 'dk.napp.drawer') { | ||
if (event === 'draweropen') { | ||
event = 'windowDidOpen'; | ||
} | ||
if (event === 'drawerclose') { | ||
event = 'windowDidClose'; | ||
} | ||
} else { | ||
if (event === 'windowDidOpen') { | ||
event = 'draweropen'; | ||
} | ||
if (event === 'windowDidClose') { | ||
event = 'drawerclose'; | ||
} | ||
} | ||
return event; | ||
} |
{ | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "An Alloy widget wrapping the NappDrawer and DrawerLayout module for Facebook-like sliding side menus.", | ||
@@ -4,0 +4,0 @@ "author": "Fokke Zandbergen", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19012
317