Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
army8735 committed Aug 22, 2022
1 parent 6186d37 commit 0bf3e45
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 58 deletions.
25 changes: 6 additions & 19 deletions index.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -17836,22 +17836,12 @@ function traversal(list, length, diff, after) {
if (after) {
for (var i = 0; i < length; i++) {
var item = list[i];

if (item[1]) {
item[1](diff);
} else {
item.__after && item.__after(diff);
}
item.__after && item.__after(diff);
}
} else {
for (var _i = 0; _i < length; _i++) {
var _item = list[_i];

if (_item[0]) {
_item[0](diff);
} else {
_item.__before && _item.__before(diff);
}
_item.__before && _item.__before(diff);
}
}
}
Expand Down Expand Up @@ -18618,7 +18608,7 @@ function calDiff(prev, next, k, target, tagName) {
return;
}

res[1] = [n[0] - n[0], n[1] - p[1], n[2] - p[2], [n[3][0] - p[3][0], n[3][1]]];
res[1] = [n[0] - p[0], n[1] - p[1], n[2] - p[2], [n[3][0] - p[3][0], n[3][1]]];
} else if (k === FILTER$4) {
// filter很特殊,里面有多个滤镜,按顺序计算,为空视为默认值,如blur默认0,brightness默认1
var len = Math.max(p ? p.length : 0, n ? n.length : 0);
Expand Down Expand Up @@ -18652,7 +18642,7 @@ function calDiff(prev, next, k, target, tagName) {
if (a[1] === b[1]) {
_v.push(b[0] - a[0]);
} else {
_v.push(calByUnit(a, b, _i === 1 ? taraget.clientHeight : target.clientWidth, target.root));
_v.push(calByUnit(a, b, _i === 1 ? target.clientHeight : target.clientWidth, target.root));
}
}

Expand Down Expand Up @@ -19803,10 +19793,7 @@ var Animation = /*#__PURE__*/function (_Event) {
'alternate-reverse': true
}.hasOwnProperty(op.direction) ? framesR : frames; // 时间戳

config[I_TIME_STAMP] = frame.__now; // 性能优化访问

_this[0] = _this.__before;
_this[1] = _this.__after;
config[I_TIME_STAMP] = frame.__now;
return _this;
}

Expand Down Expand Up @@ -41918,7 +41905,7 @@ var refresh = {
Cache: Cache
};

var version = "0.78.2";
var version = "0.78.3";

Geom.register('$line', Line);
Geom.register('$polyline', Polyline);
Expand Down
2 changes: 1 addition & 1 deletion index.es.js.map

Large diffs are not rendered by default.

25 changes: 6 additions & 19 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17842,22 +17842,12 @@
if (after) {
for (var i = 0; i < length; i++) {
var item = list[i];

if (item[1]) {
item[1](diff);
} else {
item.__after && item.__after(diff);
}
item.__after && item.__after(diff);
}
} else {
for (var _i = 0; _i < length; _i++) {
var _item = list[_i];

if (_item[0]) {
_item[0](diff);
} else {
_item.__before && _item.__before(diff);
}
_item.__before && _item.__before(diff);
}
}
}
Expand Down Expand Up @@ -18624,7 +18614,7 @@
return;
}

res[1] = [n[0] - n[0], n[1] - p[1], n[2] - p[2], [n[3][0] - p[3][0], n[3][1]]];
res[1] = [n[0] - p[0], n[1] - p[1], n[2] - p[2], [n[3][0] - p[3][0], n[3][1]]];
} else if (k === FILTER$4) {
// filter很特殊,里面有多个滤镜,按顺序计算,为空视为默认值,如blur默认0,brightness默认1
var len = Math.max(p ? p.length : 0, n ? n.length : 0);
Expand Down Expand Up @@ -18658,7 +18648,7 @@
if (a[1] === b[1]) {
_v.push(b[0] - a[0]);
} else {
_v.push(calByUnit(a, b, _i === 1 ? taraget.clientHeight : target.clientWidth, target.root));
_v.push(calByUnit(a, b, _i === 1 ? target.clientHeight : target.clientWidth, target.root));
}
}

Expand Down Expand Up @@ -19809,10 +19799,7 @@
'alternate-reverse': true
}.hasOwnProperty(op.direction) ? framesR : frames; // 时间戳

config[I_TIME_STAMP] = frame.__now; // 性能优化访问

_this[0] = _this.__before;
_this[1] = _this.__after;
config[I_TIME_STAMP] = frame.__now;
return _this;
}

Expand Down Expand Up @@ -41924,7 +41911,7 @@
Cache: Cache
};

var version = "0.78.2";
var version = "0.78.3";

Geom.register('$line', Line);
Geom.register('$polyline', Polyline);
Expand Down
2 changes: 1 addition & 1 deletion index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "karas",
"version": "0.78.2",
"version": "0.78.3",
"description": "A flexible JavaScript framework for RIA on Canvas/Svg/Webgl.",
"maintainers": [
{
Expand Down
7 changes: 2 additions & 5 deletions src/animate/Animation.js
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ function calDiff(prev, next, k, target, tagName) {
if(equalArr(p, n)) {
return;
}
res[1] = [n[0] - n[0], n[1] - p[1], n[2] - p[2], [n[3][0] - p[3][0], n[3][1]]];
res[1] = [n[0] - p[0], n[1] - p[1], n[2] - p[2], [n[3][0] - p[3][0], n[3][1]]];
}
else if(k === FILTER) {
// filter很特殊,里面有多个滤镜,按顺序计算,为空视为默认值,如blur默认0,brightness默认1
Expand Down Expand Up @@ -511,7 +511,7 @@ function calDiff(prev, next, k, target, tagName) {
v2.push(b[0] - a[0]);
}
else {
v2.push(calByUnit(a, b, i === 1 ? taraget.clientHeight: target.clientWidth, target.root));
v2.push(calByUnit(a, b, i === 1 ? target.clientHeight: target.clientWidth, target.root));
}
}
v2.push([
Expand Down Expand Up @@ -1615,9 +1615,6 @@ class Animation extends Event {
}.hasOwnProperty(op.direction) ? framesR : frames;
// 时间戳
config[I_TIME_STAMP] = frame.__now;
// 性能优化访问
this[0] = this.__before;
this[1] = this.__after;
}

__init(list, iterations, duration, easing, target) {
Expand Down
14 changes: 2 additions & 12 deletions src/animate/frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,13 @@ function traversal(list, length, diff, after) {
if(after) {
for(let i = 0; i < length; i++) {
let item = list[i];
if(item[1]) {
item[1](diff);
}
else {
item.__after && item.__after(diff);
}
item.__after && item.__after(diff);
}
}
else {
for(let i = 0; i < length; i++) {
let item = list[i];
if(item[0]) {
item[0](diff);
}
else {
item.__before && item.__before(diff);
}
item.__before && item.__before(diff);
}
}
}
Expand Down

0 comments on commit 0bf3e45

Please sign in to comment.