no iHover container div

This commit is contained in:
James Campos 2011-07-20 14:24:21 -07:00
parent a064101244
commit db856d775b
2 changed files with 25 additions and 28 deletions

View File

@ -2445,20 +2445,15 @@
};
imgHover = {
init: function() {
imgHover.el = $.el('div', {
id: 'iHover'
return g.callbacks.push(function(root) {
var thumb;
if (!(thumb = $('img[md5]', root))) {
return;
}
$.bind(thumb, 'mouseover', imgHover.mouseover);
$.bind(thumb, 'mousemove', ui.hover);
return $.bind(thumb, 'mouseout', imgHover.mouseout);
});
$.append(d.body, imgHover.el);
return g.callbacks.push(imgHover.node);
},
node: function(root) {
var thumb;
if (!(thumb = $('img[md5]', root))) {
return;
}
$.bind(thumb, 'mouseover', imgHover.mouseover);
$.bind(thumb, 'mousemove', ui.hover);
return $.bind(thumb, 'mouseout', imgHover.mouseout);
},
mouseover: function(e) {
/*
@ -2468,13 +2463,15 @@
instead of manipulating src, we manipulate the entire img
*/ var img;
img = $.el('img', {
id: 'iHover',
src: this.parentNode.href
});
$.append(imgHover.el, img);
return ui.el = imgHover.el;
imgHover.img = img;
ui.el = img;
return $.append(d.body, img);
},
mouseout: function(e) {
return $.rm(imgHover.el.firstChild);
return $.rm(imgHover.img);
}
};
imgPreloading = {

View File

@ -1847,14 +1847,11 @@ nodeInserted = (e) ->
imgHover =
init: ->
imgHover.el = $.el 'div', id: 'iHover'
$.append d.body, imgHover.el
g.callbacks.push imgHover.node
node: (root) ->
return unless thumb = $ 'img[md5]', root
$.bind thumb, 'mouseover', imgHover.mouseover
$.bind thumb, 'mousemove', ui.hover
$.bind thumb, 'mouseout', imgHover.mouseout
g.callbacks.push (root) ->
return unless thumb = $ 'img[md5]', root
$.bind thumb, 'mouseover', imgHover.mouseover
$.bind thumb, 'mousemove', ui.hover
$.bind thumb, 'mouseout', imgHover.mouseout
mouseover: (e) ->
###
http://code.google.com/p/chromium/issues/detail?id=36142
@ -1862,11 +1859,14 @@ imgHover =
instead of manipulating src, we manipulate the entire img
###
img = $.el 'img', src: @parentNode.href
$.append imgHover.el, img
ui.el = imgHover.el
img = $.el 'img'
id: 'iHover'
src: @parentNode.href
imgHover.img = img
ui.el = img
$.append d.body, img
mouseout: (e) ->
$.rm imgHover.el.firstChild
$.rm imgHover.img
imgPreloading =
init: ->