mirror of https://github.com/luileito/jsketch.git
Fixed event override
This commit is contained in:
parent
ab5059514c
commit
1bc04f757e
|
|
@ -179,8 +179,8 @@
|
||||||
// A helper function to override user-defined event listeners.
|
// A helper function to override user-defined event listeners.
|
||||||
function override(ev) {
|
function override(ev) {
|
||||||
// Flag event override so that it doesn't get fired more than once.
|
// Flag event override so that it doesn't get fired more than once.
|
||||||
if (config.options.$$bound) return;
|
if (config.options[ev + '$bound']) return;
|
||||||
config.options.$$bound = true;
|
config.options[ev + '$bound'] = true;
|
||||||
|
|
||||||
if (config.options.events && typeof config.options.events[ev] === 'function') {
|
if (config.options.events && typeof config.options.events[ev] === 'function') {
|
||||||
// User has defined this event, so wrap it.
|
// User has defined this event, so wrap it.
|
||||||
|
|
|
||||||
|
|
@ -182,8 +182,8 @@
|
||||||
// A helper function to override user-defined event listeners.
|
// A helper function to override user-defined event listeners.
|
||||||
function override(ev) {
|
function override(ev) {
|
||||||
// Flag event override so that it doesn't get fired more than once.
|
// Flag event override so that it doesn't get fired more than once.
|
||||||
if (config.options.$$bound) return;
|
if (config.options[ev + '$bound']) return;
|
||||||
config.options.$$bound = true;
|
config.options[ev + '$bound'] = true;
|
||||||
|
|
||||||
if (config.options.events && typeof config.options.events[ev] === 'function') {
|
if (config.options.events && typeof config.options.events[ev] === 'function') {
|
||||||
// User has defined this event, so wrap it.
|
// User has defined this event, so wrap it.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue