Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide for hoverbuttons on src-less img elements with data-pin-media #61

merged 3 commits into from Feb 26, 2016
Changes from all commits
File filter

Filter by extension

Filter by extension

Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -720,7 +720,7 @@
c.round = true;

// size > 120x120 and source is not a data: uri?
// size > 120x120?
if (el.height > $.a.hoverButtonMinImgSize && el.width > $.a.hoverButtonMinImgSize) {

// make it fresh each time; this pays attention to individual image config options
@@ -778,11 +778,12 @@

// mouse over; only active if we have hoverbuttons
over: function (v) {
var t, el;
var t, el, src;
t = v || $.w.event;
el = $.f.getEl(t);
if (el) {
if (el.tagName === 'IMG' && el.src && !el.src.match(/^data/) && !$.f.getData(el, 'no-hover') && !$.f.get(el, 'nopin') && !$.f.getData(el, 'nopin')) {
src = $.f.getData(el, 'media') || el.src;
if (el.tagName === 'IMG' && src && !src.match(/^data/) && !$.f.getData(el, 'no-hover') && !$.f.get(el, 'nopin') && !$.f.getData(el, 'nopin')) {
// we are inside an image
if (!$.v.hazHoverButton) {
// show the hoverbutton