This commit is contained in:
zhutianqi
2021-06-09 17:57:44 +08:00
parent ed6a3e2c1d
commit 98f888c251
16 changed files with 1248 additions and 839 deletions
@@ -86,7 +86,7 @@ function augment(obj) {
// handle old IE implementation
} else if (el.attachEvent) {
wrappedFn = function (e) {
fn.call(el, e);
};
@@ -148,7 +148,7 @@ function augment(obj) {
preventDefault = function () {
args.defaultPrevented = true;
};
for (i = 0; i < len; i++) {
fn = events[i];
@@ -159,8 +159,8 @@ function augment(obj) {
args.preventDefault = preventDefault;
args.target = target;
args.type = name; // #2297
args.type = name; // #2297
// If the event handler return false, prevent the default handler from executing
if (fn.call(this, args) === false) {
args.preventDefault();
@@ -181,7 +181,7 @@ return {
init: function (pathAnim) {
/**
* Compatibility section to add support for legacy IE. This can be removed if old IE
* Compatibility section to add support for legacy IE. This can be removed if old IE
* support is not needed.
*/
if (!doc.defaultView) {
@@ -197,15 +197,15 @@ return {
val = el.currentStyle[prop.replace(/\-(\w)/g, function (a, b) { return b.toUpperCase(); })];
if (prop === 'filter') {
val = val.replace(
/alpha\(opacity=([0-9]+)\)/,
function (a, b) {
return b / 100;
/alpha\(opacity=([0-9]+)\)/,
function (a, b) {
return b / 100;
}
);
}
/*jslint unparam: false*/
return val === '' ? 1 : val;
}
}
};
this.adapterRun = function (elem, method) {
var alias = { width: 'clientWidth', height: 'clientHeight' }[method];
@@ -219,7 +219,7 @@ return {
if (!Array.prototype.forEach) {
this.each = function (arr, fn) { // legacy
var i = 0,
var i = 0,
len = arr.length;
for (; i < len; i++) {
if (fn.call(arr[i], arr[i], i, arr) === false) {
@@ -231,12 +231,12 @@ return {
if (!Array.prototype.indexOf) {
this.inArray = function (item, arr) {
var len,
var len,
i = 0;
if (arr) {
len = arr.length;
for (; i < len; i++) {
if (arr[i] === item) {
return i;
@@ -276,7 +276,7 @@ return {
this.prop = prop;
};
Fx.prototype = {
update: function () {
var styles,
paths = this.paths,
@@ -285,8 +285,8 @@ return {
// Animating a path definition on SVGElement
if (paths && elemelem) {
elem.attr('d', pathAnim.step(paths[0], paths[1], this.now, this.toD));
elem.attr('d', pathAnim.step1(paths[0], paths[1], this.now, this.toD));
// Other animations on SVGElement
} else if (elem.attr) {
if (elemelem) {
@@ -299,9 +299,9 @@ return {
styles[elem] = this.now + this.unit;
Highcharts.css(elem, styles);
}
if (this.options.step) {
this.options.step.call(this.elem, this.now, this);
if (this.options.step1) {
this.options.step1.call(this.elem, this.now, this);
}
},
@@ -323,7 +323,7 @@ return {
if (t() && timers.push(t) === 1) {
timerId = setInterval(function () {
for (i = 0; i < timers.length; i++) {
if (!timers[i]()) {
timers.splice(i--, 1);
@@ -336,7 +336,7 @@ return {
}, 13);
}
},
step: function (gotoEnd) {
var t = +new Date(),
ret,
@@ -406,11 +406,11 @@ return {
}
opt.easing = Math[opt.easing] || Math.easeInOutSine;
opt.curAnim = Highcharts.extend({}, prop);
for (name in prop) {
fx = new Fx(el, opt, name);
end = null;
if (name === 'd') {
fx.paths = pathAnim.init(
el,
@@ -428,12 +428,12 @@ return {
unit = 'px';
}
}
if (!end) {
end = parseFloat(prop[name]);
}
fx.custom(start, end, unit);
}
}
};
},