@visactor/vrender 0.15.0-alpha.14 → 0.15.0-alpha.15
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/core/contributions/window/browser-contribution.js +1 -1
- package/cjs/core/contributions/window/browser-contribution.js.map +1 -1
- package/cjs/core/graphic-utils.d.ts +2 -0
- package/cjs/core/graphic-utils.js +13 -0
- package/cjs/core/graphic-utils.js.map +1 -1
- package/cjs/event/event-manager.js +8 -8
- package/cjs/event/event-manager.js.map +1 -1
- package/cjs/event/event-system.js.map +1 -1
- package/cjs/event/federated-event/pointer-event.d.ts +1 -0
- package/cjs/event/federated-event/pointer-event.js.map +1 -1
- package/cjs/graphic/config.js +2 -1
- package/cjs/graphic/config.js.map +1 -1
- package/cjs/graphic/graphic.d.ts +1 -1
- package/cjs/graphic/graphic.js +12 -5
- package/cjs/graphic/graphic.js.map +1 -1
- package/cjs/index.d.ts +2 -1
- package/cjs/index.js +2 -2
- package/cjs/index.js.map +1 -1
- package/cjs/interface/core.d.ts +1 -0
- package/cjs/interface/core.js.map +1 -1
- package/cjs/interface/graphic.d.ts +2 -1
- package/cjs/interface/graphic.js.map +1 -1
- package/cjs/interface/picker.d.ts +9 -1
- package/cjs/interface/picker.js.map +1 -1
- package/cjs/picker/canvas-picker-service.d.ts +2 -2
- package/cjs/picker/canvas-picker-service.js +20 -3
- package/cjs/picker/canvas-picker-service.js.map +1 -1
- package/cjs/picker/contributions/canvas-picker/glyph-picker.js +1 -1
- package/cjs/picker/contributions/canvas-picker/glyph-picker.js.map +1 -1
- package/cjs/picker/contributions/canvas-picker/group-picker.d.ts +7 -0
- package/cjs/picker/contributions/canvas-picker/group-picker.js +26 -0
- package/cjs/picker/contributions/canvas-picker/group-picker.js.map +1 -0
- package/cjs/picker/contributions/canvas-picker/module.js +3 -1
- package/cjs/picker/contributions/canvas-picker/module.js.map +1 -1
- package/cjs/picker/contributions/constants.d.ts +1 -0
- package/cjs/picker/contributions/constants.js +9 -8
- package/cjs/picker/contributions/constants.js.map +1 -1
- package/cjs/picker/contributions/math-picker/glyph-picker.js +1 -1
- package/cjs/picker/contributions/math-picker/glyph-picker.js.map +1 -1
- package/cjs/picker/global-picker-service.d.ts +1 -1
- package/cjs/picker/global-picker-service.js +12 -5
- package/cjs/picker/global-picker-service.js.map +1 -1
- package/cjs/picker/math-picker-service.d.ts +2 -2
- package/cjs/picker/math-picker-service.js +1 -1
- package/cjs/picker/math-picker-service.js.map +1 -1
- package/cjs/picker/pick-interceptor.d.ts +12 -0
- package/cjs/picker/pick-interceptor.js +30 -2
- package/cjs/picker/pick-interceptor.js.map +1 -1
- package/cjs/picker/pick-modules.js +2 -0
- package/cjs/picker/pick-modules.js.map +1 -1
- package/cjs/picker/picker-service.d.ts +1 -1
- package/cjs/picker/picker-service.js +15 -6
- package/cjs/picker/picker-service.js.map +1 -1
- package/cjs/plugins/builtin-plugin/html-attribute-plugin.js +1 -1
- package/cjs/plugins/builtin-plugin/html-attribute-plugin.js.map +1 -1
- package/cjs/render/contributions/render/draw-interceptor.d.ts +2 -0
- package/cjs/render/contributions/render/draw-interceptor.js +8 -0
- package/cjs/render/contributions/render/draw-interceptor.js.map +1 -1
- package/dist/index.js +198 -31
- package/dist/index.min.js +1 -1
- package/es/core/contributions/window/browser-contribution.js +1 -1
- package/es/core/contributions/window/browser-contribution.js.map +1 -1
- package/es/core/graphic-utils.d.ts +2 -0
- package/es/core/graphic-utils.js +13 -0
- package/es/core/graphic-utils.js.map +1 -1
- package/es/event/event-manager.js +8 -8
- package/es/event/event-manager.js.map +1 -1
- package/es/event/event-system.js.map +1 -1
- package/es/event/federated-event/pointer-event.d.ts +1 -0
- package/es/event/federated-event/pointer-event.js.map +1 -1
- package/es/graphic/config.js +2 -1
- package/es/graphic/config.js.map +1 -1
- package/es/graphic/graphic.d.ts +1 -1
- package/es/graphic/graphic.js +11 -5
- package/es/graphic/graphic.js.map +1 -1
- package/es/index.d.ts +2 -1
- package/es/index.js +3 -1
- package/es/index.js.map +1 -1
- package/es/interface/core.d.ts +1 -0
- package/es/interface/core.js.map +1 -1
- package/es/interface/graphic.d.ts +2 -1
- package/es/interface/graphic.js.map +1 -1
- package/es/interface/picker.d.ts +9 -1
- package/es/interface/picker.js.map +1 -1
- package/es/picker/canvas-picker-service.d.ts +2 -2
- package/es/picker/canvas-picker-service.js +20 -3
- package/es/picker/canvas-picker-service.js.map +1 -1
- package/es/picker/contributions/canvas-picker/glyph-picker.js +1 -1
- package/es/picker/contributions/canvas-picker/glyph-picker.js.map +1 -1
- package/es/picker/contributions/canvas-picker/group-picker.d.ts +7 -0
- package/es/picker/contributions/canvas-picker/group-picker.js +23 -0
- package/es/picker/contributions/canvas-picker/group-picker.js.map +1 -0
- package/es/picker/contributions/canvas-picker/module.js +6 -2
- package/es/picker/contributions/canvas-picker/module.js.map +1 -1
- package/es/picker/contributions/constants.d.ts +1 -0
- package/es/picker/contributions/constants.js +2 -0
- package/es/picker/contributions/constants.js.map +1 -1
- package/es/picker/contributions/math-picker/glyph-picker.js +1 -1
- package/es/picker/contributions/math-picker/glyph-picker.js.map +1 -1
- package/es/picker/global-picker-service.d.ts +1 -1
- package/es/picker/global-picker-service.js +12 -5
- package/es/picker/global-picker-service.js.map +1 -1
- package/es/picker/math-picker-service.d.ts +2 -2
- package/es/picker/math-picker-service.js +1 -1
- package/es/picker/math-picker-service.js.map +1 -1
- package/es/picker/pick-interceptor.d.ts +12 -0
- package/es/picker/pick-interceptor.js +32 -1
- package/es/picker/pick-interceptor.js.map +1 -1
- package/es/picker/pick-modules.js +4 -2
- package/es/picker/pick-modules.js.map +1 -1
- package/es/picker/picker-service.d.ts +1 -1
- package/es/picker/picker-service.js +15 -6
- package/es/picker/picker-service.js.map +1 -1
- package/es/plugins/builtin-plugin/html-attribute-plugin.js +1 -1
- package/es/plugins/builtin-plugin/html-attribute-plugin.js.map +1 -1
- package/es/render/contributions/render/draw-interceptor.d.ts +2 -0
- package/es/render/contributions/render/draw-interceptor.js +8 -0
- package/es/render/contributions/render/draw-interceptor.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9375,7 +9375,7 @@
|
|
|
9375
9375
|
connectedX: NaN,
|
|
9376
9376
|
connectedY: NaN
|
|
9377
9377
|
};
|
|
9378
|
-
const DefaultAttribute = Object.assign(Object.assign({ strokeSeg: null, pickable: true, childrenPickable: true, visible: true, zIndex: 0, layout: null, boundsPadding: 0, pickMode: 'accurate', customPickShape: null, boundsMode: 'accurate', keepDirIn3d: true }, DefaultStyle), DefaultTransform);
|
|
9378
|
+
const DefaultAttribute = Object.assign(Object.assign({ strokeSeg: null, pickable: true, childrenPickable: true, visible: true, zIndex: 0, layout: null, boundsPadding: 0, pickMode: 'accurate', customPickShape: null, boundsMode: 'accurate', keepDirIn3d: true, shadowRootIdx: 1 }, DefaultStyle), DefaultTransform);
|
|
9379
9379
|
function addAttributeToPrototype(obj, c, keys) {
|
|
9380
9380
|
keys.forEach(key => {
|
|
9381
9381
|
c.prototype[key] = obj[key];
|
|
@@ -10589,12 +10589,34 @@
|
|
|
10589
10589
|
this.outTargetMatrix.multiply(_matrix.a, _matrix.b, _matrix.c, _matrix.d, _matrix.e, _matrix.f);
|
|
10590
10590
|
return this;
|
|
10591
10591
|
}
|
|
10592
|
+
rotateMatrix(angle, center) {
|
|
10593
|
+
const sMatrix = this.outSourceMatrix;
|
|
10594
|
+
_matrix.setValue(sMatrix.a, sMatrix.b, sMatrix.c, sMatrix.d, sMatrix.e, sMatrix.f);
|
|
10595
|
+
this.outTargetMatrix.reset();
|
|
10596
|
+
if (center) {
|
|
10597
|
+
const { x, y } = center;
|
|
10598
|
+
this.outTargetMatrix.translate(x, y);
|
|
10599
|
+
this.outTargetMatrix.rotate(angle);
|
|
10600
|
+
this.outTargetMatrix.translate(-x, -y);
|
|
10601
|
+
}
|
|
10602
|
+
else {
|
|
10603
|
+
this.outTargetMatrix.rotate(angle);
|
|
10604
|
+
}
|
|
10605
|
+
this.outTargetMatrix.multiply(_matrix.a, _matrix.b, _matrix.c, _matrix.d, _matrix.e, _matrix.f);
|
|
10606
|
+
return this;
|
|
10607
|
+
}
|
|
10592
10608
|
scale(sx, sy, center) {
|
|
10593
10609
|
if (this.mode === TransformMode.matrix) {
|
|
10594
10610
|
return this.scaleMatrix(sx, sy, center);
|
|
10595
10611
|
}
|
|
10596
10612
|
return this;
|
|
10597
10613
|
}
|
|
10614
|
+
rotate(angle, center) {
|
|
10615
|
+
if (this.mode === TransformMode.matrix) {
|
|
10616
|
+
return this.rotateMatrix(angle, center);
|
|
10617
|
+
}
|
|
10618
|
+
return this;
|
|
10619
|
+
}
|
|
10598
10620
|
translateMatrix(dx, dy) {
|
|
10599
10621
|
const sMatrix = this.outSourceMatrix;
|
|
10600
10622
|
_matrix.setValue(sMatrix.a, sMatrix.b, sMatrix.c, sMatrix.d, sMatrix.e, sMatrix.f);
|
|
@@ -11926,11 +11948,13 @@
|
|
|
11926
11948
|
target = this._prePointTargetCache[cacheKey];
|
|
11927
11949
|
}
|
|
11928
11950
|
else {
|
|
11929
|
-
target = this.pickTarget(e.canvasX, e.canvasY);
|
|
11930
|
-
|
|
11931
|
-
|
|
11932
|
-
|
|
11933
|
-
|
|
11951
|
+
target = this.pickTarget(e.canvasX, e.canvasY, e);
|
|
11952
|
+
if (!e.pickParams) {
|
|
11953
|
+
this._prePointTargetCache = {
|
|
11954
|
+
[cacheKey]: target,
|
|
11955
|
+
stageRenderCount: (_e = target === null || target === void 0 ? void 0 : target.stage.renderCount) !== null && _e !== void 0 ? _e : -1
|
|
11956
|
+
};
|
|
11957
|
+
}
|
|
11934
11958
|
}
|
|
11935
11959
|
if (mappers) {
|
|
11936
11960
|
for (let i = 0, j = mappers.length; i < j; i++) {
|
|
@@ -12015,7 +12039,7 @@
|
|
|
12015
12039
|
event.target = target;
|
|
12016
12040
|
}
|
|
12017
12041
|
else {
|
|
12018
|
-
event.target = this.pickTarget(event.global.x, event.global.y);
|
|
12042
|
+
event.target = this.pickTarget(event.global.x, event.global.y, event);
|
|
12019
12043
|
}
|
|
12020
12044
|
if (typeof type === 'string') {
|
|
12021
12045
|
event.type = type;
|
|
@@ -12029,7 +12053,7 @@
|
|
|
12029
12053
|
this.copyData(from, event);
|
|
12030
12054
|
event.nativeEvent = from.nativeEvent;
|
|
12031
12055
|
event.originalEvent = from;
|
|
12032
|
-
event.target = target || this.pickTarget(event.global.x, event.global.y);
|
|
12056
|
+
event.target = target || this.pickTarget(event.global.x, event.global.y, event);
|
|
12033
12057
|
return event;
|
|
12034
12058
|
}
|
|
12035
12059
|
clonePointerEvent(from, type) {
|
|
@@ -12093,6 +12117,7 @@
|
|
|
12093
12117
|
to.which = from.which;
|
|
12094
12118
|
to.layer.copyFrom(from.layer);
|
|
12095
12119
|
to.page.copyFrom(from.page);
|
|
12120
|
+
to.pickParams = from.pickParams;
|
|
12096
12121
|
}
|
|
12097
12122
|
trackingData(id) {
|
|
12098
12123
|
if (!this.mappingState.trackingData[id]) {
|
|
@@ -12162,7 +12187,7 @@
|
|
|
12162
12187
|
}
|
|
12163
12188
|
}
|
|
12164
12189
|
}
|
|
12165
|
-
pickTarget(x, y) {
|
|
12190
|
+
pickTarget(x, y, e) {
|
|
12166
12191
|
let target;
|
|
12167
12192
|
const pickResult = this.rootTarget.pick(x, y);
|
|
12168
12193
|
if (pickResult && pickResult.graphic) {
|
|
@@ -12177,6 +12202,9 @@
|
|
|
12177
12202
|
else {
|
|
12178
12203
|
target = null;
|
|
12179
12204
|
}
|
|
12205
|
+
if (e) {
|
|
12206
|
+
e.pickParams = pickResult.params;
|
|
12207
|
+
}
|
|
12180
12208
|
return target;
|
|
12181
12209
|
}
|
|
12182
12210
|
}
|
|
@@ -17453,20 +17481,30 @@
|
|
|
17453
17481
|
this.onAttributeUpdate(context);
|
|
17454
17482
|
return this;
|
|
17455
17483
|
}
|
|
17456
|
-
rotate(angle) {
|
|
17484
|
+
rotate(angle, rotateCenter) {
|
|
17457
17485
|
var _a;
|
|
17458
17486
|
if (angle === 0) {
|
|
17459
17487
|
return this;
|
|
17460
17488
|
}
|
|
17461
17489
|
const context = { type: exports.AttributeUpdateType.ROTATE };
|
|
17462
17490
|
const params = this.onBeforeAttributeUpdate &&
|
|
17463
|
-
this.onBeforeAttributeUpdate(angle, this.attribute, tempConstantAngleKey, context);
|
|
17491
|
+
this.onBeforeAttributeUpdate({ angle, rotateCenter }, this.attribute, tempConstantAngleKey, context);
|
|
17464
17492
|
if (params) {
|
|
17493
|
+
delete params.angle;
|
|
17465
17494
|
this._setAttributes(params, false, context);
|
|
17466
|
-
return this;
|
|
17467
17495
|
}
|
|
17468
17496
|
const attribute = this.attribute;
|
|
17469
|
-
|
|
17497
|
+
if (!rotateCenter) {
|
|
17498
|
+
attribute.angle = ((_a = attribute.angle) !== null && _a !== void 0 ? _a : DefaultTransform.angle) + angle;
|
|
17499
|
+
}
|
|
17500
|
+
else {
|
|
17501
|
+
let { postMatrix } = this.attribute;
|
|
17502
|
+
if (!postMatrix) {
|
|
17503
|
+
postMatrix = new Matrix();
|
|
17504
|
+
attribute.postMatrix = postMatrix;
|
|
17505
|
+
}
|
|
17506
|
+
application.transformUtil.fromMatrix(postMatrix, postMatrix).rotate(angle, rotateCenter);
|
|
17507
|
+
}
|
|
17470
17508
|
this.addUpdatePositionTag();
|
|
17471
17509
|
this.addUpdateBoundTag();
|
|
17472
17510
|
this.addUpdateLayoutTag();
|
|
@@ -25526,6 +25564,8 @@
|
|
|
25526
25564
|
injectable()
|
|
25527
25565
|
], DefaultPathOuterBorderBoundsContribution);
|
|
25528
25566
|
|
|
25567
|
+
const MatrixAllocate = Symbol.for('MatrixAllocate');
|
|
25568
|
+
const Mat4Allocate = Symbol.for('Mat4Allocate');
|
|
25529
25569
|
function createMat4() {
|
|
25530
25570
|
return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
|
25531
25571
|
}
|
|
@@ -29952,6 +29992,46 @@
|
|
|
29952
29992
|
}
|
|
29953
29993
|
|
|
29954
29994
|
const PickItemInterceptor = Symbol.for('PickItemInterceptor');
|
|
29995
|
+
let ShadowRootPickItemInterceptorContribution = class ShadowRootPickItemInterceptorContribution {
|
|
29996
|
+
constructor() {
|
|
29997
|
+
this.order = 1;
|
|
29998
|
+
}
|
|
29999
|
+
afterPickItem(graphic, pickerService, point, pickParams, params) {
|
|
30000
|
+
if (graphic.attribute.shadowRootIdx > 0 || !graphic.attribute.shadowRootIdx) {
|
|
30001
|
+
return this._pickItem(graphic, pickerService, point, pickParams, params);
|
|
30002
|
+
}
|
|
30003
|
+
return false;
|
|
30004
|
+
}
|
|
30005
|
+
beforePickItem(graphic, pickerService, point, pickParams, params) {
|
|
30006
|
+
if (graphic.attribute.shadowRootIdx < 0) {
|
|
30007
|
+
return this._pickItem(graphic, pickerService, point, pickParams, params);
|
|
30008
|
+
}
|
|
30009
|
+
return false;
|
|
30010
|
+
}
|
|
30011
|
+
_pickItem(graphic, pickerService, point, pickParams, params) {
|
|
30012
|
+
if (!graphic.shadowRoot) {
|
|
30013
|
+
return false;
|
|
30014
|
+
}
|
|
30015
|
+
const { parentMatrix } = params || {};
|
|
30016
|
+
if (!parentMatrix) {
|
|
30017
|
+
return false;
|
|
30018
|
+
}
|
|
30019
|
+
const context = pickerService.pickContext;
|
|
30020
|
+
context.highPerformanceSave();
|
|
30021
|
+
const g = graphic.shadowRoot;
|
|
30022
|
+
const currentGroupMatrix = matrixAllocate.allocateByObj(parentMatrix);
|
|
30023
|
+
const newPoint = new Point(point.x, point.y);
|
|
30024
|
+
parentMatrix.transformPoint(newPoint, newPoint);
|
|
30025
|
+
const transMatrix = graphic.transMatrix;
|
|
30026
|
+
currentGroupMatrix.multiply(transMatrix.a, transMatrix.b, transMatrix.c, transMatrix.d, transMatrix.e, transMatrix.f);
|
|
30027
|
+
const result = pickerService.pickGroup(g, newPoint.clone(), currentGroupMatrix, pickParams);
|
|
30028
|
+
context.highPerformanceRestore();
|
|
30029
|
+
return result;
|
|
30030
|
+
}
|
|
30031
|
+
};
|
|
30032
|
+
ShadowRootPickItemInterceptorContribution = __decorate([
|
|
30033
|
+
injectable()
|
|
30034
|
+
], ShadowRootPickItemInterceptorContribution);
|
|
29955
30035
|
let Canvas3DPickItemInterceptor = class Canvas3DPickItemInterceptor {
|
|
29956
30036
|
constructor() {
|
|
29957
30037
|
this.order = 1;
|
|
@@ -30118,7 +30198,7 @@
|
|
|
30118
30198
|
result = this.pickGroup(graphics[i], point, parentMatrix, params);
|
|
30119
30199
|
}
|
|
30120
30200
|
else {
|
|
30121
|
-
result.graphic = this.pickItem(graphics[i], point, params);
|
|
30201
|
+
result.graphic = this.pickItem(graphics[i], point, parentMatrix, params);
|
|
30122
30202
|
}
|
|
30123
30203
|
if (result.graphic) {
|
|
30124
30204
|
break;
|
|
@@ -30133,10 +30213,22 @@
|
|
|
30133
30213
|
if (this.pickContext) {
|
|
30134
30214
|
this.pickContext.inuse = false;
|
|
30135
30215
|
}
|
|
30216
|
+
if (result.graphic) {
|
|
30217
|
+
let g = result.graphic;
|
|
30218
|
+
while (g.parent) {
|
|
30219
|
+
g = g.parent;
|
|
30220
|
+
}
|
|
30221
|
+
if (g.shadowHost) {
|
|
30222
|
+
result.params = {
|
|
30223
|
+
shadowTarget: result.graphic
|
|
30224
|
+
};
|
|
30225
|
+
result.graphic = g.shadowHost;
|
|
30226
|
+
}
|
|
30227
|
+
}
|
|
30136
30228
|
return result;
|
|
30137
30229
|
}
|
|
30138
30230
|
containsPoint(graphic, point, params) {
|
|
30139
|
-
return !!this.pickItem(graphic, point, params);
|
|
30231
|
+
return !!this.pickItem(graphic, point, null, params);
|
|
30140
30232
|
}
|
|
30141
30233
|
pickGroup(group, point, parentMatrix, params) {
|
|
30142
30234
|
let result = {
|
|
@@ -30187,9 +30279,13 @@
|
|
|
30187
30279
|
if (!insideGroup && !group.stage.camera) {
|
|
30188
30280
|
return result;
|
|
30189
30281
|
}
|
|
30282
|
+
const pickedItem = this.pickItem(group, newPoint.clone(), parentMatrix, params);
|
|
30283
|
+
if (pickedItem) {
|
|
30284
|
+
result.graphic = pickedItem;
|
|
30285
|
+
}
|
|
30190
30286
|
const groupPicked = group.attribute.pickable !== false && insideGroup;
|
|
30191
30287
|
currentGroupMatrix.multiply(transMatrix.a, transMatrix.b, transMatrix.c, transMatrix.d, transMatrix.e, transMatrix.f);
|
|
30192
|
-
if (group.attribute.childrenPickable !== false) {
|
|
30288
|
+
if (group.attribute.childrenPickable !== false && !pickedItem) {
|
|
30193
30289
|
foreach(group, DefaultAttribute.zIndex, (graphic) => {
|
|
30194
30290
|
if (graphic.isContainer) {
|
|
30195
30291
|
const newPoint = new Point(point.x, point.y);
|
|
@@ -30206,7 +30302,7 @@
|
|
|
30206
30302
|
const { scrollX = theme.scrollX, scrollY = theme.scrollY } = group.attribute;
|
|
30207
30303
|
newPoint.x -= scrollX;
|
|
30208
30304
|
newPoint.y -= scrollY;
|
|
30209
|
-
const pickedItem = this.pickItem(graphic, newPoint, params);
|
|
30305
|
+
const pickedItem = this.pickItem(graphic, newPoint, parentMatrix, params);
|
|
30210
30306
|
result.graphic = pickedItem;
|
|
30211
30307
|
}
|
|
30212
30308
|
return !!result.graphic || !!result.group;
|
|
@@ -30262,7 +30358,7 @@
|
|
|
30262
30358
|
result = this.pickGroup(graphics[i], point, parentMatrix, params);
|
|
30263
30359
|
}
|
|
30264
30360
|
else {
|
|
30265
|
-
result.graphic = this.pickItem(graphics[i], point, params);
|
|
30361
|
+
result.graphic = this.pickItem(graphics[i], point, parentMatrix, params);
|
|
30266
30362
|
}
|
|
30267
30363
|
if (result.graphic) {
|
|
30268
30364
|
break;
|
|
@@ -30274,10 +30370,22 @@
|
|
|
30274
30370
|
if (!result.graphic) {
|
|
30275
30371
|
result.group = group;
|
|
30276
30372
|
}
|
|
30373
|
+
if (result.graphic) {
|
|
30374
|
+
let g = result.graphic;
|
|
30375
|
+
while (g.parent) {
|
|
30376
|
+
g = g.parent;
|
|
30377
|
+
}
|
|
30378
|
+
if (g.shadowHost) {
|
|
30379
|
+
result.params = {
|
|
30380
|
+
shadowTarget: result.graphic
|
|
30381
|
+
};
|
|
30382
|
+
result.graphic = g.shadowHost;
|
|
30383
|
+
}
|
|
30384
|
+
}
|
|
30277
30385
|
return result;
|
|
30278
30386
|
}
|
|
30279
30387
|
containsPoint(graphic, point, params) {
|
|
30280
|
-
return !!this.pickItem(graphic, point, params);
|
|
30388
|
+
return !!this.pickItem(graphic, point, null, params);
|
|
30281
30389
|
}
|
|
30282
30390
|
pickGroup(group, point, parentMatrix, params) {
|
|
30283
30391
|
let result = {
|
|
@@ -30304,7 +30412,7 @@
|
|
|
30304
30412
|
else {
|
|
30305
30413
|
const newPoint = new Point(point.x, point.y);
|
|
30306
30414
|
parentMatrix.transformPoint(newPoint, newPoint);
|
|
30307
|
-
result.graphic = this.pickItem(graphic, newPoint, params);
|
|
30415
|
+
result.graphic = this.pickItem(graphic, newPoint, parentMatrix, params);
|
|
30308
30416
|
}
|
|
30309
30417
|
return !!result.graphic || !!result.group;
|
|
30310
30418
|
});
|
|
@@ -30314,7 +30422,7 @@
|
|
|
30314
30422
|
}
|
|
30315
30423
|
return result;
|
|
30316
30424
|
}
|
|
30317
|
-
pickItem(graphic, point, params) {
|
|
30425
|
+
pickItem(graphic, point, parentMatrix, params) {
|
|
30318
30426
|
if (graphic.attribute.pickable === false) {
|
|
30319
30427
|
return null;
|
|
30320
30428
|
}
|
|
@@ -31540,6 +31648,7 @@
|
|
|
31540
31648
|
const CanvasPyramid3dPicker = Symbol.for('CanvasPyramid3dPicker');
|
|
31541
31649
|
const CanvasRichTextPicker = Symbol.for('CanvasRichTextPicker');
|
|
31542
31650
|
const CanvasGlyphPicker = Symbol.for('CanvasGlyphPicker');
|
|
31651
|
+
const CanvasGroupPicker = Symbol.for('CanvasGroupPicker');
|
|
31543
31652
|
const CanvasPickerContribution = Symbol.for('CanvasPickerContribution');
|
|
31544
31653
|
const MathArcPicker = Symbol.for('MathArcPicker');
|
|
31545
31654
|
const MathAreaPicker = Symbol.for('MathAreaPicker');
|
|
@@ -31593,7 +31702,7 @@
|
|
|
31593
31702
|
this.pickCanvas = new exports.BrowserCanvas(options);
|
|
31594
31703
|
this.pickContext = this.pickCanvas.getContext('2d');
|
|
31595
31704
|
}
|
|
31596
|
-
pickItem(graphic, point, params) {
|
|
31705
|
+
pickItem(graphic, point, parentMatrix, params) {
|
|
31597
31706
|
if (graphic.attribute.pickable === false) {
|
|
31598
31707
|
return null;
|
|
31599
31708
|
}
|
|
@@ -31601,8 +31710,9 @@
|
|
|
31601
31710
|
for (let i = 0; i < this.InterceptorContributions.length; i++) {
|
|
31602
31711
|
const drawContribution = this.InterceptorContributions[i];
|
|
31603
31712
|
if (drawContribution.beforePickItem) {
|
|
31604
|
-
|
|
31605
|
-
|
|
31713
|
+
const ret = drawContribution.beforePickItem(graphic, this, point, params, { parentMatrix });
|
|
31714
|
+
if (ret) {
|
|
31715
|
+
return ret === true ? graphic : ret.graphic;
|
|
31606
31716
|
}
|
|
31607
31717
|
}
|
|
31608
31718
|
}
|
|
@@ -31611,7 +31721,22 @@
|
|
|
31611
31721
|
if (!picker) {
|
|
31612
31722
|
return null;
|
|
31613
31723
|
}
|
|
31614
|
-
|
|
31724
|
+
const data = picker.contains(graphic, point, params) ? graphic : null;
|
|
31725
|
+
if (data) {
|
|
31726
|
+
return data;
|
|
31727
|
+
}
|
|
31728
|
+
if (this.InterceptorContributions.length) {
|
|
31729
|
+
for (let i = 0; i < this.InterceptorContributions.length; i++) {
|
|
31730
|
+
const drawContribution = this.InterceptorContributions[i];
|
|
31731
|
+
if (drawContribution.afterPickItem) {
|
|
31732
|
+
const ret = drawContribution.afterPickItem(graphic, this, point, params, { parentMatrix });
|
|
31733
|
+
if (ret) {
|
|
31734
|
+
return ret === true ? graphic : ret.graphic;
|
|
31735
|
+
}
|
|
31736
|
+
}
|
|
31737
|
+
}
|
|
31738
|
+
}
|
|
31739
|
+
return data;
|
|
31615
31740
|
}
|
|
31616
31741
|
};
|
|
31617
31742
|
__decorate([
|
|
@@ -31916,7 +32041,7 @@
|
|
|
31916
32041
|
configure(global, env) {
|
|
31917
32042
|
this.pickContext = new exports.EmptyContext2d(null, 1);
|
|
31918
32043
|
}
|
|
31919
|
-
pickItem(graphic, point, params) {
|
|
32044
|
+
pickItem(graphic, point, parentMatrix, params) {
|
|
31920
32045
|
if (graphic.attribute.pickable === false) {
|
|
31921
32046
|
return null;
|
|
31922
32047
|
}
|
|
@@ -31951,6 +32076,8 @@
|
|
|
31951
32076
|
bind(GlobalPickerService).toService(exports.DefaultGlobalPickerService);
|
|
31952
32077
|
bind(Canvas3DPickItemInterceptor).toSelf().inSingletonScope();
|
|
31953
32078
|
bind(PickItemInterceptor).toService(Canvas3DPickItemInterceptor);
|
|
32079
|
+
bind(ShadowRootPickItemInterceptorContribution).toSelf().inSingletonScope();
|
|
32080
|
+
bind(PickItemInterceptor).toService(ShadowRootPickItemInterceptorContribution);
|
|
31954
32081
|
bindContributionProvider(bind, PickItemInterceptor);
|
|
31955
32082
|
});
|
|
31956
32083
|
|
|
@@ -33190,7 +33317,7 @@
|
|
|
33190
33317
|
entries.forEach(entry => {
|
|
33191
33318
|
if (this._canvasIsIntersecting !== entry.isIntersecting) {
|
|
33192
33319
|
this._canvasIsIntersecting = entry.isIntersecting;
|
|
33193
|
-
this._onVisibleChangeCb(entry.isIntersecting);
|
|
33320
|
+
this._onVisibleChangeCb && this._onVisibleChangeCb(entry.isIntersecting);
|
|
33194
33321
|
}
|
|
33195
33322
|
else {
|
|
33196
33323
|
this._canvasIsIntersecting = entry.isIntersecting;
|
|
@@ -35270,6 +35397,18 @@
|
|
|
35270
35397
|
this.order = 1;
|
|
35271
35398
|
}
|
|
35272
35399
|
afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
35400
|
+
if (graphic.attribute.shadowRootIdx > 0 || !graphic.attribute.shadowRootIdx) {
|
|
35401
|
+
this.drawItem(graphic, renderService, drawContext, drawContribution, params);
|
|
35402
|
+
}
|
|
35403
|
+
return false;
|
|
35404
|
+
}
|
|
35405
|
+
beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
35406
|
+
if (graphic.attribute.shadowRootIdx < 0) {
|
|
35407
|
+
this.drawItem(graphic, renderService, drawContext, drawContribution, params);
|
|
35408
|
+
}
|
|
35409
|
+
return false;
|
|
35410
|
+
}
|
|
35411
|
+
drawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
35273
35412
|
if (!graphic.shadowRoot) {
|
|
35274
35413
|
return false;
|
|
35275
35414
|
}
|
|
@@ -37680,7 +37819,7 @@
|
|
|
37680
37819
|
if (picked) {
|
|
37681
37820
|
return;
|
|
37682
37821
|
}
|
|
37683
|
-
picked = !!pickerService.pickItem(g, point, params);
|
|
37822
|
+
picked = !!pickerService.pickItem(g, point, null, params);
|
|
37684
37823
|
});
|
|
37685
37824
|
return picked;
|
|
37686
37825
|
}
|
|
@@ -37839,6 +37978,19 @@
|
|
|
37839
37978
|
__metadata("design:paramtypes", [Object])
|
|
37840
37979
|
], DefaultCanvasArc3dPicker);
|
|
37841
37980
|
|
|
37981
|
+
let DefaultCanvasGroupPicker = class DefaultCanvasGroupPicker {
|
|
37982
|
+
constructor() {
|
|
37983
|
+
this.type = 'group';
|
|
37984
|
+
this.numberType = GROUP_NUMBER_TYPE;
|
|
37985
|
+
}
|
|
37986
|
+
contains(group, point, params) {
|
|
37987
|
+
return false;
|
|
37988
|
+
}
|
|
37989
|
+
};
|
|
37990
|
+
DefaultCanvasGroupPicker = __decorate([
|
|
37991
|
+
injectable()
|
|
37992
|
+
], DefaultCanvasGroupPicker);
|
|
37993
|
+
|
|
37842
37994
|
var canvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
37843
37995
|
bind(DefaultCanvasCirclePicker).toSelf().inSingletonScope();
|
|
37844
37996
|
bind(CanvasCirclePicker).toService(DefaultCanvasCirclePicker);
|
|
@@ -37885,6 +38037,9 @@
|
|
|
37885
38037
|
bind(DefaultCanvasGlyphPicker).toSelf().inSingletonScope();
|
|
37886
38038
|
bind(CanvasGlyphPicker).toService(DefaultCanvasGlyphPicker);
|
|
37887
38039
|
bind(CanvasPickerContribution).toService(CanvasGlyphPicker);
|
|
38040
|
+
bind(DefaultCanvasGroupPicker).toSelf().inSingletonScope();
|
|
38041
|
+
bind(CanvasGroupPicker).toService(DefaultCanvasGroupPicker);
|
|
38042
|
+
bind(CanvasPickerContribution).toService(CanvasGroupPicker);
|
|
37888
38043
|
bindContributionProvider(bind, CanvasPickerContribution);
|
|
37889
38044
|
});
|
|
37890
38045
|
|
|
@@ -38394,7 +38549,7 @@
|
|
|
38394
38549
|
if (picked) {
|
|
38395
38550
|
return;
|
|
38396
38551
|
}
|
|
38397
|
-
picked = !!pickerService.pickItem(g, point, params);
|
|
38552
|
+
picked = !!pickerService.pickItem(g, point, null, params);
|
|
38398
38553
|
});
|
|
38399
38554
|
return picked;
|
|
38400
38555
|
}
|
|
@@ -38768,7 +38923,12 @@
|
|
|
38768
38923
|
renderGroupHTML(group) {
|
|
38769
38924
|
this.renderGraphicHTML(group);
|
|
38770
38925
|
group.forEachChildren((g) => {
|
|
38771
|
-
|
|
38926
|
+
if (g.isContainer) {
|
|
38927
|
+
this.renderGroupHTML(g);
|
|
38928
|
+
}
|
|
38929
|
+
else {
|
|
38930
|
+
this.renderGraphicHTML(g);
|
|
38931
|
+
}
|
|
38772
38932
|
});
|
|
38773
38933
|
}
|
|
38774
38934
|
renderGraphicHTML(graphic) {
|
|
@@ -40035,7 +40195,7 @@
|
|
|
40035
40195
|
}
|
|
40036
40196
|
const Fragment = Group;
|
|
40037
40197
|
|
|
40038
|
-
const version = "0.15.0-alpha.
|
|
40198
|
+
const version = "0.15.0-alpha.15";
|
|
40039
40199
|
|
|
40040
40200
|
exports.ACustomAnimate = ACustomAnimate;
|
|
40041
40201
|
exports.ARC3D_NUMBER_TYPE = ARC3D_NUMBER_TYPE;
|
|
@@ -40087,6 +40247,8 @@
|
|
|
40087
40247
|
exports.DefaultImageAttribute = DefaultImageAttribute;
|
|
40088
40248
|
exports.DefaultLayout = DefaultLayout;
|
|
40089
40249
|
exports.DefaultLineAttribute = DefaultLineAttribute;
|
|
40250
|
+
exports.DefaultMat4Allocate = DefaultMat4Allocate;
|
|
40251
|
+
exports.DefaultMatrixAllocate = DefaultMatrixAllocate;
|
|
40090
40252
|
exports.DefaultMorphingAnimateConfig = DefaultMorphingAnimateConfig;
|
|
40091
40253
|
exports.DefaultPathAttribute = DefaultPathAttribute;
|
|
40092
40254
|
exports.DefaultPolygonAttribute = DefaultPolygonAttribute;
|
|
@@ -40154,6 +40316,8 @@
|
|
|
40154
40316
|
exports.LinearClosed = LinearClosed;
|
|
40155
40317
|
exports.ManualTickHandler = ManualTickHandler;
|
|
40156
40318
|
exports.ManualTicker = ManualTicker;
|
|
40319
|
+
exports.Mat4Allocate = Mat4Allocate;
|
|
40320
|
+
exports.MatrixAllocate = MatrixAllocate;
|
|
40157
40321
|
exports.Meteor = Meteor;
|
|
40158
40322
|
exports.MonotoneX = MonotoneX;
|
|
40159
40323
|
exports.MonotoneY = MonotoneY;
|
|
@@ -40263,6 +40427,7 @@
|
|
|
40263
40427
|
exports.createGroup = createGroup;
|
|
40264
40428
|
exports.createImage = createImage;
|
|
40265
40429
|
exports.createLine = createLine;
|
|
40430
|
+
exports.createMat4 = createMat4;
|
|
40266
40431
|
exports.createPath = createPath;
|
|
40267
40432
|
exports.createPolygon = createPolygon;
|
|
40268
40433
|
exports.createPyramid3d = createPyramid3d;
|
|
@@ -40329,6 +40494,8 @@
|
|
|
40329
40494
|
exports.loadFeishuContributions = loadFeishuContributions;
|
|
40330
40495
|
exports.loadTaroContributions = loadTaroContributions;
|
|
40331
40496
|
exports.mat3Tomat4 = mat3Tomat4;
|
|
40497
|
+
exports.mat4Allocate = mat4Allocate;
|
|
40498
|
+
exports.matrixAllocate = matrixAllocate;
|
|
40332
40499
|
exports.morphPath = morphPath;
|
|
40333
40500
|
exports.multiToOneMorph = multiToOneMorph;
|
|
40334
40501
|
exports.multiplyMat4Mat3 = multiplyMat4Mat3;
|