@visactor/vrender 0.16.12-alpha.2 → 0.16.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/dist/index.js +10 -9
- package/dist/index.min.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/package.json +4 -4
package/cjs/index.d.ts
CHANGED
package/cjs/index.js
CHANGED
|
@@ -21,5 +21,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
21
21
|
|
|
22
22
|
const vrender_core_1 = require("@visactor/vrender-core"), vrender_kits_1 = require("@visactor/vrender-kits");
|
|
23
23
|
|
|
24
|
-
exports.version = "0.16.12
|
|
24
|
+
exports.version = "0.16.12", (0, vrender_kits_1.loadAllModule)(vrender_core_1.container),
|
|
25
25
|
__exportStar(require("@visactor/vrender-core"), exports), __exportStar(require("@visactor/vrender-kits"), exports);
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yDAAmD;AACnD,yDAAuD;AAG1C,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yDAAmD;AACnD,yDAAuD;AAG1C,QAAA,OAAO,GAAG,SAAS,CAAC;AAEjC,IAAA,4BAAa,EAAC,wBAAS,CAAC,CAAC;AAEzB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import { container } from '@visactor/vrender-core';\nimport { loadAllModule } from '@visactor/vrender-kits';\n\n// 导出版本号\nexport const version = \"0.16.12\";\n\nloadAllModule(container);\n\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\n"]}
|
package/dist/index.js
CHANGED
|
@@ -3528,6 +3528,11 @@
|
|
|
3528
3528
|
function fuzzyEqualVec(a, b) {
|
|
3529
3529
|
return abs(a[0] - b[0]) + abs(a[1] - b[1]) < 1e-12;
|
|
3530
3530
|
}
|
|
3531
|
+
function getDecimalPlaces(n) {
|
|
3532
|
+
var dStr = n.toString().split(/[eE]/),
|
|
3533
|
+
s = (dStr[0].split(".")[1] || "").length - (+dStr[1] || 0);
|
|
3534
|
+
return s > 0 ? s : 0;
|
|
3535
|
+
}
|
|
3531
3536
|
|
|
3532
3537
|
var Point = /*#__PURE__*/function () {
|
|
3533
3538
|
function Point() {
|
|
@@ -9958,8 +9963,8 @@
|
|
|
9958
9963
|
}, {
|
|
9959
9964
|
key: "onBind",
|
|
9960
9965
|
value: function onBind() {
|
|
9961
|
-
var _a, _b, _c, _d, _e, _f;
|
|
9962
|
-
this.fromNumber = isNumber$2(null === (_a = this.from) || void 0 === _a ? void 0 : _a.text) ? null === (_b = this.from) || void 0 === _b ? void 0 : _b.text : Number.parseFloat(null === (_c = this.from) || void 0 === _c ? void 0 : _c.text), this.toNumber = isNumber$2(null === (_d = this.to) || void 0 === _d ? void 0 : _d.text) ? null === (_e = this.to) || void 0 === _e ? void 0 : _e.text : Number.parseFloat(null === (_f = this.to) || void 0 === _f ? void 0 : _f.text), Number.isFinite(this.toNumber) || (this.fromNumber = 0), Number.isFinite(this.toNumber) || (this.valid = !1);
|
|
9966
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
9967
|
+
this.fromNumber = isNumber$2(null === (_a = this.from) || void 0 === _a ? void 0 : _a.text) ? null === (_b = this.from) || void 0 === _b ? void 0 : _b.text : Number.parseFloat(null === (_c = this.from) || void 0 === _c ? void 0 : _c.text), this.toNumber = isNumber$2(null === (_d = this.to) || void 0 === _d ? void 0 : _d.text) ? null === (_e = this.to) || void 0 === _e ? void 0 : _e.text : Number.parseFloat(null === (_f = this.to) || void 0 === _f ? void 0 : _f.text), Number.isFinite(this.toNumber) || (this.fromNumber = 0), Number.isFinite(this.toNumber) || (this.valid = !1), !1 !== this.valid && (this.decimalLength = null !== (_h = null === (_g = this.params) || void 0 === _g ? void 0 : _g.fixed) && void 0 !== _h ? _h : Math.max(getDecimalPlaces(this.fromNumber), getDecimalPlaces(this.toNumber)));
|
|
9963
9968
|
}
|
|
9964
9969
|
}, {
|
|
9965
9970
|
key: "onEnd",
|
|
@@ -9967,11 +9972,7 @@
|
|
|
9967
9972
|
}, {
|
|
9968
9973
|
key: "onUpdate",
|
|
9969
9974
|
value: function onUpdate(end, ratio, out) {
|
|
9970
|
-
|
|
9971
|
-
if (!1 !== this.valid) if (end) out.text = this.toNumber;else {
|
|
9972
|
-
var outText = this.fromNumber + (this.toNumber - this.fromNumber) * ratio;
|
|
9973
|
-
(null === (_a = this.params) || void 0 === _a ? void 0 : _a.fixed) >= 0 && (outText = outText.toFixed(this.params.fixed)), out.text = outText;
|
|
9974
|
-
}
|
|
9975
|
+
!1 !== this.valid && (out.text = end ? this.toNumber : (this.fromNumber + (this.toNumber - this.fromNumber) * ratio).toFixed(this.decimalLength));
|
|
9975
9976
|
}
|
|
9976
9977
|
}]);
|
|
9977
9978
|
return IncreaseCount;
|
|
@@ -30240,7 +30241,7 @@
|
|
|
30240
30241
|
}, {
|
|
30241
30242
|
key: "getStaticCanvasCount",
|
|
30242
30243
|
value: function getStaticCanvasCount() {
|
|
30243
|
-
return
|
|
30244
|
+
return 999;
|
|
30244
30245
|
}
|
|
30245
30246
|
}, {
|
|
30246
30247
|
key: "loadJson",
|
|
@@ -34494,7 +34495,7 @@
|
|
|
34494
34495
|
|
|
34495
34496
|
var roughModule = _roughModule;
|
|
34496
34497
|
|
|
34497
|
-
const version = "0.16.12
|
|
34498
|
+
const version = "0.16.12";
|
|
34498
34499
|
loadAllModule(container);
|
|
34499
34500
|
|
|
34500
34501
|
exports.ACustomAnimate = ACustomAnimate;
|