@visactor/vrender 0.22.9-alpha.2 → 0.22.10
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 +10 -11
- package/cjs/index.js.map +1 -1
- package/dist/index.es.js +87 -199
- package/dist/index.js +88 -204
- 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 +3 -3
package/dist/index.js
CHANGED
|
@@ -580,48 +580,6 @@
|
|
|
580
580
|
const VGlobal = Symbol.for("VGlobal");
|
|
581
581
|
const DEFAULT_TEXT_FONT_FAMILY = "PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui,-apple-system,segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol";
|
|
582
582
|
|
|
583
|
-
class EventListenerManager {
|
|
584
|
-
constructor() {
|
|
585
|
-
this._listenerMap = new Map(), this._eventListenerTransformer = event => event;
|
|
586
|
-
}
|
|
587
|
-
setEventListenerTransformer(transformer) {
|
|
588
|
-
this._eventListenerTransformer = transformer || (event => event);
|
|
589
|
-
}
|
|
590
|
-
addEventListener(type, listener, options) {
|
|
591
|
-
if (!listener) return;
|
|
592
|
-
const wrappedListener = event => {
|
|
593
|
-
const transformedEvent = this._eventListenerTransformer(event);
|
|
594
|
-
"function" == typeof listener ? listener(transformedEvent) : listener.handleEvent && listener.handleEvent(transformedEvent);
|
|
595
|
-
};
|
|
596
|
-
this._listenerMap.has(type) || this._listenerMap.set(type, new Map()), this._listenerMap.get(type).set(listener, wrappedListener), this._nativeAddEventListener(type, wrappedListener, options);
|
|
597
|
-
}
|
|
598
|
-
removeEventListener(type, listener, options) {
|
|
599
|
-
var _a;
|
|
600
|
-
if (!listener) return;
|
|
601
|
-
const wrappedListener = null === (_a = this._listenerMap.get(type)) || void 0 === _a ? void 0 : _a.get(listener);
|
|
602
|
-
wrappedListener && (this._nativeRemoveEventListener(type, wrappedListener, options), this._listenerMap.get(type).delete(listener), 0 === this._listenerMap.get(type).size && this._listenerMap.delete(type));
|
|
603
|
-
}
|
|
604
|
-
dispatchEvent(event) {
|
|
605
|
-
return this._nativeDispatchEvent(event);
|
|
606
|
-
}
|
|
607
|
-
clearAllEventListeners() {
|
|
608
|
-
this._listenerMap.forEach((listenersMap, type) => {
|
|
609
|
-
listenersMap.forEach((wrappedListener, originalListener) => {
|
|
610
|
-
this._nativeRemoveEventListener(type, wrappedListener, void 0);
|
|
611
|
-
});
|
|
612
|
-
}), this._listenerMap.clear();
|
|
613
|
-
}
|
|
614
|
-
_nativeAddEventListener(type, listener, options) {
|
|
615
|
-
throw new Error("_nativeAddEventListener must be implemented by derived classes");
|
|
616
|
-
}
|
|
617
|
-
_nativeRemoveEventListener(type, listener, options) {
|
|
618
|
-
throw new Error("_nativeRemoveEventListener must be implemented by derived classes");
|
|
619
|
-
}
|
|
620
|
-
_nativeDispatchEvent(event) {
|
|
621
|
-
throw new Error("_nativeDispatchEvent must be implemented by derived classes");
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
|
|
625
583
|
var __decorate$1N = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
626
584
|
var d,
|
|
627
585
|
c = arguments.length,
|
|
@@ -662,7 +620,7 @@
|
|
|
662
620
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
663
621
|
});
|
|
664
622
|
};
|
|
665
|
-
exports.DefaultGlobal = class DefaultGlobal
|
|
623
|
+
exports.DefaultGlobal = class DefaultGlobal {
|
|
666
624
|
get env() {
|
|
667
625
|
return this._env;
|
|
668
626
|
}
|
|
@@ -706,19 +664,10 @@
|
|
|
706
664
|
this._env || this.setEnv("browser"), this.envContribution.applyStyles = support;
|
|
707
665
|
}
|
|
708
666
|
constructor(contributions) {
|
|
709
|
-
|
|
667
|
+
this.contributions = contributions, this._isImageAnonymous = !0, this.id = Generator.GenAutoIncrementId(), this.hooks = {
|
|
710
668
|
onSetEnv: new SyncHook(["lastEnv", "env", "global"])
|
|
711
669
|
}, this.measureTextMethod = "native", this.optimizeVisible = !1;
|
|
712
670
|
}
|
|
713
|
-
_nativeAddEventListener(type, listener, options) {
|
|
714
|
-
return this._env || this.setEnv("browser"), this.envContribution.addEventListener(type, listener, options);
|
|
715
|
-
}
|
|
716
|
-
_nativeRemoveEventListener(type, listener, options) {
|
|
717
|
-
return this._env || this.setEnv("browser"), this.envContribution.removeEventListener(type, listener, options);
|
|
718
|
-
}
|
|
719
|
-
_nativeDispatchEvent(event) {
|
|
720
|
-
return this._env || this.setEnv("browser"), this.envContribution.dispatchEvent(event);
|
|
721
|
-
}
|
|
722
671
|
bindContribution(params) {
|
|
723
672
|
const promiseArr = [];
|
|
724
673
|
if (this.contributions.getContributions().forEach(contribution => {
|
|
@@ -759,6 +708,15 @@
|
|
|
759
708
|
releaseCanvas(canvas) {
|
|
760
709
|
return this._env || this.setEnv("browser"), this.envContribution.releaseCanvas(canvas);
|
|
761
710
|
}
|
|
711
|
+
addEventListener(type, listener, options) {
|
|
712
|
+
return this._env || this.setEnv("browser"), this.envContribution.addEventListener(type, listener, options);
|
|
713
|
+
}
|
|
714
|
+
removeEventListener(type, listener, options) {
|
|
715
|
+
return this._env || this.setEnv("browser"), this.envContribution.removeEventListener(type, listener, options);
|
|
716
|
+
}
|
|
717
|
+
dispatchEvent(event) {
|
|
718
|
+
return this._env || this.setEnv("browser"), this.envContribution.dispatchEvent(event);
|
|
719
|
+
}
|
|
762
720
|
getRequestAnimationFrame() {
|
|
763
721
|
return this._env || this.setEnv("browser"), this.envContribution.getRequestAnimationFrame();
|
|
764
722
|
}
|
|
@@ -1220,14 +1178,14 @@
|
|
|
1220
1178
|
};
|
|
1221
1179
|
var isArrayLike$1 = isArrayLike;
|
|
1222
1180
|
|
|
1223
|
-
const isNumber
|
|
1181
|
+
const isNumber = function (value) {
|
|
1224
1182
|
let fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
1225
1183
|
const type = typeof value;
|
|
1226
1184
|
return fuzzy ? "number" === type : "number" === type || isType$1(value, "Number");
|
|
1227
1185
|
};
|
|
1228
|
-
var isNumber$
|
|
1186
|
+
var isNumber$1 = isNumber;
|
|
1229
1187
|
|
|
1230
|
-
const isValidNumber = value => isNumber$
|
|
1188
|
+
const isValidNumber = value => isNumber$1(value) && Number.isFinite(value);
|
|
1231
1189
|
var isValidNumber$1 = isValidNumber;
|
|
1232
1190
|
|
|
1233
1191
|
const isValidUrl = value => new RegExp(/^(http(s)?:\/\/)\w+[^\s]+(\.[^\s]+){1,}$/).test(value);
|
|
@@ -1310,7 +1268,7 @@
|
|
|
1310
1268
|
}(LoggerLevel || (LoggerLevel = {}));
|
|
1311
1269
|
class Logger {
|
|
1312
1270
|
static getInstance(level, method) {
|
|
1313
|
-
return Logger._instance && isNumber$
|
|
1271
|
+
return Logger._instance && isNumber$1(level) ? Logger._instance.level(level) : Logger._instance || (Logger._instance = new Logger(level, method)), Logger._instance;
|
|
1314
1272
|
}
|
|
1315
1273
|
static setInstance(logger) {
|
|
1316
1274
|
return Logger._instance = logger;
|
|
@@ -1454,10 +1412,10 @@
|
|
|
1454
1412
|
return this.x = x, this.y = y, this;
|
|
1455
1413
|
}
|
|
1456
1414
|
add(point) {
|
|
1457
|
-
return isNumber$
|
|
1415
|
+
return isNumber$1(point) ? (this.x += point, void (this.y += point)) : (this.x += point.x, this.y += point.y, this);
|
|
1458
1416
|
}
|
|
1459
1417
|
sub(point) {
|
|
1460
|
-
return isNumber$
|
|
1418
|
+
return isNumber$1(point) ? (this.x -= point, void (this.y -= point)) : (this.x -= point.x, this.y -= point.y, this);
|
|
1461
1419
|
}
|
|
1462
1420
|
multi(point) {
|
|
1463
1421
|
throw new Error("暂不支持");
|
|
@@ -2518,10 +2476,10 @@
|
|
|
2518
2476
|
return ((value = Math.max(0, Math.min(255, Math.round(value) || 0))) < 16 ? "0" : "") + value.toString(16);
|
|
2519
2477
|
}
|
|
2520
2478
|
function rgb(value) {
|
|
2521
|
-
return isNumber$
|
|
2479
|
+
return isNumber$1(value) ? new RGB(value >> 16, value >> 8 & 255, 255 & value, 1) : isArray$1(value) ? new RGB(value[0], value[1], value[2]) : new RGB(255, 255, 255);
|
|
2522
2480
|
}
|
|
2523
2481
|
function rgba(value) {
|
|
2524
|
-
return isNumber$
|
|
2482
|
+
return isNumber$1(value) ? new RGB(value >>> 24, value >>> 16 & 255, value >>> 8 & 255, 255 & value) : isArray$1(value) ? new RGB(value[0], value[1], value[2], value[3]) : new RGB(255, 255, 255, 1);
|
|
2525
2483
|
}
|
|
2526
2484
|
function SRGBToLinear(c) {
|
|
2527
2485
|
return c < .04045 ? .0773993808 * c : Math.pow(.9478672986 * c + .0521327014, 2.4);
|
|
@@ -3559,6 +3517,11 @@
|
|
|
3559
3517
|
return this.context.tryUpdateLength();
|
|
3560
3518
|
}
|
|
3561
3519
|
};
|
|
3520
|
+
class StepClosed extends Step$1 {
|
|
3521
|
+
lineEnd() {
|
|
3522
|
+
this.context.closePath();
|
|
3523
|
+
}
|
|
3524
|
+
}
|
|
3562
3525
|
function genStepSegments(points, t) {
|
|
3563
3526
|
let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
3564
3527
|
const {
|
|
@@ -3572,6 +3535,16 @@
|
|
|
3572
3535
|
function genStepTypeSegments(path, points) {
|
|
3573
3536
|
return genCurveSegments(path, points);
|
|
3574
3537
|
}
|
|
3538
|
+
function genStepClosedSegments(points, t) {
|
|
3539
|
+
let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
3540
|
+
const {
|
|
3541
|
+
direction: direction,
|
|
3542
|
+
startPoint: startPoint
|
|
3543
|
+
} = params;
|
|
3544
|
+
if (points.length < 2 - Number(!!startPoint)) return null;
|
|
3545
|
+
const segContext = new SegContext("step", null != direction ? direction : abs(points[points.length - 1].x - points[0].x) > abs(points[points.length - 1].y - points[0].y) ? exports.Direction.ROW : exports.Direction.COLUMN);
|
|
3546
|
+
return genStepTypeSegments(new StepClosed(segContext, t, startPoint), points), segContext;
|
|
3547
|
+
}
|
|
3575
3548
|
|
|
3576
3549
|
class LinearClosed extends Linear {
|
|
3577
3550
|
lineEnd() {
|
|
@@ -3801,6 +3774,8 @@
|
|
|
3801
3774
|
return genMonotoneYSegments(points, params);
|
|
3802
3775
|
case "step":
|
|
3803
3776
|
return genStepSegments(points, .5, params);
|
|
3777
|
+
case "stepClosed":
|
|
3778
|
+
return genStepClosedSegments(points, .5, params);
|
|
3804
3779
|
case "stepBefore":
|
|
3805
3780
|
return genStepSegments(points, 0, params);
|
|
3806
3781
|
case "stepAfter":
|
|
@@ -4683,7 +4658,7 @@
|
|
|
4683
4658
|
function createColor(context, c, params) {
|
|
4684
4659
|
let offsetX = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
4685
4660
|
let offsetY = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
4686
|
-
var _a, _b;
|
|
4661
|
+
var _a, _b, _c, _d;
|
|
4687
4662
|
if (!c || !0 === c) return "black";
|
|
4688
4663
|
let result, color;
|
|
4689
4664
|
if (isArray$1(c)) for (let i = 0; i < c.length && (color = c[i], !color); i++);else color = c;
|
|
@@ -4700,7 +4675,7 @@
|
|
|
4700
4675
|
scaleY = 1,
|
|
4701
4676
|
angle = 0
|
|
4702
4677
|
} = params.attribute;
|
|
4703
|
-
w /= scaleX, h /= scaleY, x /= scaleX, y /= scaleY, (angle || 1 !== scaleX || 1 !== scaleY) && (x = 0, y = 0, w = null !== (
|
|
4678
|
+
w /= scaleX, h /= scaleY, x /= scaleX, y /= scaleY, (angle || 1 !== scaleX || 1 !== scaleY) && (x = null !== (_a = params.x1WithoutTransform) && void 0 !== _a ? _a : 0, y = null !== (_b = params.y1WithoutTransform) && void 0 !== _b ? _b : 0, w = null !== (_c = params.widthWithoutTransform) && void 0 !== _c ? _c : w, h = null !== (_d = params.heightWithoutTransform) && void 0 !== _d ? _d : h);
|
|
4704
4679
|
}
|
|
4705
4680
|
"linear" === color.gradient ? result = createLinearGradient(context, color, x, y, w, h) : "conical" === color.gradient ? result = createConicGradient(context, color, x, y, w, h) : "radial" === color.gradient && (result = createRadialGradient(context, color, x, y, w, h));
|
|
4706
4681
|
}
|
|
@@ -4725,7 +4700,7 @@
|
|
|
4725
4700
|
const canvasGradient = context.createConicGradient(x + (null !== (_a = color.x) && void 0 !== _a ? _a : 0) * w, y + (null !== (_b = color.y) && void 0 !== _b ? _b : 0) * h, color.startAngle, color.endAngle);
|
|
4726
4701
|
return color.stops.forEach(stop => {
|
|
4727
4702
|
canvasGradient.addColorStop(stop.offset, stop.color);
|
|
4728
|
-
}), canvasGradient.GetPattern(w + x, h + y, undefined);
|
|
4703
|
+
}), canvasGradient.GetPattern ? canvasGradient.GetPattern(w + x, h + y, undefined) : canvasGradient;
|
|
4729
4704
|
}
|
|
4730
4705
|
|
|
4731
4706
|
const DIRECTION_KEY = {
|
|
@@ -5290,9 +5265,6 @@
|
|
|
5290
5265
|
function isNotAroundZero(val) {
|
|
5291
5266
|
return val > EPSILON || val < -EPSILON;
|
|
5292
5267
|
}
|
|
5293
|
-
function isNumber(data) {
|
|
5294
|
-
return "number" == typeof data && Number.isFinite(data);
|
|
5295
|
-
}
|
|
5296
5268
|
const _v0 = [0, 0],
|
|
5297
5269
|
_v1 = [0, 0],
|
|
5298
5270
|
_v2 = [0, 0];
|
|
@@ -5697,7 +5669,7 @@
|
|
|
5697
5669
|
};
|
|
5698
5670
|
const VWindow = Symbol.for("VWindow");
|
|
5699
5671
|
const WindowHandlerContribution = Symbol.for("WindowHandlerContribution");
|
|
5700
|
-
exports.DefaultWindow = class DefaultWindow
|
|
5672
|
+
exports.DefaultWindow = class DefaultWindow {
|
|
5701
5673
|
get width() {
|
|
5702
5674
|
if (this._handler) {
|
|
5703
5675
|
const wh = this._handler.getWH();
|
|
@@ -5716,7 +5688,7 @@
|
|
|
5716
5688
|
return this._handler.getDpr();
|
|
5717
5689
|
}
|
|
5718
5690
|
constructor() {
|
|
5719
|
-
|
|
5691
|
+
this.hooks = {
|
|
5720
5692
|
onChange: new SyncHook(["x", "y", "width", "height"])
|
|
5721
5693
|
}, this.active = () => {
|
|
5722
5694
|
const global = this.global;
|
|
@@ -5724,15 +5696,6 @@
|
|
|
5724
5696
|
container.getNamed(WindowHandlerContribution, global.env).configure(this, global), this.actived = !0;
|
|
5725
5697
|
}, this._uid = Generator.GenAutoIncrementId(), this.global = application.global, this.postInit();
|
|
5726
5698
|
}
|
|
5727
|
-
_nativeAddEventListener(type, listener, options) {
|
|
5728
|
-
return this._handler.addEventListener(type, listener, options);
|
|
5729
|
-
}
|
|
5730
|
-
_nativeRemoveEventListener(type, listener, options) {
|
|
5731
|
-
return this._handler.removeEventListener(type, listener, options);
|
|
5732
|
-
}
|
|
5733
|
-
_nativeDispatchEvent(event) {
|
|
5734
|
-
return this._handler.dispatchEvent(event);
|
|
5735
|
-
}
|
|
5736
5699
|
postInit() {
|
|
5737
5700
|
this.global.hooks.onSetEnv.tap("window", this.active), this.active();
|
|
5738
5701
|
}
|
|
@@ -5772,7 +5735,7 @@
|
|
|
5772
5735
|
throw new Error("暂不支持");
|
|
5773
5736
|
}
|
|
5774
5737
|
release() {
|
|
5775
|
-
return this.global.hooks.onSetEnv.unTap("window", this.active), this.
|
|
5738
|
+
return this.global.hooks.onSetEnv.unTap("window", this.active), this._handler.releaseWindow();
|
|
5776
5739
|
}
|
|
5777
5740
|
getContext() {
|
|
5778
5741
|
return this._handler.getContext();
|
|
@@ -5783,6 +5746,15 @@
|
|
|
5783
5746
|
getImageBuffer(type) {
|
|
5784
5747
|
return this._handler.getImageBuffer ? this._handler.getImageBuffer(type) : null;
|
|
5785
5748
|
}
|
|
5749
|
+
addEventListener(type, listener, options) {
|
|
5750
|
+
return this._handler.addEventListener(type, listener, options);
|
|
5751
|
+
}
|
|
5752
|
+
removeEventListener(type, listener, options) {
|
|
5753
|
+
return this._handler.removeEventListener(type, listener, options);
|
|
5754
|
+
}
|
|
5755
|
+
dispatchEvent(event) {
|
|
5756
|
+
return this._handler.dispatchEvent(event);
|
|
5757
|
+
}
|
|
5786
5758
|
getBoundingClientRect() {
|
|
5787
5759
|
return this._handler.getBoundingClientRect();
|
|
5788
5760
|
}
|
|
@@ -6991,17 +6963,19 @@
|
|
|
6991
6963
|
globalObj: globalObj,
|
|
6992
6964
|
domElement: domElement
|
|
6993
6965
|
} = this;
|
|
6994
|
-
this.supportsPointerEvents ? (globalObj.getDocument() ? (globalObj.addEventListener("pointermove", this.onPointerMove, !0), globalObj.addEventListener("pointerup", this.onPointerUp, !0)) : (domElement.addEventListener("pointermove", this.onPointerMove, !0), domElement.addEventListener("pointerup", this.onPointerUp, !0)), domElement.addEventListener("pointerdown", this.onPointerDown, !0), domElement.addEventListener("pointerleave", this.onPointerOverOut, !0), domElement.addEventListener("pointerover", this.onPointerOverOut, !0)) : (globalObj.getDocument() ? (globalObj.addEventListener("mousemove", this.onPointerMove, !0), globalObj.addEventListener("mouseup", this.onPointerUp, !0)) : (domElement.addEventListener("mousemove", this.onPointerMove, !0), domElement.addEventListener("mouseup", this.onPointerUp, !0)), domElement.addEventListener("mousedown", this.onPointerDown, !0), domElement.addEventListener("mouseout", this.onPointerOverOut, !0), domElement.addEventListener("mouseover", this.onPointerOverOut, !0)), this.supportsTouchEvents && (domElement.addEventListener("touchstart", this.onPointerDown, !0), domElement.addEventListener("touchend", this.onPointerUp, !0), domElement.addEventListener("touchmove", this.onPointerMove, !0)), domElement.addEventListener("wheel", this.onWheel, {
|
|
6966
|
+
this.supportsPointerEvents ? (globalObj.getDocument() ? (globalObj.getDocument().addEventListener("pointermove", this.onPointerMove, !0), globalObj.getDocument().addEventListener("pointerup", this.onPointerUp, !0)) : (domElement.addEventListener("pointermove", this.onPointerMove, !0), domElement.addEventListener("pointerup", this.onPointerUp, !0)), domElement.addEventListener("pointerdown", this.onPointerDown, !0), domElement.addEventListener("pointerleave", this.onPointerOverOut, !0), domElement.addEventListener("pointerover", this.onPointerOverOut, !0)) : (globalObj.getDocument() ? (globalObj.getDocument().addEventListener("mousemove", this.onPointerMove, !0), globalObj.getDocument().addEventListener("mouseup", this.onPointerUp, !0)) : (domElement.addEventListener("mousemove", this.onPointerMove, !0), domElement.addEventListener("mouseup", this.onPointerUp, !0)), domElement.addEventListener("mousedown", this.onPointerDown, !0), domElement.addEventListener("mouseout", this.onPointerOverOut, !0), domElement.addEventListener("mouseover", this.onPointerOverOut, !0)), this.supportsTouchEvents && (domElement.addEventListener("touchstart", this.onPointerDown, !0), domElement.addEventListener("touchend", this.onPointerUp, !0), domElement.addEventListener("touchmove", this.onPointerMove, !0)), domElement.addEventListener("wheel", this.onWheel, {
|
|
6995
6967
|
capture: !0
|
|
6996
6968
|
}), this.eventsAdded = !0;
|
|
6997
6969
|
}
|
|
6998
6970
|
removeEvents() {
|
|
6971
|
+
var _a;
|
|
6999
6972
|
if (!this.eventsAdded || !this.domElement) return;
|
|
7000
6973
|
const {
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
|
|
7004
|
-
|
|
6974
|
+
globalObj: globalObj,
|
|
6975
|
+
domElement: domElement
|
|
6976
|
+
} = this,
|
|
6977
|
+
globalDocument = null !== (_a = globalObj.getDocument()) && void 0 !== _a ? _a : domElement;
|
|
6978
|
+
this.supportsPointerEvents ? (globalDocument.removeEventListener("pointermove", this.onPointerMove, !0), globalDocument.removeEventListener("pointerup", this.onPointerUp, !0), domElement.removeEventListener("pointerdown", this.onPointerDown, !0), domElement.removeEventListener("pointerleave", this.onPointerOverOut, !0), domElement.removeEventListener("pointerover", this.onPointerOverOut, !0)) : (globalDocument.removeEventListener("mousemove", this.onPointerMove, !0), globalDocument.removeEventListener("mouseup", this.onPointerUp, !0), domElement.removeEventListener("mousedown", this.onPointerDown, !0), domElement.removeEventListener("mouseout", this.onPointerOverOut, !0), domElement.removeEventListener("mouseover", this.onPointerOverOut, !0)), this.supportsTouchEvents && (domElement.removeEventListener("touchstart", this.onPointerDown, !0), domElement.removeEventListener("touchend", this.onPointerUp, !0), domElement.removeEventListener("touchmove", this.onPointerMove, !0)), domElement.removeEventListener("wheel", this.onWheel, !0), this.domElement = null, this.eventsAdded = !1;
|
|
7005
6979
|
}
|
|
7006
6980
|
mapToViewportPoint(event) {
|
|
7007
6981
|
return this.domElement.pointTransform ? this.domElement.pointTransform(event.x, event.y) : event;
|
|
@@ -7995,7 +7969,7 @@
|
|
|
7995
7969
|
}
|
|
7996
7970
|
onBind() {
|
|
7997
7971
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
7998
|
-
this.fromNumber = isNumber$
|
|
7972
|
+
this.fromNumber = isNumber$1(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$1(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)));
|
|
7999
7973
|
}
|
|
8000
7974
|
onEnd() {}
|
|
8001
7975
|
onUpdate(end, ratio, out) {
|
|
@@ -9138,7 +9112,7 @@
|
|
|
9138
9112
|
return res;
|
|
9139
9113
|
};
|
|
9140
9114
|
const samplingPoints = (points, count) => {
|
|
9141
|
-
const validatePoints = points.filter(point => !1 !== point.defined && isNumber$
|
|
9115
|
+
const validatePoints = points.filter(point => !1 !== point.defined && isNumber$1(point.x) && isNumber$1(point.y));
|
|
9142
9116
|
if (0 === validatePoints.length) return [];
|
|
9143
9117
|
if (1 === validatePoints.length) return new Array(count).fill(0).map(i => validatePoints[0]);
|
|
9144
9118
|
const res = [];
|
|
@@ -9174,7 +9148,7 @@
|
|
|
9174
9148
|
var _a;
|
|
9175
9149
|
return res.concat(null !== (_a = seg.points) && void 0 !== _a ? _a : []);
|
|
9176
9150
|
}, []));
|
|
9177
|
-
const validatePoints = points.filter(point => !1 !== point.defined && isNumber$
|
|
9151
|
+
const validatePoints = points.filter(point => !1 !== point.defined && isNumber$1(point.x) && isNumber$1(point.y));
|
|
9178
9152
|
if (!validatePoints.length) return [];
|
|
9179
9153
|
const allPoints = [];
|
|
9180
9154
|
validatePoints.forEach(point => {
|
|
@@ -9380,10 +9354,10 @@
|
|
|
9380
9354
|
|
|
9381
9355
|
function colorArrayToString(color) {
|
|
9382
9356
|
let alphaChannel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
9383
|
-
return Array.isArray(color) && isNumber$
|
|
9357
|
+
return Array.isArray(color) && isNumber$1(color[0]) ? alphaChannel ? `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])},${color[3].toFixed(2)})` : `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])})` : color;
|
|
9384
9358
|
}
|
|
9385
9359
|
function interpolateColor(from, to, ratio, alphaChannel, cb) {
|
|
9386
|
-
if (Array.isArray(from) && !isNumber$
|
|
9360
|
+
if (Array.isArray(from) && !isNumber$1(from[0]) || Array.isArray(to) && !isNumber$1(to[0])) {
|
|
9387
9361
|
return new Array(4).fill(0).map((_, index) => _interpolateColor(isArray$1(from) ? from[index] : from, isArray$1(to) ? to[index] : to, ratio, alphaChannel));
|
|
9388
9362
|
}
|
|
9389
9363
|
return _interpolateColor(from, to, ratio, alphaChannel, cb);
|
|
@@ -9911,13 +9885,13 @@
|
|
|
9911
9885
|
|
|
9912
9886
|
class BaseSymbol {
|
|
9913
9887
|
bounds(size, bounds) {
|
|
9914
|
-
if (isNumber$
|
|
9888
|
+
if (isNumber$1(size)) {
|
|
9915
9889
|
const halfS = size / 2;
|
|
9916
9890
|
bounds.x1 = -halfS, bounds.x2 = halfS, bounds.y1 = -halfS, bounds.y2 = halfS;
|
|
9917
9891
|
} else bounds.x1 = -size[0] / 2, bounds.x2 = size[0] / 2, bounds.y1 = -size[1] / 2, bounds.y2 = size[1] / 2;
|
|
9918
9892
|
}
|
|
9919
9893
|
parseSize(size) {
|
|
9920
|
-
return isNumber$
|
|
9894
|
+
return isNumber$1(size) ? size : Math.min(size[0], size[1]);
|
|
9921
9895
|
}
|
|
9922
9896
|
}
|
|
9923
9897
|
|
|
@@ -10336,10 +10310,10 @@
|
|
|
10336
10310
|
super(...arguments), this.type = "rect", this.pathStr = "M -0.5,0.25 L 0.5,0.25 L 0.5,-0.25,L -0.5,-0.25 Z";
|
|
10337
10311
|
}
|
|
10338
10312
|
draw(ctx, size, x, y) {
|
|
10339
|
-
return isNumber$
|
|
10313
|
+
return isNumber$1(size) ? rectSize(ctx, size, x, y) : rectSizeArray(ctx, size, x, y);
|
|
10340
10314
|
}
|
|
10341
10315
|
drawWithClipRange(ctx, size, x, y, clipRange, z, cb) {
|
|
10342
|
-
isNumber$
|
|
10316
|
+
isNumber$1(size) && (size = [size, size / 2]);
|
|
10343
10317
|
const drawLength = 2 * (size[0] + size[1]) * clipRange,
|
|
10344
10318
|
points = [{
|
|
10345
10319
|
x: x + size[0] / 2,
|
|
@@ -10371,12 +10345,12 @@
|
|
|
10371
10345
|
return !1;
|
|
10372
10346
|
}
|
|
10373
10347
|
drawOffset(ctx, size, x, y, offset) {
|
|
10374
|
-
return isNumber$
|
|
10348
|
+
return isNumber$1(size) ? rectSize(ctx, size + 2 * offset, x, y) : rectSizeArray(ctx, [size[0] + 2 * offset, size[1] + 2 * offset], x, y);
|
|
10375
10349
|
}
|
|
10376
10350
|
}
|
|
10377
10351
|
var rect = new RectSymbol();
|
|
10378
10352
|
|
|
10379
|
-
const tempBounds
|
|
10353
|
+
const tempBounds = new AABBBounds();
|
|
10380
10354
|
class CustomSymbolClass {
|
|
10381
10355
|
constructor(type, path) {
|
|
10382
10356
|
let isSvg = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
|
|
@@ -10391,7 +10365,7 @@
|
|
|
10391
10365
|
return size = this.parseSize(size), this.drawOffset(ctx, size, x, y, 0, z, cb);
|
|
10392
10366
|
}
|
|
10393
10367
|
parseSize(size) {
|
|
10394
|
-
return isNumber$
|
|
10368
|
+
return isNumber$1(size) ? size : Math.min(size[0], size[1]);
|
|
10395
10369
|
}
|
|
10396
10370
|
drawWithClipRange(ctx, size, x, y, clipRange, z, cb) {
|
|
10397
10371
|
return size = this.parseSize(size), this.isSvg ? !!this.svgCache && (this.svgCache.forEach(item => {
|
|
@@ -10405,7 +10379,7 @@
|
|
|
10405
10379
|
let {
|
|
10406
10380
|
path: path
|
|
10407
10381
|
} = _ref;
|
|
10408
|
-
tempBounds
|
|
10382
|
+
tempBounds.x1 = path.bounds.x1 * size, tempBounds.y1 = path.bounds.y1 * size, tempBounds.x2 = path.bounds.x2 * size, tempBounds.y2 = path.bounds.y2 * size, bounds.union(tempBounds);
|
|
10409
10383
|
});
|
|
10410
10384
|
}
|
|
10411
10385
|
this.path.bounds && (bounds.x1 = this.path.bounds.x1 * size, bounds.y1 = this.path.bounds.y1 * size, bounds.x2 = this.path.bounds.x2 * size, bounds.y2 = this.path.bounds.y2 * size);
|
|
@@ -10801,8 +10775,8 @@
|
|
|
10801
10775
|
const SVG_PARSE_ATTRIBUTE_MAP_KEYS = Object.keys(SVG_PARSE_ATTRIBUTE_MAP);
|
|
10802
10776
|
|
|
10803
10777
|
const _tempBounds$1 = new AABBBounds(),
|
|
10804
|
-
tempMatrix = new Matrix()
|
|
10805
|
-
|
|
10778
|
+
tempMatrix = new Matrix();
|
|
10779
|
+
new AABBBounds();
|
|
10806
10780
|
const PURE_STYLE_KEY = ["stroke", "opacity", "strokeOpacity", "lineDash", "lineDashOffset", "lineCap", "lineJoin", "miterLimit", "fill", "fillOpacity"];
|
|
10807
10781
|
const GRAPHIC_UPDATE_TAG_KEY = ["lineWidth", "scaleX", "scaleY", "angle", "anchor", "visible"];
|
|
10808
10782
|
const tempConstantXYKey = ["x", "y"],
|
|
@@ -11322,25 +11296,12 @@
|
|
|
11322
11296
|
needUpdateLayout() {
|
|
11323
11297
|
return !!(this._updateTag & exports.UpdateTag.UPDATE_LAYOUT);
|
|
11324
11298
|
}
|
|
11325
|
-
getAnchor(anchor, params) {
|
|
11299
|
+
getAnchor(anchor, params, resetScale) {
|
|
11326
11300
|
const _anchor = [0, 0],
|
|
11327
11301
|
getBounds = () => {
|
|
11328
11302
|
if (params.b) return params.b;
|
|
11329
|
-
const
|
|
11330
|
-
|
|
11331
|
-
scaleY: scaleY,
|
|
11332
|
-
angle: angle,
|
|
11333
|
-
scaleCenter: scaleCenter
|
|
11334
|
-
} = this.attribute;
|
|
11335
|
-
return tempBounds.copy(this._AABBBounds), this.setAttributes({
|
|
11336
|
-
angle: 0,
|
|
11337
|
-
scaleCenter: null
|
|
11338
|
-
}), params.b = this.AABBBounds.clone(), this._AABBBounds.copy(tempBounds), this.setAttributes({
|
|
11339
|
-
scaleX: scaleX,
|
|
11340
|
-
scaleY: scaleY,
|
|
11341
|
-
angle: angle,
|
|
11342
|
-
scaleCenter: scaleCenter
|
|
11343
|
-
}), params.b;
|
|
11303
|
+
const graphic = this.clone();
|
|
11304
|
+
return graphic.attribute.angle = 0, graphic.attribute.scaleCenter = null, resetScale && (graphic.attribute.scaleX = 1, graphic.attribute.scaleY = 1), params.b = graphic.AABBBounds, params.b;
|
|
11344
11305
|
};
|
|
11345
11306
|
if ("string" == typeof anchor[0]) {
|
|
11346
11307
|
const ratio = parseFloat(anchor[0]) / 100,
|
|
@@ -11369,7 +11330,7 @@
|
|
|
11369
11330
|
const params = {};
|
|
11370
11331
|
if (anchor && angle && (_anchor = this.getAnchor(anchor, params)), !scaleCenter || 1 === scaleX && 1 === scaleY) normalTransform(this._transMatrix, this._transMatrix.reset(), x, y, scaleX, scaleY, angle, anchor && _anchor);else {
|
|
11371
11332
|
const m = this._transMatrix;
|
|
11372
|
-
m.reset(), m.translate(_anchor[0], _anchor[1]), m.rotate(angle), m.translate(-_anchor[0], -_anchor[1]), m.translate(x, y), _anchor = this.getAnchor(scaleCenter, params), application.transformUtil.fromMatrix(m, m).scale(scaleX, scaleY, {
|
|
11333
|
+
m.reset(), m.translate(_anchor[0], _anchor[1]), m.rotate(angle), m.translate(-_anchor[0], -_anchor[1]), m.translate(x, y), _anchor = this.getAnchor(scaleCenter, params, !0), application.transformUtil.fromMatrix(m, m).scale(scaleX, scaleY, {
|
|
11373
11334
|
x: _anchor[0],
|
|
11374
11335
|
y: _anchor[1]
|
|
11375
11336
|
});
|
|
@@ -12647,12 +12608,12 @@
|
|
|
12647
12608
|
textBaseline: textBaseline
|
|
12648
12609
|
} = attribute;
|
|
12649
12610
|
if (null != attribute.forceBoundsHeight) {
|
|
12650
|
-
const h = isNumber$
|
|
12611
|
+
const h = isNumber$1(attribute.forceBoundsHeight) ? attribute.forceBoundsHeight : attribute.forceBoundsHeight(),
|
|
12651
12612
|
dy = textLayoutOffsetY(textBaseline, h, h);
|
|
12652
12613
|
aabbBounds.set(aabbBounds.x1, dy, aabbBounds.x2, dy + h);
|
|
12653
12614
|
}
|
|
12654
12615
|
if (null != attribute.forceBoundsWidth) {
|
|
12655
|
-
const w = isNumber$
|
|
12616
|
+
const w = isNumber$1(attribute.forceBoundsWidth) ? attribute.forceBoundsWidth : attribute.forceBoundsWidth(),
|
|
12656
12617
|
dx = textDrawOffsetX(textAlign, w);
|
|
12657
12618
|
aabbBounds.set(dx, aabbBounds.y1, dx + w, aabbBounds.y2);
|
|
12658
12619
|
}
|
|
@@ -13533,7 +13494,7 @@
|
|
|
13533
13494
|
tb1: tb1,
|
|
13534
13495
|
tb2: tb2
|
|
13535
13496
|
} = application.graphicService.updateTempAABBBounds(aabbBounds);
|
|
13536
|
-
updateBoundsOfSymbolOuterBorder(attribute, symbolTheme, tb1), aabbBounds.union(tb1), tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2), this.widthWithoutTransform = aabbBounds.x2 - aabbBounds.x1, this.heightWithoutTransform = aabbBounds.y2 - aabbBounds.y1;
|
|
13497
|
+
updateBoundsOfSymbolOuterBorder(attribute, symbolTheme, tb1), aabbBounds.union(tb1), tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2), this.widthWithoutTransform = aabbBounds.x2 - aabbBounds.x1, this.heightWithoutTransform = aabbBounds.y2 - aabbBounds.y1, this.x1WithoutTransform = aabbBounds.x1, this.y1WithoutTransform = aabbBounds.y1;
|
|
13537
13498
|
const {
|
|
13538
13499
|
lineJoin = symbolTheme.lineJoin
|
|
13539
13500
|
} = attribute;
|
|
@@ -14751,7 +14712,7 @@
|
|
|
14751
14712
|
}
|
|
14752
14713
|
} else {
|
|
14753
14714
|
const richTextConfig = this.combinedStyleToCharacter(textConfig[i]);
|
|
14754
|
-
if (isNumber$
|
|
14715
|
+
if (isNumber$1(richTextConfig.text) && (richTextConfig.text = `${richTextConfig.text}`), richTextConfig.text && richTextConfig.text.includes("\n")) {
|
|
14755
14716
|
const textParts = richTextConfig.text.split("\n");
|
|
14756
14717
|
for (let j = 0; j < textParts.length; j++) if (0 === j) paragraphs.push(new Paragraph(textParts[j], !1, richTextConfig, ascentDescentMode));else if (textParts[j] || i === textConfig.length - 1) paragraphs.push(new Paragraph(textParts[j], !0, richTextConfig, ascentDescentMode));else {
|
|
14757
14718
|
const nextRichTextConfig = this.combinedStyleToCharacter(textConfig[i + 1]);
|
|
@@ -15038,7 +14999,7 @@
|
|
|
15038
14999
|
} = this.attribute;
|
|
15039
15000
|
if (outerRadius += outerPadding, innerRadius -= innerPadding, 0 === cornerRadius || "0%" === cornerRadius) return 0;
|
|
15040
15001
|
const deltaRadius = Math.abs(outerRadius - innerRadius),
|
|
15041
|
-
parseCR = cornerRadius => Math.min(isNumber$
|
|
15002
|
+
parseCR = cornerRadius => Math.min(isNumber$1(cornerRadius, !0) ? cornerRadius : deltaRadius * parseFloat(cornerRadius) / 100, deltaRadius / 2);
|
|
15042
15003
|
if (isArray$1(cornerRadius)) {
|
|
15043
15004
|
const crList = cornerRadius.map(cr => parseCR(cr) || 0);
|
|
15044
15005
|
return 0 === crList.length ? [crList[0], crList[0], crList[0], crList[0]] : 2 === crList.length ? [crList[0], crList[1], crList[0], crList[1]] : (3 === crList.length && crList.push(0), crList);
|
|
@@ -16040,7 +16001,7 @@
|
|
|
16040
16001
|
let roundCorner = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : !0;
|
|
16041
16002
|
let edgeCb = arguments.length > 7 ? arguments[7] : undefined;
|
|
16042
16003
|
let cornerRadius;
|
|
16043
|
-
if (Array.isArray(roundCorner) && (edgeCb = roundCorner, roundCorner = !0), width < 0 && (x += width, width = -width), height < 0 && (y += height, height = -height), isNumber$
|
|
16004
|
+
if (Array.isArray(roundCorner) && (edgeCb = roundCorner, roundCorner = !0), width < 0 && (x += width, width = -width), height < 0 && (y += height, height = -height), isNumber$1(rectCornerRadius, !0)) cornerRadius = [rectCornerRadius = abs(rectCornerRadius), rectCornerRadius, rectCornerRadius, rectCornerRadius];else if (Array.isArray(rectCornerRadius)) {
|
|
16044
16005
|
const cornerRadiusArr = rectCornerRadius;
|
|
16045
16006
|
let cr0, cr1;
|
|
16046
16007
|
switch (cornerRadiusArr.length) {
|
|
@@ -20637,80 +20598,6 @@
|
|
|
20637
20598
|
return points = highestQuality ? points : simplifyRadialDist(points, void 0 !== tolerance ? tolerance * tolerance : 1);
|
|
20638
20599
|
}
|
|
20639
20600
|
|
|
20640
|
-
function isIdentityMatrix(matrix) {
|
|
20641
|
-
return 1 === matrix.a && 0 === matrix.b && 0 === matrix.c && 1 === matrix.d && 0 === matrix.e && 0 === matrix.f;
|
|
20642
|
-
}
|
|
20643
|
-
function createEventTransformer(containerElement, getMatrix, getRect, transformPoint) {
|
|
20644
|
-
return event => {
|
|
20645
|
-
if (!(event instanceof MouseEvent || event instanceof TouchEvent || event instanceof PointerEvent)) return event;
|
|
20646
|
-
const transformMatrix = getMatrix();
|
|
20647
|
-
if (isIdentityMatrix(transformMatrix)) return event;
|
|
20648
|
-
const containerRect = getRect(),
|
|
20649
|
-
transformedEvent = new event.constructor(event.type, event);
|
|
20650
|
-
if (Object.defineProperties(transformedEvent, {
|
|
20651
|
-
target: {
|
|
20652
|
-
value: event.target
|
|
20653
|
-
},
|
|
20654
|
-
currentTarget: {
|
|
20655
|
-
value: event.currentTarget
|
|
20656
|
-
}
|
|
20657
|
-
}), event instanceof MouseEvent || event instanceof PointerEvent) transformPoint(event.clientX, event.clientY, transformMatrix, containerRect, transformedEvent);else if (event instanceof TouchEvent) {
|
|
20658
|
-
if (event.touches.length > 0) {
|
|
20659
|
-
const touch = transformedEvent.touches[0];
|
|
20660
|
-
transformPoint(touch.clientX, touch.clientY, transformMatrix, containerRect, touch);
|
|
20661
|
-
}
|
|
20662
|
-
if (event.changedTouches.length > 0) {
|
|
20663
|
-
const touch = transformedEvent.changedTouches[0];
|
|
20664
|
-
transformPoint(touch.clientX, touch.clientY, transformMatrix, containerRect, touch);
|
|
20665
|
-
}
|
|
20666
|
-
}
|
|
20667
|
-
return transformedEvent;
|
|
20668
|
-
};
|
|
20669
|
-
}
|
|
20670
|
-
function createCanvasEventTransformer(canvasElement, getMatrix, getRect, transformPoint) {
|
|
20671
|
-
return createEventTransformer(canvasElement.parentElement || canvasElement, getMatrix, getRect, transformPoint);
|
|
20672
|
-
}
|
|
20673
|
-
function registerWindowEventTransformer(window, container, getMatrix, getRect, transformPoint) {
|
|
20674
|
-
const transformer = createEventTransformer(container, getMatrix, getRect, transformPoint);
|
|
20675
|
-
window.setEventListenerTransformer(transformer);
|
|
20676
|
-
}
|
|
20677
|
-
function registerGlobalEventTransformer(global, container, getMatrix, getRect, transformPoint) {
|
|
20678
|
-
const transformer = createEventTransformer(container, getMatrix, getRect, transformPoint);
|
|
20679
|
-
global.setEventListenerTransformer(transformer);
|
|
20680
|
-
}
|
|
20681
|
-
function transformPointForCanvas(clientX, clientY, matrix, rect, transformedEvent) {
|
|
20682
|
-
const transformedPoint = {
|
|
20683
|
-
x: clientX,
|
|
20684
|
-
y: clientY
|
|
20685
|
-
};
|
|
20686
|
-
matrix.transformPoint(transformedPoint, transformedPoint), Object.defineProperties(transformedEvent, {
|
|
20687
|
-
_canvasX: {
|
|
20688
|
-
value: transformedPoint.x
|
|
20689
|
-
},
|
|
20690
|
-
_canvasY: {
|
|
20691
|
-
value: transformedPoint.y
|
|
20692
|
-
}
|
|
20693
|
-
});
|
|
20694
|
-
}
|
|
20695
|
-
function mapToCanvasPointForCanvas(nativeEvent) {
|
|
20696
|
-
var _a;
|
|
20697
|
-
if (isNumber(nativeEvent._canvasX) && isNumber(nativeEvent._canvasY)) return {
|
|
20698
|
-
x: nativeEvent._canvasX,
|
|
20699
|
-
y: nativeEvent._canvasY
|
|
20700
|
-
};
|
|
20701
|
-
if (nativeEvent.changedTouches) {
|
|
20702
|
-
const data = null !== (_a = nativeEvent.changedTouches[0]) && void 0 !== _a ? _a : {};
|
|
20703
|
-
return {
|
|
20704
|
-
x: data._canvasX,
|
|
20705
|
-
y: data._canvasY
|
|
20706
|
-
};
|
|
20707
|
-
}
|
|
20708
|
-
return {
|
|
20709
|
-
x: nativeEvent._canvasX || 0,
|
|
20710
|
-
y: nativeEvent._canvasY || 0
|
|
20711
|
-
};
|
|
20712
|
-
}
|
|
20713
|
-
|
|
20714
20601
|
var __rest$1 = undefined && undefined.__rest || function (s, e) {
|
|
20715
20602
|
var t = {};
|
|
20716
20603
|
for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
|
|
@@ -25880,6 +25767,7 @@
|
|
|
25880
25767
|
return this.nativeContext.createRadialGradient(x0, y0, r0, x1, y1, r1);
|
|
25881
25768
|
}
|
|
25882
25769
|
createConicGradient(x, y, startAngle, endAngle) {
|
|
25770
|
+
if (this.nativeContext.createConicGradient && Math.abs(endAngle - startAngle - 2 * Math.PI) < .001) return this.nativeContext.createConicGradient(startAngle, x, y);
|
|
25883
25771
|
let pattern,
|
|
25884
25772
|
edit = !1;
|
|
25885
25773
|
const ctx = this;
|
|
@@ -27268,7 +27156,7 @@
|
|
|
27268
27156
|
x += point.x, y += point.y, pickContext.setTransformForCurrent();
|
|
27269
27157
|
} else x = 0, y = 0, onlyTranslate = !1, pickContext.transformFromMatrix(rect.transMatrix, !0);
|
|
27270
27158
|
let picked = !0;
|
|
27271
|
-
if (!onlyTranslate || rect.shadowRoot || isNumber$
|
|
27159
|
+
if (!onlyTranslate || rect.shadowRoot || isNumber$1(cornerRadius, !0) && 0 !== cornerRadius || isArray$1(cornerRadius) && cornerRadius.some(num => 0 !== num)) picked = !1, this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, rectAttribute, themeAttribute) => {
|
|
27272
27160
|
if (picked) return !0;
|
|
27273
27161
|
const lineWidth = rectAttribute.lineWidth || themeAttribute.lineWidth,
|
|
27274
27162
|
pickStrokeBuffer = rectAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
|
|
@@ -32008,7 +31896,7 @@
|
|
|
32008
31896
|
|
|
32009
31897
|
const roughModule = _roughModule;
|
|
32010
31898
|
|
|
32011
|
-
const version = "0.22.
|
|
31899
|
+
const version = "0.22.10";
|
|
32012
31900
|
preLoadAllModule();
|
|
32013
31901
|
if (isBrowserEnv()) {
|
|
32014
31902
|
loadBrowserEnv(container);
|
|
@@ -32304,6 +32192,7 @@
|
|
|
32304
32192
|
exports.StarRenderContribution = StarRenderContribution;
|
|
32305
32193
|
exports.StaticLayerHandlerContribution = StaticLayerHandlerContribution;
|
|
32306
32194
|
exports.Step = Step$1;
|
|
32195
|
+
exports.StepClosed = StepClosed;
|
|
32307
32196
|
exports.StreamLight = StreamLight;
|
|
32308
32197
|
exports.SubAnimate = SubAnimate;
|
|
32309
32198
|
exports.Symbol = Symbol$1;
|
|
@@ -32394,11 +32283,9 @@
|
|
|
32394
32283
|
exports.createArc = createArc;
|
|
32395
32284
|
exports.createArc3d = createArc3d;
|
|
32396
32285
|
exports.createArea = createArea;
|
|
32397
|
-
exports.createCanvasEventTransformer = createCanvasEventTransformer;
|
|
32398
32286
|
exports.createCircle = createCircle;
|
|
32399
32287
|
exports.createColor = createColor;
|
|
32400
32288
|
exports.createConicalGradient = createConicalGradient;
|
|
32401
|
-
exports.createEventTransformer = createEventTransformer;
|
|
32402
32289
|
exports.createGifImage = createGifImage;
|
|
32403
32290
|
exports.createGlyph = createGlyph;
|
|
32404
32291
|
exports.createGroup = createGroup;
|
|
@@ -32487,6 +32374,7 @@
|
|
|
32487
32374
|
exports.genMonotoneYSegments = genMonotoneYSegments;
|
|
32488
32375
|
exports.genMonotoneYTypeSegments = genMonotoneYTypeSegments;
|
|
32489
32376
|
exports.genNumberType = genNumberType;
|
|
32377
|
+
exports.genStepClosedSegments = genStepClosedSegments;
|
|
32490
32378
|
exports.genStepSegments = genStepSegments;
|
|
32491
32379
|
exports.genStepTypeSegments = genStepTypeSegments;
|
|
32492
32380
|
exports.generatorPathEasingFunc = generatorPathEasingFunc;
|
|
@@ -32557,7 +32445,6 @@
|
|
|
32557
32445
|
exports.lottieCanvasPickModule = lottieCanvasPickModule;
|
|
32558
32446
|
exports.lottieModule = lottieModule;
|
|
32559
32447
|
exports.lynxEnvModule = lynxEnvModule;
|
|
32560
|
-
exports.mapToCanvasPointForCanvas = mapToCanvasPointForCanvas;
|
|
32561
32448
|
exports.mat3Tomat4 = mat3Tomat4;
|
|
32562
32449
|
exports.mat4Allocate = mat4Allocate;
|
|
32563
32450
|
exports.matrixAllocate = matrixAllocate;
|
|
@@ -32617,7 +32504,6 @@
|
|
|
32617
32504
|
exports.registerFlexLayoutPlugin = registerFlexLayoutPlugin;
|
|
32618
32505
|
exports.registerGifGraphic = registerGifGraphic;
|
|
32619
32506
|
exports.registerGifImage = registerGifImage;
|
|
32620
|
-
exports.registerGlobalEventTransformer = registerGlobalEventTransformer;
|
|
32621
32507
|
exports.registerGlyph = registerGlyph;
|
|
32622
32508
|
exports.registerGlyphGraphic = registerGlyphGraphic;
|
|
32623
32509
|
exports.registerGroup = registerGroup;
|
|
@@ -32650,7 +32536,6 @@
|
|
|
32650
32536
|
exports.registerText = registerText;
|
|
32651
32537
|
exports.registerTextGraphic = registerTextGraphic;
|
|
32652
32538
|
exports.registerViewTransform3dPlugin = registerViewTransform3dPlugin;
|
|
32653
|
-
exports.registerWindowEventTransformer = registerWindowEventTransformer;
|
|
32654
32539
|
exports.registerWrapText = registerWrapText;
|
|
32655
32540
|
exports.registerWrapTextGraphic = registerWrapTextGraphic;
|
|
32656
32541
|
exports.renderCommandList = renderCommandList;
|
|
@@ -32701,7 +32586,6 @@
|
|
|
32701
32586
|
exports.textModule = textModule;
|
|
32702
32587
|
exports.transformKeys = transformKeys;
|
|
32703
32588
|
exports.transformMat4 = transformMat4;
|
|
32704
|
-
exports.transformPointForCanvas = transformPointForCanvas;
|
|
32705
32589
|
exports.transformUtil = transformUtil;
|
|
32706
32590
|
exports.translate = translate;
|
|
32707
32591
|
exports.ttEnvModule = ttEnvModule;
|