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
merged 3 commits into from Feb 26, 2016
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -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
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.