always update .data('hover-func') because data.coordmap may change

see the bug report at https://groups.google.com/forum/#!topic/shiny-discuss/K6pVtqGguBE
This commit is contained in:
Yihui Xie
2013-09-24 12:25:25 -05:00
parent 004b7c782d
commit 6161eaa841

View File

@@ -1077,13 +1077,11 @@
}
};
if (!$el.data('hover-func')) {
var hoverDelayType = $el.data('hover-delay-type') || 'debounce';
var delayFunc = (hoverDelayType === 'throttle') ? throttle : debounce;
var hoverFunc = delayFunc($el.data('hover-delay') || 300,
createMouseHandler(hoverId));
$el.data('hover-func', hoverFunc);
}
var hoverDelayType = $el.data('hover-delay-type') || 'debounce';
var delayFunc = (hoverDelayType === 'throttle') ? throttle : debounce;
var hoverFunc = delayFunc($el.data('hover-delay') || 300,
createMouseHandler(hoverId));
$el.data('hover-func', hoverFunc);
if (clickId)
$(img).on('mousedown', createMouseHandler(clickId));