Don't error if the image has loaded when it's not hovering anymore.

This commit is contained in:
Nicolas Stepien 2012-02-19 21:54:25 +01:00
parent b01dfd42dd
commit 07f6a586a5
2 changed files with 2 additions and 0 deletions

View File

@ -3313,6 +3313,7 @@
}, },
load: function() { load: function() {
var style; var style;
if (this !== ui.el) return;
style = this.style; style = this.style;
return ui.hover({ return ui.hover({
clientX: -45 + parseInt(style.left), clientX: -45 + parseInt(style.left),

View File

@ -2608,6 +2608,7 @@ imgHover =
$.on @, 'mousemove', ui.hover $.on @, 'mousemove', ui.hover
$.on @, 'mouseout', imgHover.mouseout $.on @, 'mouseout', imgHover.mouseout
load: -> load: ->
return if @ isnt ui.el
# 'Fake' mousemove event by giving required values. # 'Fake' mousemove event by giving required values.
{style} = @ {style} = @
ui.hover ui.hover