Browse Source

Cleans up SVG logic #3774

pull/3792/head
Jack Lukic 8 years ago
parent
commit
ccfb0cda10
1 changed files with 9 additions and 1 deletions
  1. 10
      src/definitions/modules/popup.js

10
src/definitions/modules/popup.js

@ -370,6 +370,11 @@ $.fn.popup = function(parameters) {
return true;
}
},
supports: {
SVG: function() {
return (typeof SVGGraphicsElement === undefined);
}
},
animate: {
show: function(callback) {
callback = $.isFunction(callback) ? callback : function(){};
@ -697,7 +702,7 @@ $.fn.popup = function(parameters) {
popup = calculations.popup;
parent = calculations.parent;
if(target.width === 0 && target.height === 0 && SVGGraphicsElement && !(target.element instanceof SVGGraphicsElement)) {
if(target.width === 0 && target.height === 0 && !module.is.SVG(target.element)) {
module.debug('Popup target is hidden, no action taken');
return false;
}
@ -1008,6 +1013,9 @@ $.fn.popup = function(parameters) {
return false;
}
},
svg: function(element) {
return module.supports.SVG() && (element instanceof SVGGraphicsElement);
},
active: function() {
return $module.hasClass(className.active);
},

Loading…
Cancel
Save