upgrade eslint and associated fixes
don't keep ie() by the way
This commit is contained in:
@@ -30,7 +30,6 @@ const svg = document.createElementNS(NS.SVG, 'svg');
|
||||
const isOpera_ = Boolean(window.opera);
|
||||
const isWebkit_ = userAgent.includes('AppleWebKit');
|
||||
const isGecko_ = userAgent.includes('Gecko/');
|
||||
const isIE_ = userAgent.includes('MSIE');
|
||||
const isChrome_ = userAgent.includes('Chrome/');
|
||||
const isWindows_ = userAgent.includes('Windows');
|
||||
const isMac_ = userAgent.includes('Macintosh');
|
||||
@@ -165,11 +164,6 @@ export const isWebkit = () => isWebkit_;
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export const isGecko = () => isGecko_;
|
||||
/**
|
||||
* @function module:browser.isIE
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export const isIE = () => isIE_;
|
||||
/**
|
||||
* @function module:browser.isChrome
|
||||
* @returns {boolean}
|
||||
|
||||
@@ -230,13 +230,8 @@ export const convertAttrs = function (element) {
|
||||
for (let i = 0; i < len; i++) {
|
||||
const attr = attrs[i];
|
||||
const cur = element.getAttribute(attr);
|
||||
if (cur) {
|
||||
if (!isNaN(cur)) {
|
||||
element.setAttribute(attr, (cur / typeMap_[unit]) + unit);
|
||||
}
|
||||
// else {
|
||||
// Convert existing?
|
||||
// }
|
||||
if (cur && !isNaN(cur)) {
|
||||
element.setAttribute(attr, (cur / typeMap_[unit]) + unit);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -679,10 +679,8 @@ export const getBBox = function (elem) {
|
||||
} else {
|
||||
// Check if element is child of a foreignObject
|
||||
const fo = $(selected).closest('foreignObject');
|
||||
if (fo.length) {
|
||||
if (fo[0].getBBox) {
|
||||
ret = fo[0].getBBox();
|
||||
}
|
||||
if (fo.length && fo[0].getBBox) {
|
||||
ret = fo[0].getBBox();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user