@visactor/vrender 0.16.1 → 0.16.2-alpha.1
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 +17 -8
- 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 +5 -5
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.1", (0, vrender_kits_1.loadAllModule)(vrender_core_1.container),
|
|
24
|
+
exports.version = "0.16.2-alpha.1", (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,gBAAgB,CAAC;AAExC,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.2-alpha.1\";\n\nloadAllModule(container);\n\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\n"]}
|
package/dist/index.js
CHANGED
|
@@ -5544,10 +5544,10 @@
|
|
|
5544
5544
|
value: function lineEnd() {
|
|
5545
5545
|
switch (this._point) {
|
|
5546
5546
|
case 2:
|
|
5547
|
-
this.context.lineTo(this._x1, this._y1, !1 !== this._lastDefined2, this.lastPoint1);
|
|
5547
|
+
this.context.lineTo(this._x1, this._y1, !1 !== this._lastDefined1 && !1 !== this._lastDefined2, this.lastPoint1);
|
|
5548
5548
|
break;
|
|
5549
5549
|
case 3:
|
|
5550
|
-
_point(this, this._t0, slope2(this, this._t0), !1 !== this._lastDefined2, this.lastPoint1);
|
|
5550
|
+
_point(this, this._t0, slope2(this, this._t0), !1 !== this._lastDefined1 && !1 !== this._lastDefined2, this.lastPoint1);
|
|
5551
5551
|
}
|
|
5552
5552
|
(this._line || 0 !== this._line && 1 === this._point) && this.context.closePath(), this._line = 1 - this._line;
|
|
5553
5553
|
}
|
|
@@ -8367,12 +8367,12 @@
|
|
|
8367
8367
|
key: "mapEvent",
|
|
8368
8368
|
value: function mapEvent(e) {
|
|
8369
8369
|
var _this$_prePointTarget;
|
|
8370
|
-
var _a, _b, _c, _d, _e;
|
|
8370
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
8371
8371
|
if (!this.rootTarget) return;
|
|
8372
8372
|
var mappers = this.mappingTable[e.type];
|
|
8373
8373
|
var target;
|
|
8374
8374
|
var cacheKey = "".concat(e.canvasX, "-").concat(e.canvasY);
|
|
8375
|
-
if ((null === (_a = this._prePointTargetCache) || void 0 === _a ? void 0 : _a[cacheKey]) && (null === (_c = null === (_b = this._prePointTargetCache) || void 0 === _b ? void 0 : _b[cacheKey]) || void 0 === _c ? void 0 : _c.stage
|
|
8375
|
+
if ((null === (_a = this._prePointTargetCache) || void 0 === _a ? void 0 : _a[cacheKey]) && (null === (_c = null === (_b = this._prePointTargetCache) || void 0 === _b ? void 0 : _b[cacheKey]) || void 0 === _c ? void 0 : _c.stage) && (null === (_e = null === (_d = this._prePointTargetCache) || void 0 === _d ? void 0 : _d[cacheKey]) || void 0 === _e ? void 0 : _e.stage.renderCount) === (null === (_f = this._prePointTargetCache) || void 0 === _f ? void 0 : _f.stageRenderCount) ? target = this._prePointTargetCache[cacheKey] : (target = this.pickTarget(e.canvasX, e.canvasY, e), e.pickParams || (this._prePointTargetCache = (_this$_prePointTarget = {}, _defineProperty(_this$_prePointTarget, cacheKey, target), _defineProperty(_this$_prePointTarget, "stageRenderCount", null !== (_g = null == target ? void 0 : target.stage.renderCount) && void 0 !== _g ? _g : -1), _this$_prePointTarget))), mappers) for (var i = 0, j = mappers.length; i < j; i++) mappers[i].fn(e, target);else console.warn("[EventManager]: Event mapping not defined for ".concat(e.type));
|
|
8376
8376
|
}
|
|
8377
8377
|
}, {
|
|
8378
8378
|
key: "propagate",
|
|
@@ -11564,6 +11564,9 @@
|
|
|
11564
11564
|
return ColorStore.Get(fromColor, exports.ColorType.Color255, _fromColorRGB), ColorStore.Get(toColor, exports.ColorType.Color255, _toColorRGB), "rgba(".concat(Math.round(_fromColorRGB[0] + (_toColorRGB[0] - _fromColorRGB[0]) * ratio), ",").concat(Math.round(_fromColorRGB[1] + (_toColorRGB[1] - _fromColorRGB[1]) * ratio), ",").concat(Math.round(_fromColorRGB[2] + (_toColorRGB[2] - _fromColorRGB[2]) * ratio), ",").concat(_fromColorRGB[3] + (_toColorRGB[3] - _fromColorRGB[3]) * ratio, ")");
|
|
11565
11565
|
}
|
|
11566
11566
|
|
|
11567
|
+
Object.keys(DEFAULT_COLORS).forEach(function (k) {
|
|
11568
|
+
});
|
|
11569
|
+
|
|
11567
11570
|
var interpolateOtherAttrs = function interpolateOtherAttrs(attrs, out, ratio) {
|
|
11568
11571
|
attrs.forEach(function (entry) {
|
|
11569
11572
|
if (Number.isFinite(entry.to)) out[entry.key] = entry.from + (entry.to - entry.from) * ratio;else if ("fill" === entry.key || "stroke" === entry.key) {
|
|
@@ -20808,16 +20811,17 @@
|
|
|
20808
20811
|
key: "createCommonPattern",
|
|
20809
20812
|
value: function createCommonPattern(size, padding, color, targetContext, cb) {
|
|
20810
20813
|
var r = (size - 2 * padding) / 2,
|
|
20814
|
+
dpr = targetContext.dpr,
|
|
20811
20815
|
canvas = canvasAllocate.allocate({
|
|
20812
20816
|
width: size,
|
|
20813
20817
|
height: size,
|
|
20814
|
-
dpr:
|
|
20818
|
+
dpr: dpr
|
|
20815
20819
|
}),
|
|
20816
20820
|
ctx = canvas.getContext("2d");
|
|
20817
20821
|
if (!ctx) return null;
|
|
20818
|
-
ctx.clearRect(0, 0, size, size), cb(r, ctx);
|
|
20822
|
+
ctx.inuse = !0, ctx.clearMatrix(), ctx.setTransformForCurrent(!0), ctx.clearRect(0, 0, size, size), cb(r, ctx);
|
|
20819
20823
|
var pattern = targetContext.createPattern(canvas.nativeCanvas, "repeat");
|
|
20820
|
-
return canvasAllocate.free(canvas), pattern;
|
|
20824
|
+
return pattern.setTransform && pattern.setTransform(new DOMMatrix([1 / dpr, 0, 0, 1 / dpr, 0, 0])), canvasAllocate.free(canvas), pattern;
|
|
20821
20825
|
}
|
|
20822
20826
|
}, {
|
|
20823
20827
|
key: "createCirclePattern",
|
|
@@ -25249,6 +25253,11 @@
|
|
|
25249
25253
|
return new Stage(params);
|
|
25250
25254
|
}
|
|
25251
25255
|
|
|
25256
|
+
var params;
|
|
25257
|
+
!function (params) {
|
|
25258
|
+
params[params.W = 1] = "W", params[params.H = 2] = "H", params[params.WH = 3] = "WH";
|
|
25259
|
+
}(params || (params = {}));
|
|
25260
|
+
|
|
25252
25261
|
var strCommandMap = ["arc", "arcTo", "bezierCurveTo", "closePath", "ellipse", "lineTo", "moveTo", "quadraticCurveTo", "rect"];
|
|
25253
25262
|
|
|
25254
25263
|
var __decorate$10 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
@@ -34426,7 +34435,7 @@
|
|
|
34426
34435
|
|
|
34427
34436
|
var roughModule = _roughModule;
|
|
34428
34437
|
|
|
34429
|
-
const version = "0.16.1";
|
|
34438
|
+
const version = "0.16.2-alpha.1";
|
|
34430
34439
|
loadAllModule(container);
|
|
34431
34440
|
|
|
34432
34441
|
exports.ACustomAnimate = ACustomAnimate;
|