@visactor/react-vchart 2.1.3-alpha.2 → 2.1.3-alpha.4
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/build/index.js +1006 -926
- package/build/index.min.js +3 -3
- package/cjs/components/MarkArea.js +2 -1
- package/cjs/components/ScrollBar.js +1 -2
- package/esm/components/MarkArea.js +2 -1
- package/esm/components/ScrollBar.js +1 -2
- package/package.json +7 -7
package/build/index.js
CHANGED
|
@@ -10245,7 +10245,17 @@
|
|
|
10245
10245
|
});
|
|
10246
10246
|
|
|
10247
10247
|
class Application {}
|
|
10248
|
-
const
|
|
10248
|
+
const APPLICATION_STATE_SYMBOL = Symbol.for("@visactor/vrender-core/application-state");
|
|
10249
|
+
function createApplicationState() {
|
|
10250
|
+
return {
|
|
10251
|
+
application: new Application()
|
|
10252
|
+
};
|
|
10253
|
+
}
|
|
10254
|
+
function getApplicationState() {
|
|
10255
|
+
const scope = globalThis;
|
|
10256
|
+
return scope[APPLICATION_STATE_SYMBOL] || (scope[APPLICATION_STATE_SYMBOL] = createApplicationState()), scope[APPLICATION_STATE_SYMBOL];
|
|
10257
|
+
}
|
|
10258
|
+
const application = getApplicationState().application;
|
|
10249
10259
|
|
|
10250
10260
|
class ResourceLoader {
|
|
10251
10261
|
static GetImage(url, mark) {
|
|
@@ -17717,7 +17727,6 @@
|
|
|
17717
17727
|
}
|
|
17718
17728
|
};
|
|
17719
17729
|
}
|
|
17720
|
-
const sharedGraphicFactory = new GraphicFactory();
|
|
17721
17730
|
class GraphicCreator {
|
|
17722
17731
|
constructor() {
|
|
17723
17732
|
this.store = new Map();
|
|
@@ -17732,13 +17741,25 @@
|
|
|
17732
17741
|
return this.store.has(name) ? createGraphic$1(name, attributes) : null;
|
|
17733
17742
|
}
|
|
17734
17743
|
}
|
|
17735
|
-
const
|
|
17744
|
+
const GRAPHIC_REGISTRY_SYMBOL = Symbol.for("@visactor/vrender-core/graphic-registry");
|
|
17745
|
+
function createGraphicRegistryState() {
|
|
17746
|
+
return {
|
|
17747
|
+
graphicCreator: new GraphicCreator(),
|
|
17748
|
+
graphicFactory: new GraphicFactory()
|
|
17749
|
+
};
|
|
17750
|
+
}
|
|
17751
|
+
function getGraphicRegistryState() {
|
|
17752
|
+
const scope = globalThis;
|
|
17753
|
+
return scope[GRAPHIC_REGISTRY_SYMBOL] || (scope[GRAPHIC_REGISTRY_SYMBOL] = createGraphicRegistryState()), scope[GRAPHIC_REGISTRY_SYMBOL];
|
|
17754
|
+
}
|
|
17755
|
+
const sharedGraphicRegistry = getGraphicRegistryState();
|
|
17756
|
+
const graphicCreator$1 = sharedGraphicRegistry.graphicCreator;
|
|
17736
17757
|
function registerGraphic(name, creator) {
|
|
17737
17758
|
if (!name) throw new Error("Graphic registration requires a non-empty graphic type");
|
|
17738
|
-
graphicCreator$1.registerStore(name, creator),
|
|
17759
|
+
graphicCreator$1.registerStore(name, creator), sharedGraphicRegistry.graphicFactory.register(name, createGraphicCtor(creator));
|
|
17739
17760
|
}
|
|
17740
17761
|
function createGraphic$1(name, attributes) {
|
|
17741
|
-
return
|
|
17762
|
+
return sharedGraphicRegistry.graphicFactory.create(name, attributes);
|
|
17742
17763
|
}
|
|
17743
17764
|
|
|
17744
17765
|
class Hook {
|
|
@@ -18447,6 +18468,17 @@
|
|
|
18447
18468
|
}
|
|
18448
18469
|
}
|
|
18449
18470
|
|
|
18471
|
+
const FACTORY_STATE_SYMBOL = Symbol.for("@visactor/vrender-core/factory-state");
|
|
18472
|
+
function createFactoryState() {
|
|
18473
|
+
return {
|
|
18474
|
+
pluginClasses: {}
|
|
18475
|
+
};
|
|
18476
|
+
}
|
|
18477
|
+
function getFactoryState() {
|
|
18478
|
+
const scope = globalThis;
|
|
18479
|
+
return scope[FACTORY_STATE_SYMBOL] || (scope[FACTORY_STATE_SYMBOL] = createFactoryState()), scope[FACTORY_STATE_SYMBOL];
|
|
18480
|
+
}
|
|
18481
|
+
|
|
18450
18482
|
class DefaultGlobalPickerService {
|
|
18451
18483
|
constructor() {
|
|
18452
18484
|
this.global = application.global, this.global.hooks.onSetEnv.tap("global-picker-service", (lastEnv, env, global) => {
|
|
@@ -20351,7 +20383,7 @@
|
|
|
20351
20383
|
return Factory._pluginClasses[pluginKey];
|
|
20352
20384
|
}
|
|
20353
20385
|
};
|
|
20354
|
-
Factory$1._pluginClasses =
|
|
20386
|
+
Factory$1._pluginClasses = getFactoryState().pluginClasses;
|
|
20355
20387
|
|
|
20356
20388
|
function defaultLayerHandlerFactory(layerMode) {
|
|
20357
20389
|
const handlerFactory = application.layerHandlerFactory;
|
|
@@ -20431,6 +20463,17 @@
|
|
|
20431
20463
|
const DynamicLayerHandlerContribution = Symbol.for("DynamicLayerHandlerContribution");
|
|
20432
20464
|
const VirtualLayerHandlerContribution = Symbol.for("VirtualLayerHandlerContribution");
|
|
20433
20465
|
|
|
20466
|
+
const CONTRIBUTION_STORE_STATE_SYMBOL = Symbol.for("@visactor/vrender-core/contribution-store-state");
|
|
20467
|
+
function createContributionStoreState() {
|
|
20468
|
+
return {
|
|
20469
|
+
store: new Map()
|
|
20470
|
+
};
|
|
20471
|
+
}
|
|
20472
|
+
function getContributionStoreState() {
|
|
20473
|
+
const scope = globalThis;
|
|
20474
|
+
return scope[CONTRIBUTION_STORE_STATE_SYMBOL] || (scope[CONTRIBUTION_STORE_STATE_SYMBOL] = createContributionStoreState()), scope[CONTRIBUTION_STORE_STATE_SYMBOL];
|
|
20475
|
+
}
|
|
20476
|
+
|
|
20434
20477
|
const ContributionProvider = Symbol("ContributionProvider");
|
|
20435
20478
|
class ContributionProviderCache {
|
|
20436
20479
|
constructor(serviceIdentifier, container) {
|
|
@@ -20473,7 +20516,7 @@
|
|
|
20473
20516
|
});
|
|
20474
20517
|
}
|
|
20475
20518
|
}
|
|
20476
|
-
ContributionStore.store =
|
|
20519
|
+
ContributionStore.store = getContributionStoreState().store;
|
|
20477
20520
|
|
|
20478
20521
|
class ATextMeasure {
|
|
20479
20522
|
constructor() {
|
|
@@ -22795,13 +22838,26 @@
|
|
|
22795
22838
|
return new LegacyBindingContext();
|
|
22796
22839
|
}
|
|
22797
22840
|
|
|
22798
|
-
const
|
|
22841
|
+
const LEGACY_BOOTSTRAP_STATE_SYMBOL = Symbol.for("@visactor/vrender-core/legacy-bootstrap-state");
|
|
22842
|
+
function createLegacyBootstrapState() {
|
|
22843
|
+
return {
|
|
22844
|
+
legacyBindingContext: createLegacyBindingContext(),
|
|
22845
|
+
preloaded: !1
|
|
22846
|
+
};
|
|
22847
|
+
}
|
|
22848
|
+
function getLegacyBootstrapState() {
|
|
22849
|
+
const scope = globalThis;
|
|
22850
|
+
return scope[LEGACY_BOOTSTRAP_STATE_SYMBOL] || (scope[LEGACY_BOOTSTRAP_STATE_SYMBOL] = createLegacyBootstrapState()), scope[LEGACY_BOOTSTRAP_STATE_SYMBOL];
|
|
22851
|
+
}
|
|
22852
|
+
|
|
22853
|
+
const legacyBootstrapState = getLegacyBootstrapState(),
|
|
22854
|
+
legacyBindingContext = legacyBootstrapState.legacyBindingContext;
|
|
22799
22855
|
function getLegacyTarget(resolver) {
|
|
22800
22856
|
let target;
|
|
22801
22857
|
return () => (void 0 === target && (target = resolver()), target);
|
|
22802
22858
|
}
|
|
22803
22859
|
function preLoadAllModule() {
|
|
22804
|
-
|
|
22860
|
+
legacyBootstrapState.preloaded || (legacyBootstrapState.preloaded = !0, bindCoreModules({
|
|
22805
22861
|
bind: legacyBindingContext.bind
|
|
22806
22862
|
}), bindGraphicModules({
|
|
22807
22863
|
bind: legacyBindingContext.bind
|
|
@@ -22814,7 +22870,6 @@
|
|
|
22814
22870
|
bind: legacyBindingContext.bind
|
|
22815
22871
|
}), load$1(legacyBindingContext), load(legacyBindingContext));
|
|
22816
22872
|
}
|
|
22817
|
-
preLoadAllModule.__loaded = !1;
|
|
22818
22873
|
function getLegacyBindingContext() {
|
|
22819
22874
|
return legacyBindingContext;
|
|
22820
22875
|
}
|
|
@@ -27076,126 +27131,7 @@
|
|
|
27076
27131
|
}
|
|
27077
27132
|
const textModule = bindTextRenderModule;
|
|
27078
27133
|
|
|
27079
|
-
|
|
27080
|
-
constructor(dir, color, ambient = .8) {
|
|
27081
|
-
this.dir = dir, this.color = color, this.colorRgb = ColorStore.Get(color, ColorType.Color1), this.ambient = ambient;
|
|
27082
|
-
const length = sqrt$3(dir[0] * dir[0] + dir[1] * dir[1] + dir[2] * dir[2]);
|
|
27083
|
-
this.formatedDir = [dir[0] / length, dir[1] / length, dir[2] / length];
|
|
27084
|
-
}
|
|
27085
|
-
computeColor(normal, color) {
|
|
27086
|
-
const lightDir = this.formatedDir,
|
|
27087
|
-
brightness = min$1(max$1((normal[0] * lightDir[0] + normal[1] * lightDir[1] + normal[2] * lightDir[2]) * (1 - this.ambient / 2), 0) + this.ambient, 1);
|
|
27088
|
-
let colorArray;
|
|
27089
|
-
colorArray = isString$1(color) ? ColorStore.Get(color, ColorType.Color1) : color;
|
|
27090
|
-
const lightColorArray = this.colorRgb;
|
|
27091
|
-
return `rgb(${lightColorArray[0] * colorArray[0] * brightness}, ${lightColorArray[1] * colorArray[1] * brightness}, ${lightColorArray[2] * colorArray[2] * brightness})`;
|
|
27092
|
-
}
|
|
27093
|
-
}
|
|
27094
|
-
const registerDirectionalLight = () => {
|
|
27095
|
-
Factory$1.registerPlugin("DirectionalLight", DirectionalLight);
|
|
27096
|
-
};
|
|
27097
|
-
|
|
27098
|
-
class OrthoCamera {
|
|
27099
|
-
set params(params) {
|
|
27100
|
-
this._params = Object.assign({}, params), this._projectionMatrixCached = this.forceGetProjectionMatrix(), this._viewMatrixCached = this.forceGetViewMatrix();
|
|
27101
|
-
}
|
|
27102
|
-
get params() {
|
|
27103
|
-
return Object.assign({}, this._params);
|
|
27104
|
-
}
|
|
27105
|
-
constructor(params) {
|
|
27106
|
-
this.params = params;
|
|
27107
|
-
}
|
|
27108
|
-
getViewMatrix() {
|
|
27109
|
-
return this._viewMatrixCached || (this._viewMatrixCached = mat4Allocate.allocate()), this._viewMatrixCached;
|
|
27110
|
-
}
|
|
27111
|
-
forceGetViewMatrix() {
|
|
27112
|
-
this._viewMatrixCached || (this._viewMatrixCached = mat4Allocate.allocate());
|
|
27113
|
-
const {
|
|
27114
|
-
pos: pos,
|
|
27115
|
-
center: center,
|
|
27116
|
-
up: up
|
|
27117
|
-
} = this.params.viewParams;
|
|
27118
|
-
return lookAt(this._viewMatrixCached, pos, center, up), this._vp || (this._vp = mat4Allocate.allocate()), this._vp = multiplyMat4Mat4(this._vp, this.getProjectionMatrix(), this.getViewMatrix()), this._viewMatrixCached;
|
|
27119
|
-
}
|
|
27120
|
-
getProjectionMatrix() {
|
|
27121
|
-
return this._projectionMatrixCached || (this._projectionMatrixCached = mat4Allocate.allocate()), this._projectionMatrixCached;
|
|
27122
|
-
}
|
|
27123
|
-
forceGetProjectionMatrix() {
|
|
27124
|
-
this._projectionMatrixCached || (this._projectionMatrixCached = mat4Allocate.allocate());
|
|
27125
|
-
const {
|
|
27126
|
-
left: left,
|
|
27127
|
-
top: top,
|
|
27128
|
-
right: right,
|
|
27129
|
-
bottom: bottom
|
|
27130
|
-
} = this._params;
|
|
27131
|
-
return ortho(this._projectionMatrixCached, left, right, bottom, top, 0, -2e6), this._vp || (this._vp = mat4Allocate.allocate()), this._vp = multiplyMat4Mat4(this._vp, this.getProjectionMatrix(), this.getViewMatrix()), this._projectionMatrixCached;
|
|
27132
|
-
}
|
|
27133
|
-
getField() {
|
|
27134
|
-
const {
|
|
27135
|
-
fieldRatio = .8,
|
|
27136
|
-
fieldDepth: fieldDepth,
|
|
27137
|
-
left: left,
|
|
27138
|
-
right: right
|
|
27139
|
-
} = this._params;
|
|
27140
|
-
return (null != fieldDepth ? fieldDepth : right - left) * fieldRatio;
|
|
27141
|
-
}
|
|
27142
|
-
getProjectionScale(z) {
|
|
27143
|
-
const field = this.getField();
|
|
27144
|
-
return field / (field + z);
|
|
27145
|
-
}
|
|
27146
|
-
view(x, y, z) {
|
|
27147
|
-
const outP = [0, 0, 0];
|
|
27148
|
-
return transformMat4(outP, [x, y, z], this._viewMatrixCached), outP;
|
|
27149
|
-
}
|
|
27150
|
-
vp(x, y, z) {
|
|
27151
|
-
const outP = [0, 0, 0],
|
|
27152
|
-
{
|
|
27153
|
-
pos: pos
|
|
27154
|
-
} = this._params.viewParams;
|
|
27155
|
-
transformMat4(outP, [x, y, z], this._viewMatrixCached), x = outP[0], y = outP[1], z = outP[2];
|
|
27156
|
-
const sizeProjection = this.getProjectionScale(z);
|
|
27157
|
-
return {
|
|
27158
|
-
x: x * sizeProjection + pos[0],
|
|
27159
|
-
y: y * sizeProjection + pos[1]
|
|
27160
|
-
};
|
|
27161
|
-
}
|
|
27162
|
-
}
|
|
27163
|
-
const registerOrthoCamera = () => {
|
|
27164
|
-
Factory$1.registerPlugin("OrthoCamera", OrthoCamera);
|
|
27165
|
-
};
|
|
27166
|
-
|
|
27167
|
-
class ViewTransform3dPlugin {
|
|
27168
|
-
constructor() {
|
|
27169
|
-
this.name = "ViewTransform3dPlugin", this.activeEvent = "onRegister", this._uid = Generator.GenAutoIncrementId(), this.key = this.name + this._uid, this.onMouseDown = e => {
|
|
27170
|
-
this.option3d || (this.option3d = this.pluginService.stage.option3d), this.option3d && (this.mousedown = !0, this.pageX = e.page.x, this.pageY = e.page.y);
|
|
27171
|
-
}, this.onMouseUp = e => {
|
|
27172
|
-
this.option3d || (this.option3d = this.pluginService.stage.option3d), this.option3d && (this.mousedown = !1);
|
|
27173
|
-
}, this.onMouseMove = e => {
|
|
27174
|
-
var _a, _b;
|
|
27175
|
-
const stage = this.pluginService.stage;
|
|
27176
|
-
if (this.option3d || (this.option3d = stage.option3d), this.option3d && this.mousedown) if (this.pageX && this.pageY) {
|
|
27177
|
-
const deltaX = e.page.x - this.pageX,
|
|
27178
|
-
deltaY = e.page.y - this.pageY;
|
|
27179
|
-
this.pageX = e.page.x, this.pageY = e.page.y;
|
|
27180
|
-
const angle1 = deltaX / 100,
|
|
27181
|
-
angle2 = deltaY / 100;
|
|
27182
|
-
this.option3d.alpha = (null !== (_a = this.option3d.alpha) && void 0 !== _a ? _a : 0) + angle1, this.option3d.beta = (null !== (_b = this.option3d.beta) && void 0 !== _b ? _b : 0) + angle2, stage.set3dOptions(this.option3d), stage.renderNextFrame();
|
|
27183
|
-
} else this.pageX = e.page.x, this.pageY = e.page.y;
|
|
27184
|
-
};
|
|
27185
|
-
}
|
|
27186
|
-
activate(context) {
|
|
27187
|
-
this.pluginService = context;
|
|
27188
|
-
const stage = context.stage;
|
|
27189
|
-
this.option3d = stage.option3d, stage.addEventListener("mousedown", this.onMouseDown), stage.addEventListener("mouseup", this.onMouseUp), stage.addEventListener("mousemove", this.onMouseMove);
|
|
27190
|
-
}
|
|
27191
|
-
deactivate(context) {
|
|
27192
|
-
const stage = context.stage;
|
|
27193
|
-
stage.removeEventListener("mousedown", this.onMouseDown), stage.removeEventListener("mouseup", this.onMouseUp), stage.removeEventListener("mousemove", this.onMouseMove);
|
|
27194
|
-
}
|
|
27195
|
-
}
|
|
27196
|
-
const registerViewTransform3dPlugin = () => {
|
|
27197
|
-
Factory$1.registerPlugin("ViewTransform3dPlugin", ViewTransform3dPlugin);
|
|
27198
|
-
};
|
|
27134
|
+
const browser = isBrowserEnv();
|
|
27199
27135
|
|
|
27200
27136
|
function resolveContainerBinding$1(container, serviceIdentifier) {
|
|
27201
27137
|
const [instance] = container.getAll(serviceIdentifier);
|
|
@@ -27409,6 +27345,94 @@
|
|
|
27409
27345
|
}
|
|
27410
27346
|
}
|
|
27411
27347
|
|
|
27348
|
+
class DirectionalLight {
|
|
27349
|
+
constructor(dir, color, ambient = .8) {
|
|
27350
|
+
this.dir = dir, this.color = color, this.colorRgb = ColorStore.Get(color, ColorType.Color1), this.ambient = ambient;
|
|
27351
|
+
const length = sqrt$3(dir[0] * dir[0] + dir[1] * dir[1] + dir[2] * dir[2]);
|
|
27352
|
+
this.formatedDir = [dir[0] / length, dir[1] / length, dir[2] / length];
|
|
27353
|
+
}
|
|
27354
|
+
computeColor(normal, color) {
|
|
27355
|
+
const lightDir = this.formatedDir,
|
|
27356
|
+
brightness = min$1(max$1((normal[0] * lightDir[0] + normal[1] * lightDir[1] + normal[2] * lightDir[2]) * (1 - this.ambient / 2), 0) + this.ambient, 1);
|
|
27357
|
+
let colorArray;
|
|
27358
|
+
colorArray = isString$1(color) ? ColorStore.Get(color, ColorType.Color1) : color;
|
|
27359
|
+
const lightColorArray = this.colorRgb;
|
|
27360
|
+
return `rgb(${lightColorArray[0] * colorArray[0] * brightness}, ${lightColorArray[1] * colorArray[1] * brightness}, ${lightColorArray[2] * colorArray[2] * brightness})`;
|
|
27361
|
+
}
|
|
27362
|
+
}
|
|
27363
|
+
const registerDirectionalLight = () => {
|
|
27364
|
+
Factory$1.registerPlugin("DirectionalLight", DirectionalLight);
|
|
27365
|
+
};
|
|
27366
|
+
|
|
27367
|
+
class OrthoCamera {
|
|
27368
|
+
set params(params) {
|
|
27369
|
+
this._params = Object.assign({}, params), this._projectionMatrixCached = this.forceGetProjectionMatrix(), this._viewMatrixCached = this.forceGetViewMatrix();
|
|
27370
|
+
}
|
|
27371
|
+
get params() {
|
|
27372
|
+
return Object.assign({}, this._params);
|
|
27373
|
+
}
|
|
27374
|
+
constructor(params) {
|
|
27375
|
+
this.params = params;
|
|
27376
|
+
}
|
|
27377
|
+
getViewMatrix() {
|
|
27378
|
+
return this._viewMatrixCached || (this._viewMatrixCached = mat4Allocate.allocate()), this._viewMatrixCached;
|
|
27379
|
+
}
|
|
27380
|
+
forceGetViewMatrix() {
|
|
27381
|
+
this._viewMatrixCached || (this._viewMatrixCached = mat4Allocate.allocate());
|
|
27382
|
+
const {
|
|
27383
|
+
pos: pos,
|
|
27384
|
+
center: center,
|
|
27385
|
+
up: up
|
|
27386
|
+
} = this.params.viewParams;
|
|
27387
|
+
return lookAt(this._viewMatrixCached, pos, center, up), this._vp || (this._vp = mat4Allocate.allocate()), this._vp = multiplyMat4Mat4(this._vp, this.getProjectionMatrix(), this.getViewMatrix()), this._viewMatrixCached;
|
|
27388
|
+
}
|
|
27389
|
+
getProjectionMatrix() {
|
|
27390
|
+
return this._projectionMatrixCached || (this._projectionMatrixCached = mat4Allocate.allocate()), this._projectionMatrixCached;
|
|
27391
|
+
}
|
|
27392
|
+
forceGetProjectionMatrix() {
|
|
27393
|
+
this._projectionMatrixCached || (this._projectionMatrixCached = mat4Allocate.allocate());
|
|
27394
|
+
const {
|
|
27395
|
+
left: left,
|
|
27396
|
+
top: top,
|
|
27397
|
+
right: right,
|
|
27398
|
+
bottom: bottom
|
|
27399
|
+
} = this._params;
|
|
27400
|
+
return ortho(this._projectionMatrixCached, left, right, bottom, top, 0, -2e6), this._vp || (this._vp = mat4Allocate.allocate()), this._vp = multiplyMat4Mat4(this._vp, this.getProjectionMatrix(), this.getViewMatrix()), this._projectionMatrixCached;
|
|
27401
|
+
}
|
|
27402
|
+
getField() {
|
|
27403
|
+
const {
|
|
27404
|
+
fieldRatio = .8,
|
|
27405
|
+
fieldDepth: fieldDepth,
|
|
27406
|
+
left: left,
|
|
27407
|
+
right: right
|
|
27408
|
+
} = this._params;
|
|
27409
|
+
return (null != fieldDepth ? fieldDepth : right - left) * fieldRatio;
|
|
27410
|
+
}
|
|
27411
|
+
getProjectionScale(z) {
|
|
27412
|
+
const field = this.getField();
|
|
27413
|
+
return field / (field + z);
|
|
27414
|
+
}
|
|
27415
|
+
view(x, y, z) {
|
|
27416
|
+
const outP = [0, 0, 0];
|
|
27417
|
+
return transformMat4(outP, [x, y, z], this._viewMatrixCached), outP;
|
|
27418
|
+
}
|
|
27419
|
+
vp(x, y, z) {
|
|
27420
|
+
const outP = [0, 0, 0],
|
|
27421
|
+
{
|
|
27422
|
+
pos: pos
|
|
27423
|
+
} = this._params.viewParams;
|
|
27424
|
+
transformMat4(outP, [x, y, z], this._viewMatrixCached), x = outP[0], y = outP[1], z = outP[2];
|
|
27425
|
+
const sizeProjection = this.getProjectionScale(z);
|
|
27426
|
+
return {
|
|
27427
|
+
x: x * sizeProjection + pos[0],
|
|
27428
|
+
y: y * sizeProjection + pos[1]
|
|
27429
|
+
};
|
|
27430
|
+
}
|
|
27431
|
+
}
|
|
27432
|
+
const registerOrthoCamera = () => {
|
|
27433
|
+
Factory$1.registerPlugin("OrthoCamera", OrthoCamera);
|
|
27434
|
+
};
|
|
27435
|
+
|
|
27412
27436
|
const EMPTY_PICK_ITEM_INTERCEPTOR_PROVIDER = {
|
|
27413
27437
|
getContributions: () => []
|
|
27414
27438
|
},
|
|
@@ -27721,18 +27745,32 @@
|
|
|
27721
27745
|
}
|
|
27722
27746
|
}
|
|
27723
27747
|
|
|
27724
|
-
const
|
|
27725
|
-
|
|
27726
|
-
|
|
27727
|
-
|
|
27748
|
+
const RUNTIME_INSTALLER_STATE_SYMBOL = Symbol.for("@visactor/vrender-core/runtime-installer-state");
|
|
27749
|
+
function createRuntimeInstallerState() {
|
|
27750
|
+
return {
|
|
27751
|
+
runtimeInstallerContext: createLegacyBindingContext(),
|
|
27752
|
+
preloaded: !1,
|
|
27753
|
+
runtimeEntryKeys: new WeakMap(),
|
|
27754
|
+
runtimeDrawContributions: new WeakMap(),
|
|
27755
|
+
loadedRuntimeContributionModules: new WeakMap()
|
|
27756
|
+
};
|
|
27757
|
+
}
|
|
27758
|
+
function getRuntimeInstallerState() {
|
|
27759
|
+
const scope = globalThis;
|
|
27760
|
+
return scope[RUNTIME_INSTALLER_STATE_SYMBOL] || (scope[RUNTIME_INSTALLER_STATE_SYMBOL] = createRuntimeInstallerState()), scope[RUNTIME_INSTALLER_STATE_SYMBOL];
|
|
27761
|
+
}
|
|
27762
|
+
|
|
27763
|
+
const runtimeInstallerState = getRuntimeInstallerState(),
|
|
27764
|
+
runtimeInstallerContext = runtimeInstallerState.runtimeInstallerContext,
|
|
27765
|
+
RUNTIME_RENDERER_NAMESPACE = "vrender:runtime-renderer",
|
|
27728
27766
|
RUNTIME_PICKER_NAMESPACE = "vrender:runtime-picker",
|
|
27729
|
-
runtimeEntryKeys =
|
|
27730
|
-
runtimeDrawContributions =
|
|
27731
|
-
loadedRuntimeContributionModules =
|
|
27767
|
+
runtimeEntryKeys = runtimeInstallerState.runtimeEntryKeys,
|
|
27768
|
+
runtimeDrawContributions = runtimeInstallerState.runtimeDrawContributions,
|
|
27769
|
+
loadedRuntimeContributionModules = runtimeInstallerState.loadedRuntimeContributionModules,
|
|
27732
27770
|
DEFAULT_RUNTIME_CONTRIBUTION_TARGETS = ["graphic-renderer"],
|
|
27733
27771
|
noopUnbindRuntimeContributionService = () => {};
|
|
27734
27772
|
function ensureRuntimeInstallerPreloaded() {
|
|
27735
|
-
|
|
27773
|
+
runtimeInstallerState.preloaded || (runtimeInstallerState.preloaded = !0, bindCoreModules({
|
|
27736
27774
|
bind: runtimeInstallerContext.bind
|
|
27737
27775
|
}), bindGraphicModules({
|
|
27738
27776
|
bind: runtimeInstallerContext.bind
|
|
@@ -27777,7 +27815,8 @@
|
|
|
27777
27815
|
ContributionStore.refreshAllContributions();
|
|
27778
27816
|
}
|
|
27779
27817
|
function getRuntimeInstallerGlobal() {
|
|
27780
|
-
|
|
27818
|
+
var _a;
|
|
27819
|
+
return ensureRuntimeInstallerPreloaded(), null !== (_a = runtimeInstallerState.runtimeGlobal) && void 0 !== _a || (runtimeInstallerState.runtimeGlobal = new DefaultGlobal(createContributionProvider$1(EnvContribution, runtimeInstallerContext))), runtimeInstallerState.runtimeGlobal;
|
|
27781
27820
|
}
|
|
27782
27821
|
function configureRuntimeApplicationForApp(app) {
|
|
27783
27822
|
const bindingContext = getRuntimeInstallerBindingContext(),
|
|
@@ -29612,24 +29651,57 @@
|
|
|
29612
29651
|
return instance;
|
|
29613
29652
|
}
|
|
29614
29653
|
|
|
29615
|
-
|
|
29616
|
-
class FlexLayoutPlugin {
|
|
29654
|
+
class ViewTransform3dPlugin {
|
|
29617
29655
|
constructor() {
|
|
29618
|
-
this.name = "
|
|
29619
|
-
|
|
29620
|
-
|
|
29621
|
-
|
|
29622
|
-
|
|
29623
|
-
|
|
29624
|
-
|
|
29625
|
-
|
|
29626
|
-
|
|
29627
|
-
|
|
29628
|
-
|
|
29629
|
-
|
|
29630
|
-
|
|
29631
|
-
|
|
29632
|
-
|
|
29656
|
+
this.name = "ViewTransform3dPlugin", this.activeEvent = "onRegister", this._uid = Generator.GenAutoIncrementId(), this.key = this.name + this._uid, this.onMouseDown = e => {
|
|
29657
|
+
this.option3d || (this.option3d = this.pluginService.stage.option3d), this.option3d && (this.mousedown = !0, this.pageX = e.page.x, this.pageY = e.page.y);
|
|
29658
|
+
}, this.onMouseUp = e => {
|
|
29659
|
+
this.option3d || (this.option3d = this.pluginService.stage.option3d), this.option3d && (this.mousedown = !1);
|
|
29660
|
+
}, this.onMouseMove = e => {
|
|
29661
|
+
var _a, _b;
|
|
29662
|
+
const stage = this.pluginService.stage;
|
|
29663
|
+
if (this.option3d || (this.option3d = stage.option3d), this.option3d && this.mousedown) if (this.pageX && this.pageY) {
|
|
29664
|
+
const deltaX = e.page.x - this.pageX,
|
|
29665
|
+
deltaY = e.page.y - this.pageY;
|
|
29666
|
+
this.pageX = e.page.x, this.pageY = e.page.y;
|
|
29667
|
+
const angle1 = deltaX / 100,
|
|
29668
|
+
angle2 = deltaY / 100;
|
|
29669
|
+
this.option3d.alpha = (null !== (_a = this.option3d.alpha) && void 0 !== _a ? _a : 0) + angle1, this.option3d.beta = (null !== (_b = this.option3d.beta) && void 0 !== _b ? _b : 0) + angle2, stage.set3dOptions(this.option3d), stage.renderNextFrame();
|
|
29670
|
+
} else this.pageX = e.page.x, this.pageY = e.page.y;
|
|
29671
|
+
};
|
|
29672
|
+
}
|
|
29673
|
+
activate(context) {
|
|
29674
|
+
this.pluginService = context;
|
|
29675
|
+
const stage = context.stage;
|
|
29676
|
+
this.option3d = stage.option3d, stage.addEventListener("mousedown", this.onMouseDown), stage.addEventListener("mouseup", this.onMouseUp), stage.addEventListener("mousemove", this.onMouseMove);
|
|
29677
|
+
}
|
|
29678
|
+
deactivate(context) {
|
|
29679
|
+
const stage = context.stage;
|
|
29680
|
+
stage.removeEventListener("mousedown", this.onMouseDown), stage.removeEventListener("mouseup", this.onMouseUp), stage.removeEventListener("mousemove", this.onMouseMove);
|
|
29681
|
+
}
|
|
29682
|
+
}
|
|
29683
|
+
const registerViewTransform3dPlugin = () => {
|
|
29684
|
+
Factory$1.registerPlugin("ViewTransform3dPlugin", ViewTransform3dPlugin);
|
|
29685
|
+
};
|
|
29686
|
+
|
|
29687
|
+
const _tempBounds = new AABBBounds();
|
|
29688
|
+
class FlexLayoutPlugin {
|
|
29689
|
+
constructor() {
|
|
29690
|
+
this.name = "FlexLayoutPlugin", this.activeEvent = "onRegister", this.id = Generator.GenAutoIncrementId(), this.key = this.name + this.id, this.tempBounds = new AABBBounds();
|
|
29691
|
+
}
|
|
29692
|
+
pauseLayout(p) {
|
|
29693
|
+
this.pause = p;
|
|
29694
|
+
}
|
|
29695
|
+
tryLayoutChildren(graphic) {
|
|
29696
|
+
graphic.firstChild && this.tryLayout(graphic.firstChild);
|
|
29697
|
+
}
|
|
29698
|
+
tryLayout(graphic, force = !0) {
|
|
29699
|
+
if (this.pause) return;
|
|
29700
|
+
const p = graphic.parent;
|
|
29701
|
+
if (!(force || p && graphic.needUpdateLayout())) return;
|
|
29702
|
+
const theme = getTheme$1(p).group,
|
|
29703
|
+
{
|
|
29704
|
+
display = theme.display
|
|
29633
29705
|
} = p.attribute;
|
|
29634
29706
|
if ("flex" !== display) return;
|
|
29635
29707
|
const {
|
|
@@ -29883,6 +29955,7 @@
|
|
|
29883
29955
|
|
|
29884
29956
|
var VRenderCore = /*#__PURE__*/Object.freeze({
|
|
29885
29957
|
__proto__: null,
|
|
29958
|
+
APPLICATION_STATE_SYMBOL: APPLICATION_STATE_SYMBOL,
|
|
29886
29959
|
ARC3D_NUMBER_TYPE: ARC3D_NUMBER_TYPE,
|
|
29887
29960
|
ARC_NUMBER_TYPE: ARC_NUMBER_TYPE,
|
|
29888
29961
|
AREA_NUMBER_TYPE: AREA_NUMBER_TYPE,
|
|
@@ -29914,6 +29987,7 @@
|
|
|
29914
29987
|
BoundsPicker: BoundsPicker,
|
|
29915
29988
|
BrowserEntry: BrowserEntry,
|
|
29916
29989
|
CIRCLE_NUMBER_TYPE: CIRCLE_NUMBER_TYPE,
|
|
29990
|
+
CONTRIBUTION_STORE_STATE_SYMBOL: CONTRIBUTION_STORE_STATE_SYMBOL,
|
|
29917
29991
|
Canvas3DDrawItemInterceptor: Canvas3DDrawItemInterceptor,
|
|
29918
29992
|
Canvas3DPickItemInterceptor: Canvas3DPickItemInterceptor,
|
|
29919
29993
|
CanvasFactory: CanvasFactory,
|
|
@@ -30026,6 +30100,7 @@
|
|
|
30026
30100
|
EventManager: EventManager,
|
|
30027
30101
|
EventSystem: EventSystem,
|
|
30028
30102
|
EventTarget: EventTarget,
|
|
30103
|
+
FACTORY_STATE_SYMBOL: FACTORY_STATE_SYMBOL,
|
|
30029
30104
|
FORMAT_ALL_TEXT_COMMAND: FORMAT_ALL_TEXT_COMMAND,
|
|
30030
30105
|
FORMAT_ELEMENT_COMMAND: FORMAT_ELEMENT_COMMAND,
|
|
30031
30106
|
FORMAT_TEXT_COMMAND: FORMAT_TEXT_COMMAND,
|
|
@@ -30036,6 +30111,7 @@
|
|
|
30036
30111
|
FederatedWheelEvent: FederatedWheelEvent,
|
|
30037
30112
|
FlexLayoutPlugin: FlexLayoutPlugin,
|
|
30038
30113
|
GLYPH_NUMBER_TYPE: GLYPH_NUMBER_TYPE,
|
|
30114
|
+
GRAPHIC_REGISTRY_SYMBOL: GRAPHIC_REGISTRY_SYMBOL,
|
|
30039
30115
|
GRAPHIC_UPDATE_TAG_KEY: GRAPHIC_UPDATE_TAG_KEY,
|
|
30040
30116
|
GROUP_NUMBER_TYPE: GROUP_NUMBER_TYPE,
|
|
30041
30117
|
Generator: Generator,
|
|
@@ -30104,6 +30180,7 @@
|
|
|
30104
30180
|
RECT3D_NUMBER_TYPE: RECT3D_NUMBER_TYPE,
|
|
30105
30181
|
RECT_NUMBER_TYPE: RECT_NUMBER_TYPE,
|
|
30106
30182
|
RICHTEXT_NUMBER_TYPE: RICHTEXT_NUMBER_TYPE,
|
|
30183
|
+
RUNTIME_INSTALLER_STATE_SYMBOL: RUNTIME_INSTALLER_STATE_SYMBOL,
|
|
30107
30184
|
RafBasedSTO: RafBasedSTO,
|
|
30108
30185
|
ReactAttributePlugin: ReactAttributePlugin,
|
|
30109
30186
|
Rect: Rect,
|
|
@@ -30312,17 +30389,22 @@
|
|
|
30312
30389
|
genStepClosedSegments: genStepClosedSegments,
|
|
30313
30390
|
genStepSegments: genStepSegments,
|
|
30314
30391
|
genStepTypeSegments: genStepTypeSegments,
|
|
30392
|
+
getApplicationState: getApplicationState,
|
|
30315
30393
|
getAttributeFromDefaultAttrList: getAttributeFromDefaultAttrList,
|
|
30316
30394
|
getBackgroundImage: getBackgroundImage,
|
|
30317
30395
|
getConicGradientAt: getConicGradientAt,
|
|
30396
|
+
getContributionStoreState: getContributionStoreState,
|
|
30318
30397
|
getCurrentEnv: getCurrentEnv,
|
|
30319
30398
|
getDefaultCharacterConfig: getDefaultCharacterConfig,
|
|
30320
30399
|
getExtraModelMatrix: getExtraModelMatrix,
|
|
30400
|
+
getFactoryState: getFactoryState,
|
|
30401
|
+
getGraphicRegistryState: getGraphicRegistryState,
|
|
30321
30402
|
getLegacyBindingContext: getLegacyBindingContext,
|
|
30322
30403
|
getModelMatrix: getModelMatrix,
|
|
30323
30404
|
getRichTextBounds: getRichTextBounds,
|
|
30324
30405
|
getRuntimeInstallerBindingContext: getRuntimeInstallerBindingContext,
|
|
30325
30406
|
getRuntimeInstallerGlobal: getRuntimeInstallerGlobal,
|
|
30407
|
+
getRuntimeInstallerState: getRuntimeInstallerState,
|
|
30326
30408
|
getScaledStroke: getScaledStroke,
|
|
30327
30409
|
getTextBounds: getTextBounds,
|
|
30328
30410
|
getTheme: getTheme$1,
|
|
@@ -30464,6 +30546,70 @@
|
|
|
30464
30546
|
xul: xul
|
|
30465
30547
|
});
|
|
30466
30548
|
|
|
30549
|
+
class PickerBase {
|
|
30550
|
+
contains(graphic, point, params) {
|
|
30551
|
+
if (!graphic.AABBBounds.containsPoint(point)) return !1;
|
|
30552
|
+
if ("imprecise" === graphic.attribute.pickMode) return !0;
|
|
30553
|
+
if (!this.canvasRenderer) return !0;
|
|
30554
|
+
const {
|
|
30555
|
+
pickContext: pickContext
|
|
30556
|
+
} = null != params ? params : {};
|
|
30557
|
+
if (!pickContext) return !1;
|
|
30558
|
+
const attribute = graphic.getGraphicTheme();
|
|
30559
|
+
pickContext.highPerformanceSave();
|
|
30560
|
+
let {
|
|
30561
|
+
x = attribute.x,
|
|
30562
|
+
y = attribute.y
|
|
30563
|
+
} = graphic.attribute;
|
|
30564
|
+
if (graphic.transMatrix.onlyTranslate()) {
|
|
30565
|
+
const point = graphic.getOffsetXY(attribute);
|
|
30566
|
+
x += point.x, y += point.y, pickContext.setTransformForCurrent();
|
|
30567
|
+
} else x = 0, y = 0, pickContext.transformFromMatrix(graphic.transMatrix, !0);
|
|
30568
|
+
let picked = !1,
|
|
30569
|
+
_final = !1;
|
|
30570
|
+
return this.canvasRenderer.drawShape(graphic, pickContext, x, y, {}, null, (context, arcAttribute, themeAttribute, final) => !(!picked && !_final) || (picked = context.isPointInPath(point.x, point.y), _final = final || _final, picked), (context, arcAttribute, themeAttribute, final) => {
|
|
30571
|
+
if (picked || _final) return !0;
|
|
30572
|
+
const lineWidth = arcAttribute.lineWidth || themeAttribute.lineWidth,
|
|
30573
|
+
pickStrokeBuffer = arcAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
|
|
30574
|
+
keepStrokeScale = arcAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
|
|
30575
|
+
return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), _final = final || _final, picked;
|
|
30576
|
+
}), pickContext.highPerformanceRestore(), picked;
|
|
30577
|
+
}
|
|
30578
|
+
}
|
|
30579
|
+
|
|
30580
|
+
class DefaultCanvasArcPicker extends PickerBase {
|
|
30581
|
+
constructor(canvasRenderer) {
|
|
30582
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "arc", this.numberType = ARC_NUMBER_TYPE;
|
|
30583
|
+
}
|
|
30584
|
+
}
|
|
30585
|
+
|
|
30586
|
+
let loadArcPick$1 = !1;
|
|
30587
|
+
function bindArcCanvasPickerContribution(container) {
|
|
30588
|
+
loadArcPick$1 || (loadArcPick$1 = !0, container.bind(CanvasArcPicker).toDynamicValue(() => new DefaultCanvasArcPicker(resolveContainerBinding$1(container, ArcRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasArcPicker));
|
|
30589
|
+
}
|
|
30590
|
+
|
|
30591
|
+
class DefaultMathArcPicker extends PickerBase {
|
|
30592
|
+
constructor(canvasRenderer) {
|
|
30593
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "arc", this.numberType = ARC_NUMBER_TYPE;
|
|
30594
|
+
}
|
|
30595
|
+
}
|
|
30596
|
+
|
|
30597
|
+
let loadArcPick = !1;
|
|
30598
|
+
function bindArcMathPickerContribution(container) {
|
|
30599
|
+
loadArcPick || (loadArcPick = !0, container.bind(MathArcPicker).toDynamicValue(() => new DefaultMathArcPicker(resolveContainerBinding$1(container, ArcRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathArcPicker));
|
|
30600
|
+
}
|
|
30601
|
+
|
|
30602
|
+
function _registerArc() {
|
|
30603
|
+
if (_registerArc.__loaded) return;
|
|
30604
|
+
_registerArc.__loaded = !0;
|
|
30605
|
+
const legacyContext = getLegacyBindingContext();
|
|
30606
|
+
registerArcGraphic(), arcModule({
|
|
30607
|
+
bind: legacyContext.bind
|
|
30608
|
+
}), browser ? bindArcCanvasPickerContribution(legacyContext) : bindArcMathPickerContribution(legacyContext);
|
|
30609
|
+
}
|
|
30610
|
+
_registerArc.__loaded = !1;
|
|
30611
|
+
const registerArc = _registerArc;
|
|
30612
|
+
|
|
30467
30613
|
class Base3dPicker extends BaseRender {
|
|
30468
30614
|
contains(graphic, point, params) {
|
|
30469
30615
|
const {
|
|
@@ -30514,123 +30660,665 @@
|
|
|
30514
30660
|
_registerArc3d.__loaded = !1;
|
|
30515
30661
|
const registerArc3d = _registerArc3d;
|
|
30516
30662
|
|
|
30517
|
-
class
|
|
30663
|
+
class DefaultCanvasAreaPicker extends PickerBase {
|
|
30518
30664
|
constructor(canvasRenderer) {
|
|
30519
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "
|
|
30665
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "area", this.numberType = AREA_NUMBER_TYPE;
|
|
30520
30666
|
}
|
|
30521
30667
|
}
|
|
30522
30668
|
|
|
30523
|
-
let
|
|
30524
|
-
function
|
|
30525
|
-
|
|
30526
|
-
loadPyramid3dPick || (null === (_a = container.isBound) || void 0 === _a ? void 0 : _a.call(container, Pyramid3dRender)) && (loadPyramid3dPick = !0, container.bind(CanvasPyramid3dPicker).toDynamicValue(() => new DefaultCanvasPyramid3dPicker(resolveContainerBinding$1(container, Pyramid3dRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasPyramid3dPicker));
|
|
30527
|
-
}
|
|
30528
|
-
|
|
30529
|
-
function _registerPyramid3d() {
|
|
30530
|
-
if (_registerPyramid3d.__loaded) return;
|
|
30531
|
-
_registerPyramid3d.__loaded = !0;
|
|
30532
|
-
const legacyContext = getLegacyBindingContext();
|
|
30533
|
-
registerPyramid3dGraphic(), registerDirectionalLight(), registerOrthoCamera(), pyramid3dModule({
|
|
30534
|
-
bind: legacyContext.bind
|
|
30535
|
-
}), bindPyramid3dCanvasPickerContribution(legacyContext);
|
|
30669
|
+
let loadAreaPick$1 = !1;
|
|
30670
|
+
function bindAreaCanvasPickerContribution(container) {
|
|
30671
|
+
loadAreaPick$1 || (loadAreaPick$1 = !0, container.bind(CanvasAreaPicker).toDynamicValue(() => new DefaultCanvasAreaPicker(resolveContainerBinding$1(container, AreaRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasAreaPicker));
|
|
30536
30672
|
}
|
|
30537
|
-
_registerPyramid3d.__loaded = !1;
|
|
30538
|
-
const registerPyramid3d = _registerPyramid3d;
|
|
30539
30673
|
|
|
30540
|
-
class
|
|
30674
|
+
class DefaultMathAreaPicker extends PickerBase {
|
|
30541
30675
|
constructor(canvasRenderer) {
|
|
30542
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "
|
|
30676
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "area", this.numberType = AREA_NUMBER_TYPE;
|
|
30543
30677
|
}
|
|
30544
30678
|
}
|
|
30545
30679
|
|
|
30546
|
-
let
|
|
30547
|
-
function
|
|
30548
|
-
|
|
30549
|
-
loadRect3dPick || (null === (_a = container.isBound) || void 0 === _a ? void 0 : _a.call(container, Rect3DRender)) && (loadRect3dPick = !0, container.bind(CanvasRect3dPicker).toDynamicValue(() => new DefaultCanvasRect3dPicker(resolveContainerBinding$1(container, Rect3DRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasRect3dPicker));
|
|
30680
|
+
let loadAreaPick = !1;
|
|
30681
|
+
function bindAreaMathPickerContribution(container) {
|
|
30682
|
+
loadAreaPick || (loadAreaPick = !0, container.bind(MathAreaPicker).toDynamicValue(() => new DefaultMathAreaPicker(resolveContainerBinding$1(container, AreaRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathAreaPicker));
|
|
30550
30683
|
}
|
|
30551
30684
|
|
|
30552
|
-
function
|
|
30553
|
-
if (
|
|
30554
|
-
|
|
30685
|
+
function _registerArea() {
|
|
30686
|
+
if (_registerArea.__loaded) return;
|
|
30687
|
+
_registerArea.__loaded = !0;
|
|
30555
30688
|
const legacyContext = getLegacyBindingContext();
|
|
30556
|
-
|
|
30689
|
+
registerAreaGraphic(), areaModule({
|
|
30557
30690
|
bind: legacyContext.bind
|
|
30558
|
-
}),
|
|
30691
|
+
}), browser ? bindAreaCanvasPickerContribution(legacyContext) : bindAreaMathPickerContribution(legacyContext);
|
|
30559
30692
|
}
|
|
30560
|
-
|
|
30561
|
-
const
|
|
30562
|
-
|
|
30563
|
-
const createArc3d = attributes => (registerArc3d(), createGraphic$1("arc3d", attributes));
|
|
30564
|
-
const createPyramid3d = attributes => (registerPyramid3d(), createGraphic$1("pyramid3d", attributes));
|
|
30565
|
-
const createRect3d = attributes => (registerRect3d(), createGraphic$1("rect3d", attributes));
|
|
30566
|
-
const waitForAllSubLayers = stage => new Promise(resolve => {
|
|
30567
|
-
vglobal.getRequestAnimationFrame()(() => {
|
|
30568
|
-
resolve(null);
|
|
30569
|
-
});
|
|
30570
|
-
}).then(() => {
|
|
30571
|
-
const promiseList = [];
|
|
30572
|
-
return stage.getChildren().forEach(layer => {
|
|
30573
|
-
var _a;
|
|
30574
|
-
(null === (_a = layer.subLayers) || void 0 === _a ? void 0 : _a.size) && layer.subLayers.forEach(subLayer => {
|
|
30575
|
-
const drawContribution = subLayer.drawContribution;
|
|
30576
|
-
(null == drawContribution ? void 0 : drawContribution.hooks) && drawContribution.rendering && promiseList.push(new Promise(resolve => {
|
|
30577
|
-
drawContribution.hooks.completeDraw.tap("outWait", () => {
|
|
30578
|
-
drawContribution.hooks.completeDraw.taps = drawContribution.hooks.completeDraw.taps.filter(item => "outWait" !== item.name), resolve(null);
|
|
30579
|
-
});
|
|
30580
|
-
}));
|
|
30581
|
-
});
|
|
30582
|
-
}), Promise.all(promiseList);
|
|
30583
|
-
});
|
|
30693
|
+
_registerArea.__loaded = !1;
|
|
30694
|
+
const registerArea = _registerArea;
|
|
30584
30695
|
|
|
30585
|
-
|
|
30586
|
-
|
|
30587
|
-
|
|
30588
|
-
|
|
30589
|
-
|
|
30696
|
+
class GlyphPickerBase {
|
|
30697
|
+
constructor() {
|
|
30698
|
+
this.type = "glyph", this.numberType = GLYPH_NUMBER_TYPE;
|
|
30699
|
+
}
|
|
30700
|
+
contains(glyph, point, params) {
|
|
30701
|
+
if (!glyph.AABBBounds.containsPoint(point)) return !1;
|
|
30702
|
+
if ("imprecise" === glyph.attribute.pickMode) return !0;
|
|
30703
|
+
const {
|
|
30704
|
+
pickContext: pickContext
|
|
30705
|
+
} = null != params ? params : {};
|
|
30706
|
+
if (!pickContext) return !1;
|
|
30707
|
+
const pickerService = null == params ? void 0 : params.pickerService;
|
|
30708
|
+
if (pickerService) {
|
|
30709
|
+
let picked = !1;
|
|
30710
|
+
return glyph.getSubGraphic().forEach(g => {
|
|
30711
|
+
if (picked) return;
|
|
30712
|
+
const data = pickerService.pickItem(g, point, null, params);
|
|
30713
|
+
picked = !(!data || !data.graphic);
|
|
30714
|
+
}), picked;
|
|
30715
|
+
}
|
|
30716
|
+
return !1;
|
|
30590
30717
|
}
|
|
30591
|
-
return result;
|
|
30592
|
-
}
|
|
30593
|
-
function moveAfterInArray(array, target, ref) {
|
|
30594
|
-
const index = array.indexOf(target),
|
|
30595
|
-
refIndex = array.indexOf(ref);
|
|
30596
|
-
index >= 0 && refIndex >= 0 && index < refIndex && (array.splice(index, 1), array.splice(refIndex, 0, target));
|
|
30597
30718
|
}
|
|
30598
30719
|
|
|
30599
|
-
|
|
30600
|
-
|
|
30601
|
-
|
|
30602
|
-
{
|
|
30603
|
-
if (!isFunction$1(config.errorHandler)) throw new Error(msg);
|
|
30604
|
-
config.errorHandler.call(null, msg, detail);
|
|
30720
|
+
class DefaultCanvasGlyphPicker extends GlyphPickerBase {
|
|
30721
|
+
constructor(canvasRenderer) {
|
|
30722
|
+
super(), this.canvasRenderer = canvasRenderer;
|
|
30605
30723
|
}
|
|
30606
|
-
};
|
|
30607
|
-
const config = {
|
|
30608
|
-
silent: !1,
|
|
30609
|
-
warnHandler: !1,
|
|
30610
|
-
errorHandler: !1
|
|
30611
|
-
};
|
|
30612
|
-
|
|
30613
|
-
const isBrowser = isBrowserEnv();
|
|
30614
|
-
const domDocument = isBrowser && globalThis ? globalThis.document : void 0;
|
|
30615
|
-
function isTrueBrowser(mode) {
|
|
30616
|
-
return ("desktop-browser" === mode || "mobile-browser" === mode) && isBrowser;
|
|
30617
|
-
}
|
|
30618
|
-
function isMobileLikeMode(mode) {
|
|
30619
|
-
return isMiniAppLikeMode(mode) || "mobile-browser" === mode;
|
|
30620
30724
|
}
|
|
30621
|
-
|
|
30622
|
-
|
|
30725
|
+
|
|
30726
|
+
let loadGlyphPick$1 = !1;
|
|
30727
|
+
function bindGlyphCanvasPickerContribution(container) {
|
|
30728
|
+
loadGlyphPick$1 || (loadGlyphPick$1 = !0, container.bind(CanvasGlyphPicker).toDynamicValue(() => new DefaultCanvasGlyphPicker(resolveContainerBinding$1(container, GlyphRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasGlyphPicker));
|
|
30623
30729
|
}
|
|
30624
30730
|
|
|
30625
|
-
|
|
30626
|
-
|
|
30627
|
-
|
|
30731
|
+
class DefaultMathGlyphPicker extends GlyphPickerBase {
|
|
30732
|
+
constructor(canvasRenderer) {
|
|
30733
|
+
super(), this.canvasRenderer = canvasRenderer;
|
|
30734
|
+
}
|
|
30628
30735
|
}
|
|
30629
30736
|
|
|
30630
|
-
|
|
30631
|
-
|
|
30737
|
+
let loadGlyphPick = !1;
|
|
30738
|
+
function bindGlyphMathPickerContribution(container) {
|
|
30739
|
+
loadGlyphPick || (loadGlyphPick = !0, container.bind(MathGlyphPicker).toDynamicValue(() => new DefaultMathGlyphPicker(resolveContainerBinding$1(container, GlyphRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathGlyphPicker));
|
|
30632
30740
|
}
|
|
30633
|
-
|
|
30741
|
+
|
|
30742
|
+
function _registerGlyph() {
|
|
30743
|
+
if (_registerGlyph.__loaded) return;
|
|
30744
|
+
_registerGlyph.__loaded = !0;
|
|
30745
|
+
const legacyContext = getLegacyBindingContext();
|
|
30746
|
+
registerGlyphGraphic(), glyphModule({
|
|
30747
|
+
bind: legacyContext.bind
|
|
30748
|
+
}), browser ? bindGlyphCanvasPickerContribution(legacyContext) : bindGlyphMathPickerContribution(legacyContext);
|
|
30749
|
+
}
|
|
30750
|
+
_registerGlyph.__loaded = !1;
|
|
30751
|
+
const registerGlyph = _registerGlyph;
|
|
30752
|
+
|
|
30753
|
+
function _registerGroup() {
|
|
30754
|
+
_registerGroup.__loaded || (_registerGroup.__loaded = !0, registerGroupGraphic());
|
|
30755
|
+
}
|
|
30756
|
+
_registerGroup.__loaded = !1;
|
|
30757
|
+
const registerGroup = _registerGroup;
|
|
30758
|
+
|
|
30759
|
+
class DefaultCanvasImagePicker extends PickerBase {
|
|
30760
|
+
constructor(canvasRenderer) {
|
|
30761
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "image", this.numberType = IMAGE_NUMBER_TYPE;
|
|
30762
|
+
}
|
|
30763
|
+
}
|
|
30764
|
+
|
|
30765
|
+
let loadImagePick$1 = !1;
|
|
30766
|
+
function bindImageCanvasPickerContribution(container) {
|
|
30767
|
+
loadImagePick$1 || (loadImagePick$1 = !0, container.bind(CanvasImagePicker).toDynamicValue(() => new DefaultCanvasImagePicker(resolveContainerBinding$1(container, ImageRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasImagePicker));
|
|
30768
|
+
}
|
|
30769
|
+
|
|
30770
|
+
class DefaultMathImagePicker {
|
|
30771
|
+
constructor() {
|
|
30772
|
+
this.type = "image", this.numberType = IMAGE_NUMBER_TYPE;
|
|
30773
|
+
}
|
|
30774
|
+
contains(image, point, params) {
|
|
30775
|
+
const {
|
|
30776
|
+
pickContext: pickContext
|
|
30777
|
+
} = null != params ? params : {};
|
|
30778
|
+
return !!pickContext && !!image.AABBBounds.containsPoint(point);
|
|
30779
|
+
}
|
|
30780
|
+
}
|
|
30781
|
+
|
|
30782
|
+
let loadImagePick = !1;
|
|
30783
|
+
function bindImageMathPickerContribution(container) {
|
|
30784
|
+
loadImagePick || (loadImagePick = !0, container.bind(MathImagePicker).toDynamicValue(() => new DefaultMathImagePicker()).inSingletonScope(), container.bind(MathPickerContribution).toService(MathImagePicker));
|
|
30785
|
+
}
|
|
30786
|
+
|
|
30787
|
+
function _registerImage() {
|
|
30788
|
+
if (_registerImage.__loaded) return;
|
|
30789
|
+
_registerImage.__loaded = !0;
|
|
30790
|
+
const legacyContext = getLegacyBindingContext();
|
|
30791
|
+
registerImageGraphic(), imageModule({
|
|
30792
|
+
bind: legacyContext.bind
|
|
30793
|
+
}), browser ? bindImageCanvasPickerContribution(legacyContext) : bindImageMathPickerContribution(legacyContext);
|
|
30794
|
+
}
|
|
30795
|
+
_registerImage.__loaded = !1;
|
|
30796
|
+
const registerImage = _registerImage;
|
|
30797
|
+
|
|
30798
|
+
class BaseLinePicker extends BaseRender {
|
|
30799
|
+
contains(graphic, point, params) {
|
|
30800
|
+
if (!graphic.AABBBounds.containsPoint(point)) return !1;
|
|
30801
|
+
if ("imprecise" === graphic.attribute.pickMode) return !0;
|
|
30802
|
+
const {
|
|
30803
|
+
pickContext: pickContext
|
|
30804
|
+
} = null != params ? params : {};
|
|
30805
|
+
if (!pickContext) return !1;
|
|
30806
|
+
pickContext.highPerformanceSave();
|
|
30807
|
+
const lineAttribute = graphic.getGraphicTheme(),
|
|
30808
|
+
data = this.transform(graphic, lineAttribute, pickContext),
|
|
30809
|
+
{
|
|
30810
|
+
x: x,
|
|
30811
|
+
y: y,
|
|
30812
|
+
z: z,
|
|
30813
|
+
lastModelMatrix: lastModelMatrix
|
|
30814
|
+
} = data;
|
|
30815
|
+
let pickPoint = point;
|
|
30816
|
+
if (pickContext.camera) {
|
|
30817
|
+
pickPoint = point.clone();
|
|
30818
|
+
const globalMatrix = graphic.parent.globalTransMatrix;
|
|
30819
|
+
pickPoint.x = globalMatrix.a * point.x + globalMatrix.c * point.y + globalMatrix.e, pickPoint.y = globalMatrix.b * point.x + globalMatrix.d * point.y + globalMatrix.f;
|
|
30820
|
+
}
|
|
30821
|
+
this.canvasRenderer.z = z;
|
|
30822
|
+
let picked = !1;
|
|
30823
|
+
return this.canvasRenderer.drawShape(graphic, pickContext, x, y, {}, null, context => !!picked || (picked = context.isPointInPath(pickPoint.x, pickPoint.y), picked), (context, lineAttribute, themeAttribute) => {
|
|
30824
|
+
if (picked) return !0;
|
|
30825
|
+
const lineWidth = lineAttribute.lineWidth || themeAttribute.lineWidth,
|
|
30826
|
+
pickStrokeBuffer = lineAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
|
|
30827
|
+
keepStrokeScale = lineAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
|
|
30828
|
+
return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(pickPoint.x, pickPoint.y), picked;
|
|
30829
|
+
}), this.canvasRenderer.z = 0, pickContext.modelMatrix !== lastModelMatrix && mat4Allocate.free(pickContext.modelMatrix), pickContext.modelMatrix = lastModelMatrix, pickContext.highPerformanceRestore(), picked;
|
|
30830
|
+
}
|
|
30831
|
+
}
|
|
30832
|
+
|
|
30833
|
+
class DefaultCanvasLinePicker extends BaseLinePicker {
|
|
30834
|
+
constructor(canvasRenderer) {
|
|
30835
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "line", this.numberType = LINE_NUMBER_TYPE;
|
|
30836
|
+
}
|
|
30837
|
+
}
|
|
30838
|
+
|
|
30839
|
+
let loadLinePick$1 = !1;
|
|
30840
|
+
function bindLineCanvasPickerContribution(container) {
|
|
30841
|
+
loadLinePick$1 || (loadLinePick$1 = !0, container.bind(CanvasLinePicker).toDynamicValue(() => new DefaultCanvasLinePicker(resolveContainerBinding$1(container, LineRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasLinePicker));
|
|
30842
|
+
}
|
|
30843
|
+
|
|
30844
|
+
class DefaultMathLinePicker extends PickerBase {
|
|
30845
|
+
constructor(canvasRenderer) {
|
|
30846
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "line", this.numberType = LINE_NUMBER_TYPE;
|
|
30847
|
+
}
|
|
30848
|
+
}
|
|
30849
|
+
|
|
30850
|
+
let loadLinePick = !1;
|
|
30851
|
+
function bindLineMathPickerContribution(container) {
|
|
30852
|
+
loadLinePick || (loadLinePick = !0, container.bind(MathLinePicker).toDynamicValue(() => new DefaultMathLinePicker(resolveContainerBinding$1(container, LineRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathLinePicker));
|
|
30853
|
+
}
|
|
30854
|
+
|
|
30855
|
+
function _registerLine() {
|
|
30856
|
+
if (_registerLine.__loaded) return;
|
|
30857
|
+
_registerLine.__loaded = !0;
|
|
30858
|
+
const legacyContext = getLegacyBindingContext();
|
|
30859
|
+
registerLineGraphic(), lineModule({
|
|
30860
|
+
bind: legacyContext.bind
|
|
30861
|
+
}), browser ? bindLineCanvasPickerContribution(legacyContext) : bindLineMathPickerContribution(legacyContext);
|
|
30862
|
+
}
|
|
30863
|
+
_registerLine.__loaded = !1;
|
|
30864
|
+
const registerLine = _registerLine;
|
|
30865
|
+
|
|
30866
|
+
class DefaultCanvasPathPicker extends BaseLinePicker {
|
|
30867
|
+
constructor(canvasRenderer) {
|
|
30868
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "path", this.numberType = PATH_NUMBER_TYPE;
|
|
30869
|
+
}
|
|
30870
|
+
}
|
|
30871
|
+
|
|
30872
|
+
let loadPathPick$1 = !1;
|
|
30873
|
+
function bindPathCanvasPickerContribution(container) {
|
|
30874
|
+
loadPathPick$1 || (loadPathPick$1 = !0, container.bind(CanvasPathPicker).toDynamicValue(() => new DefaultCanvasPathPicker(resolveContainerBinding$1(container, PathRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasPathPicker));
|
|
30875
|
+
}
|
|
30876
|
+
|
|
30877
|
+
class DefaultMathPathPicker extends PickerBase {
|
|
30878
|
+
constructor(canvasRenderer) {
|
|
30879
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "path", this.numberType = PATH_NUMBER_TYPE;
|
|
30880
|
+
}
|
|
30881
|
+
}
|
|
30882
|
+
|
|
30883
|
+
let loadPathPick = !1;
|
|
30884
|
+
function bindPathMathPickerContribution(container) {
|
|
30885
|
+
loadPathPick || (loadPathPick = !0, container.bind(MathPathPicker).toDynamicValue(() => new DefaultMathPathPicker(resolveContainerBinding$1(container, PathRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathPathPicker));
|
|
30886
|
+
}
|
|
30887
|
+
|
|
30888
|
+
function _registerPath() {
|
|
30889
|
+
if (_registerPath.__loaded) return;
|
|
30890
|
+
_registerPath.__loaded = !0;
|
|
30891
|
+
const legacyContext = getLegacyBindingContext();
|
|
30892
|
+
registerPathGraphic(), pathModule({
|
|
30893
|
+
bind: legacyContext.bind
|
|
30894
|
+
}), browser ? bindPathCanvasPickerContribution(legacyContext) : bindPathMathPickerContribution(legacyContext);
|
|
30895
|
+
}
|
|
30896
|
+
_registerPath.__loaded = !1;
|
|
30897
|
+
const registerPath = _registerPath;
|
|
30898
|
+
|
|
30899
|
+
class DefaultCanvasPolygonPicker extends PickerBase {
|
|
30900
|
+
constructor(canvasRenderer) {
|
|
30901
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "polygon", this.numberType = POLYGON_NUMBER_TYPE;
|
|
30902
|
+
}
|
|
30903
|
+
}
|
|
30904
|
+
|
|
30905
|
+
let loadPolygonPick$1 = !1;
|
|
30906
|
+
function bindPolygonCanvasPickerContribution(container) {
|
|
30907
|
+
loadPolygonPick$1 || (loadPolygonPick$1 = !0, container.bind(CanvasPolygonPicker).toDynamicValue(() => new DefaultCanvasPolygonPicker(resolveContainerBinding$1(container, PolygonRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasPolygonPicker));
|
|
30908
|
+
}
|
|
30909
|
+
|
|
30910
|
+
class DefaultMathPolygonPicker extends PickerBase {
|
|
30911
|
+
constructor(canvasRenderer) {
|
|
30912
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "polygon", this.numberType = POLYGON_NUMBER_TYPE;
|
|
30913
|
+
}
|
|
30914
|
+
}
|
|
30915
|
+
|
|
30916
|
+
let loadPolygonPick = !1;
|
|
30917
|
+
function bindPolygonMathPickerContribution(container) {
|
|
30918
|
+
loadPolygonPick || (loadPolygonPick = !0, container.bind(MathPolygonPicker).toDynamicValue(() => new DefaultMathPolygonPicker(resolveContainerBinding$1(container, PolygonRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathPolygonPicker));
|
|
30919
|
+
}
|
|
30920
|
+
|
|
30921
|
+
function _registerPolygon() {
|
|
30922
|
+
if (_registerPolygon.__loaded) return;
|
|
30923
|
+
_registerPolygon.__loaded = !0;
|
|
30924
|
+
const legacyContext = getLegacyBindingContext();
|
|
30925
|
+
registerPolygonGraphic(), polygonModule({
|
|
30926
|
+
bind: legacyContext.bind
|
|
30927
|
+
}), browser ? bindPolygonCanvasPickerContribution(legacyContext) : bindPolygonMathPickerContribution(legacyContext);
|
|
30928
|
+
}
|
|
30929
|
+
_registerPolygon.__loaded = !1;
|
|
30930
|
+
const registerPolygon = _registerPolygon;
|
|
30931
|
+
|
|
30932
|
+
class DefaultCanvasPyramid3dPicker extends Base3dPicker {
|
|
30933
|
+
constructor(canvasRenderer) {
|
|
30934
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "pyramid3d", this.numberType = PYRAMID3D_NUMBER_TYPE, this.themeType = "polygon";
|
|
30935
|
+
}
|
|
30936
|
+
}
|
|
30937
|
+
|
|
30938
|
+
let loadPyramid3dPick = !1;
|
|
30939
|
+
function bindPyramid3dCanvasPickerContribution(container) {
|
|
30940
|
+
var _a;
|
|
30941
|
+
loadPyramid3dPick || (null === (_a = container.isBound) || void 0 === _a ? void 0 : _a.call(container, Pyramid3dRender)) && (loadPyramid3dPick = !0, container.bind(CanvasPyramid3dPicker).toDynamicValue(() => new DefaultCanvasPyramid3dPicker(resolveContainerBinding$1(container, Pyramid3dRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasPyramid3dPicker));
|
|
30942
|
+
}
|
|
30943
|
+
|
|
30944
|
+
function _registerPyramid3d() {
|
|
30945
|
+
if (_registerPyramid3d.__loaded) return;
|
|
30946
|
+
_registerPyramid3d.__loaded = !0;
|
|
30947
|
+
const legacyContext = getLegacyBindingContext();
|
|
30948
|
+
registerPyramid3dGraphic(), registerDirectionalLight(), registerOrthoCamera(), pyramid3dModule({
|
|
30949
|
+
bind: legacyContext.bind
|
|
30950
|
+
}), bindPyramid3dCanvasPickerContribution(legacyContext);
|
|
30951
|
+
}
|
|
30952
|
+
_registerPyramid3d.__loaded = !1;
|
|
30953
|
+
const registerPyramid3d = _registerPyramid3d;
|
|
30954
|
+
|
|
30955
|
+
const _bounds = new AABBBounds();
|
|
30956
|
+
class RectPickerBase {
|
|
30957
|
+
constructor() {
|
|
30958
|
+
this.type = "rect", this.numberType = RECT_NUMBER_TYPE;
|
|
30959
|
+
}
|
|
30960
|
+
contains(rect, point, params) {
|
|
30961
|
+
if (!rect.AABBBounds.containsPoint(point)) return !1;
|
|
30962
|
+
if ("imprecise" === rect.attribute.pickMode) return !0;
|
|
30963
|
+
const {
|
|
30964
|
+
pickContext: pickContext
|
|
30965
|
+
} = null != params ? params : {};
|
|
30966
|
+
if (!pickContext) return !1;
|
|
30967
|
+
const rectAttribute = rect.getGraphicTheme(),
|
|
30968
|
+
{
|
|
30969
|
+
cornerRadius = rectAttribute.cornerRadius
|
|
30970
|
+
} = rect.attribute;
|
|
30971
|
+
let {
|
|
30972
|
+
x = rectAttribute.x,
|
|
30973
|
+
y = rectAttribute.y
|
|
30974
|
+
} = rect.attribute;
|
|
30975
|
+
pickContext.highPerformanceSave();
|
|
30976
|
+
let onlyTranslate = !0;
|
|
30977
|
+
if (rect.transMatrix.onlyTranslate()) {
|
|
30978
|
+
const point = rect.getOffsetXY(rectAttribute);
|
|
30979
|
+
x += point.x, y += point.y, pickContext.setTransformForCurrent();
|
|
30980
|
+
} else x = 0, y = 0, onlyTranslate = !1, pickContext.transformFromMatrix(rect.transMatrix, !0);
|
|
30981
|
+
let picked = !0;
|
|
30982
|
+
if (!onlyTranslate || rect.shadowRoot || isNumber$2(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) => {
|
|
30983
|
+
if (picked) return !0;
|
|
30984
|
+
const lineWidth = rectAttribute.lineWidth || themeAttribute.lineWidth,
|
|
30985
|
+
pickStrokeBuffer = rectAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
|
|
30986
|
+
keepStrokeScale = rectAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
|
|
30987
|
+
return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), picked;
|
|
30988
|
+
});else {
|
|
30989
|
+
const {
|
|
30990
|
+
fill = rectAttribute.fill,
|
|
30991
|
+
stroke = rectAttribute.stroke,
|
|
30992
|
+
lineWidth = rectAttribute.lineWidth
|
|
30993
|
+
} = rect.attribute;
|
|
30994
|
+
if (fill) picked = !0;else if (stroke) {
|
|
30995
|
+
const bounds = rect.AABBBounds;
|
|
30996
|
+
_bounds.setValue(bounds.x1, bounds.y1, bounds.x2, bounds.y2), _bounds.expand(-lineWidth / 2), picked = !_bounds.containsPoint(point);
|
|
30997
|
+
}
|
|
30998
|
+
}
|
|
30999
|
+
return pickContext.highPerformanceRestore(), picked;
|
|
31000
|
+
}
|
|
31001
|
+
}
|
|
31002
|
+
|
|
31003
|
+
class DefaultCanvasRectPicker extends RectPickerBase {
|
|
31004
|
+
constructor(canvasRenderer) {
|
|
31005
|
+
super(), this.canvasRenderer = canvasRenderer;
|
|
31006
|
+
}
|
|
31007
|
+
}
|
|
31008
|
+
|
|
31009
|
+
let loadRectPick$1 = !1;
|
|
31010
|
+
function bindRectCanvasPickerContribution(container) {
|
|
31011
|
+
loadRectPick$1 || (loadRectPick$1 = !0, container.bind(CanvasRectPicker).toDynamicValue(() => new DefaultCanvasRectPicker(resolveContainerBinding$1(container, RectRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasRectPicker));
|
|
31012
|
+
}
|
|
31013
|
+
|
|
31014
|
+
class DefaultMathRectPicker extends RectPickerBase {
|
|
31015
|
+
constructor(canvasRenderer) {
|
|
31016
|
+
super(), this.canvasRenderer = canvasRenderer;
|
|
31017
|
+
}
|
|
31018
|
+
}
|
|
31019
|
+
|
|
31020
|
+
let loadRectPick = !1;
|
|
31021
|
+
function bindRectMathPickerContribution(container) {
|
|
31022
|
+
loadRectPick || (loadRectPick = !0, container.bind(MathRectPicker).toDynamicValue(() => new DefaultMathRectPicker(resolveContainerBinding$1(container, RectRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathRectPicker));
|
|
31023
|
+
}
|
|
31024
|
+
|
|
31025
|
+
function _registerRect() {
|
|
31026
|
+
if (_registerRect.__loaded) return;
|
|
31027
|
+
_registerRect.__loaded = !0;
|
|
31028
|
+
const legacyContext = getLegacyBindingContext();
|
|
31029
|
+
registerRectGraphic(), rectModule({
|
|
31030
|
+
bind: legacyContext.bind
|
|
31031
|
+
}), browser ? bindRectCanvasPickerContribution(legacyContext) : bindRectMathPickerContribution(legacyContext);
|
|
31032
|
+
}
|
|
31033
|
+
_registerRect.__loaded = !1;
|
|
31034
|
+
const registerRect = _registerRect;
|
|
31035
|
+
|
|
31036
|
+
class DefaultCanvasRect3dPicker extends Base3dPicker {
|
|
31037
|
+
constructor(canvasRenderer) {
|
|
31038
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "rect3d", this.numberType = RECT3D_NUMBER_TYPE, this.themeType = "rect";
|
|
31039
|
+
}
|
|
31040
|
+
}
|
|
31041
|
+
|
|
31042
|
+
let loadRect3dPick = !1;
|
|
31043
|
+
function bindRect3dCanvasPickerContribution(container) {
|
|
31044
|
+
var _a;
|
|
31045
|
+
loadRect3dPick || (null === (_a = container.isBound) || void 0 === _a ? void 0 : _a.call(container, Rect3DRender)) && (loadRect3dPick = !0, container.bind(CanvasRect3dPicker).toDynamicValue(() => new DefaultCanvasRect3dPicker(resolveContainerBinding$1(container, Rect3DRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasRect3dPicker));
|
|
31046
|
+
}
|
|
31047
|
+
|
|
31048
|
+
function _registerRect3d() {
|
|
31049
|
+
if (_registerRect3d.__loaded) return;
|
|
31050
|
+
_registerRect3d.__loaded = !0;
|
|
31051
|
+
const legacyContext = getLegacyBindingContext();
|
|
31052
|
+
registerRect3dGraphic(), rect3dModule({
|
|
31053
|
+
bind: legacyContext.bind
|
|
31054
|
+
}), bindRect3dCanvasPickerContribution(legacyContext);
|
|
31055
|
+
}
|
|
31056
|
+
_registerRect3d.__loaded = !1;
|
|
31057
|
+
const registerRect3d = _registerRect3d;
|
|
31058
|
+
|
|
31059
|
+
class DefaultCanvasRichTextPicker {
|
|
31060
|
+
constructor(canvasRenderer) {
|
|
31061
|
+
this.canvasRenderer = canvasRenderer, this.type = "richtext", this.numberType = RICHTEXT_NUMBER_TYPE;
|
|
31062
|
+
}
|
|
31063
|
+
contains(richtext, point, params) {
|
|
31064
|
+
return !!richtext.AABBBounds.containsPoint(point);
|
|
31065
|
+
}
|
|
31066
|
+
}
|
|
31067
|
+
|
|
31068
|
+
let loadRichtextPick = !1;
|
|
31069
|
+
function bindRichtextCanvasPickerContribution(container) {
|
|
31070
|
+
loadRichtextPick || (loadRichtextPick = !0, container.bind(CanvasRichTextPicker).toDynamicValue(() => new DefaultCanvasRichTextPicker(resolveContainerBinding$1(container, RichTextRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasRichTextPicker));
|
|
31071
|
+
}
|
|
31072
|
+
|
|
31073
|
+
class DefaultMathRichTextPicker {
|
|
31074
|
+
constructor(canvasRenderer) {
|
|
31075
|
+
this.canvasRenderer = canvasRenderer, this.type = "richtext", this.numberType = RICHTEXT_NUMBER_TYPE;
|
|
31076
|
+
}
|
|
31077
|
+
contains(richtext, point, params) {
|
|
31078
|
+
return !!richtext.AABBBounds.containsPoint(point);
|
|
31079
|
+
}
|
|
31080
|
+
}
|
|
31081
|
+
|
|
31082
|
+
let loadRichTextPick = !1;
|
|
31083
|
+
function bindRichTextMathPickerContribution(container) {
|
|
31084
|
+
loadRichTextPick || (loadRichTextPick = !0, container.bind(MathRichTextPicker).toDynamicValue(() => new DefaultMathRichTextPicker(resolveContainerBinding$1(container, RichTextRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathRichTextPicker));
|
|
31085
|
+
}
|
|
31086
|
+
|
|
31087
|
+
function _registerRichtext() {
|
|
31088
|
+
if (_registerRichtext.__loaded) return;
|
|
31089
|
+
_registerRichtext.__loaded = !0;
|
|
31090
|
+
const legacyContext = getLegacyBindingContext();
|
|
31091
|
+
registerRichtextGraphic(), richtextModule({
|
|
31092
|
+
bind: legacyContext.bind
|
|
31093
|
+
}), browser ? bindRichtextCanvasPickerContribution(legacyContext) : bindRichTextMathPickerContribution(legacyContext);
|
|
31094
|
+
}
|
|
31095
|
+
_registerRichtext.__loaded = !1;
|
|
31096
|
+
const registerRichtext = _registerRichtext;
|
|
31097
|
+
|
|
31098
|
+
function _registerShadowRoot() {
|
|
31099
|
+
_registerShadowRoot.__loaded || (_registerShadowRoot.__loaded = !0, registerShadowRootGraphic());
|
|
31100
|
+
}
|
|
31101
|
+
_registerShadowRoot.__loaded = !1;
|
|
31102
|
+
const registerShadowRoot = _registerShadowRoot;
|
|
31103
|
+
|
|
31104
|
+
class DefaultCanvasSymbolPicker extends Base3dPicker {
|
|
31105
|
+
constructor(canvasRenderer) {
|
|
31106
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "symbol", this.numberType = SYMBOL_NUMBER_TYPE;
|
|
31107
|
+
}
|
|
31108
|
+
contains(symbol, point, params) {
|
|
31109
|
+
const {
|
|
31110
|
+
pickContext: pickContext
|
|
31111
|
+
} = null != params ? params : {};
|
|
31112
|
+
if (!pickContext) return !1;
|
|
31113
|
+
const parsedPath = symbol.getParsedPath();
|
|
31114
|
+
if (!pickContext.camera) {
|
|
31115
|
+
if (!symbol.AABBBounds.containsPoint(point)) return !1;
|
|
31116
|
+
if (parsedPath.isSvg || "imprecise" === symbol.attribute.pickMode) return !0;
|
|
31117
|
+
}
|
|
31118
|
+
pickContext.highPerformanceSave();
|
|
31119
|
+
const symbolAttribute = symbol.getGraphicTheme(),
|
|
31120
|
+
data = this.transform(symbol, symbolAttribute, pickContext),
|
|
31121
|
+
{
|
|
31122
|
+
x: x,
|
|
31123
|
+
y: y,
|
|
31124
|
+
z: z,
|
|
31125
|
+
lastModelMatrix: lastModelMatrix
|
|
31126
|
+
} = data;
|
|
31127
|
+
let pickPoint = point;
|
|
31128
|
+
if (pickContext.camera) {
|
|
31129
|
+
pickPoint = point.clone();
|
|
31130
|
+
const globalMatrix = symbol.parent.globalTransMatrix;
|
|
31131
|
+
pickPoint.x = globalMatrix.a * point.x + globalMatrix.c * point.y + globalMatrix.e, pickPoint.y = globalMatrix.b * point.x + globalMatrix.d * point.y + globalMatrix.f;
|
|
31132
|
+
}
|
|
31133
|
+
this.canvasRenderer.z = z;
|
|
31134
|
+
let picked = !1;
|
|
31135
|
+
return this.canvasRenderer.drawShape(symbol, pickContext, x, y, {}, null, (context, symbolAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(pickPoint.x, pickPoint.y), picked), (context, symbolAttribute, themeAttribute) => {
|
|
31136
|
+
if (picked) return !0;
|
|
31137
|
+
const lineWidth = symbolAttribute.lineWidth || themeAttribute.lineWidth,
|
|
31138
|
+
pickStrokeBuffer = symbolAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
|
|
31139
|
+
keepStrokeScale = symbolAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
|
|
31140
|
+
return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(pickPoint.x, pickPoint.y), picked;
|
|
31141
|
+
}), this.canvasRenderer.z = 0, pickContext.modelMatrix !== lastModelMatrix && mat4Allocate.free(pickContext.modelMatrix), pickContext.modelMatrix = lastModelMatrix, pickContext.highPerformanceRestore(), picked;
|
|
31142
|
+
}
|
|
31143
|
+
}
|
|
31144
|
+
|
|
31145
|
+
let loadSymbolPick$1 = !1;
|
|
31146
|
+
function bindSymbolCanvasPickerContribution(container) {
|
|
31147
|
+
loadSymbolPick$1 || (loadSymbolPick$1 = !0, container.bind(CanvasSymbolPicker).toDynamicValue(() => new DefaultCanvasSymbolPicker(resolveContainerBinding$1(container, SymbolRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasSymbolPicker));
|
|
31148
|
+
}
|
|
31149
|
+
|
|
31150
|
+
class DefaultMathSymbolPicker extends PickerBase {
|
|
31151
|
+
constructor(canvasRenderer) {
|
|
31152
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "symbol", this.numberType = SYMBOL_NUMBER_TYPE;
|
|
31153
|
+
}
|
|
31154
|
+
}
|
|
31155
|
+
|
|
31156
|
+
let loadSymbolPick = !1;
|
|
31157
|
+
function bindSymbolMathPickerContribution(container) {
|
|
31158
|
+
loadSymbolPick || (loadSymbolPick = !0, container.bind(MathSymbolPicker).toDynamicValue(() => new DefaultMathSymbolPicker(resolveContainerBinding$1(container, SymbolRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathSymbolPicker));
|
|
31159
|
+
}
|
|
31160
|
+
|
|
31161
|
+
function _registerSymbol() {
|
|
31162
|
+
if (_registerSymbol.__loaded) return;
|
|
31163
|
+
_registerSymbol.__loaded = !0;
|
|
31164
|
+
const legacyContext = getLegacyBindingContext();
|
|
31165
|
+
registerSymbolGraphic(), symbolModule({
|
|
31166
|
+
bind: legacyContext.bind
|
|
31167
|
+
}), browser ? bindSymbolCanvasPickerContribution(legacyContext) : bindSymbolMathPickerContribution(legacyContext);
|
|
31168
|
+
}
|
|
31169
|
+
_registerSymbol.__loaded = !1;
|
|
31170
|
+
const registerSymbol = _registerSymbol;
|
|
31171
|
+
|
|
31172
|
+
class DefaultCanvasTextPicker extends Base3dPicker {
|
|
31173
|
+
constructor(canvasRenderer) {
|
|
31174
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "text", this.numberType = TEXT_NUMBER_TYPE;
|
|
31175
|
+
}
|
|
31176
|
+
contains(text, point, params) {
|
|
31177
|
+
const {
|
|
31178
|
+
pickContext: pickContext
|
|
31179
|
+
} = null != params ? params : {};
|
|
31180
|
+
if (!pickContext) return !1;
|
|
31181
|
+
const bounds = text.AABBBounds;
|
|
31182
|
+
if (!pickContext.camera) return !!bounds.containsPoint(point);
|
|
31183
|
+
pickContext.highPerformanceSave();
|
|
31184
|
+
const textAttribute = text.getGraphicTheme(),
|
|
31185
|
+
{
|
|
31186
|
+
keepDirIn3d = textAttribute.keepDirIn3d
|
|
31187
|
+
} = text.attribute,
|
|
31188
|
+
computed3dMatrix = !keepDirIn3d,
|
|
31189
|
+
data = this.transform(text, textAttribute, pickContext, computed3dMatrix),
|
|
31190
|
+
{
|
|
31191
|
+
x: x,
|
|
31192
|
+
y: y,
|
|
31193
|
+
z: z,
|
|
31194
|
+
lastModelMatrix: lastModelMatrix
|
|
31195
|
+
} = data;
|
|
31196
|
+
this.canvasRenderer.z = z;
|
|
31197
|
+
let pickPoint = point;
|
|
31198
|
+
if (pickContext.camera) {
|
|
31199
|
+
pickPoint = point.clone();
|
|
31200
|
+
const globalMatrix = text.parent.globalTransMatrix;
|
|
31201
|
+
pickPoint.x = globalMatrix.a * point.x + globalMatrix.c * point.y + globalMatrix.e, pickPoint.y = globalMatrix.b * point.x + globalMatrix.d * point.y + globalMatrix.f;
|
|
31202
|
+
}
|
|
31203
|
+
let picked = !1;
|
|
31204
|
+
return this.canvasRenderer.drawShape(text, pickContext, x, y, {}, null, (context, symbolAttribute, themeAttribute) => {
|
|
31205
|
+
if (picked) return !0;
|
|
31206
|
+
const {
|
|
31207
|
+
fontSize = textAttribute.fontSize,
|
|
31208
|
+
textBaseline = textAttribute.textBaseline,
|
|
31209
|
+
textAlign = textAttribute.textAlign
|
|
31210
|
+
} = text.attribute,
|
|
31211
|
+
bounds = text.AABBBounds,
|
|
31212
|
+
height = bounds.height(),
|
|
31213
|
+
width = bounds.width(),
|
|
31214
|
+
offsetY = textLayoutOffsetY(textBaseline, height, fontSize),
|
|
31215
|
+
offsetX = textDrawOffsetX(textAlign, width);
|
|
31216
|
+
return context.rect(offsetX + x, offsetY + y, width, height, z), picked = context.isPointInPath(pickPoint.x, pickPoint.y), picked;
|
|
31217
|
+
}, (context, symbolAttribute, themeAttribute) => picked), this.canvasRenderer.z = 0, pickContext.modelMatrix !== lastModelMatrix && mat4Allocate.free(pickContext.modelMatrix), pickContext.modelMatrix = lastModelMatrix, pickContext.highPerformanceRestore(), picked;
|
|
31218
|
+
}
|
|
31219
|
+
}
|
|
31220
|
+
|
|
31221
|
+
let loadTextPick$1 = !1;
|
|
31222
|
+
function bindTextCanvasPickerContribution(container) {
|
|
31223
|
+
loadTextPick$1 || (loadTextPick$1 = !0, container.bind(CanvasTextPicker).toDynamicValue(() => new DefaultCanvasTextPicker(resolveContainerBinding$1(container, TextRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasTextPicker));
|
|
31224
|
+
}
|
|
31225
|
+
|
|
31226
|
+
class DefaultMathTextPicker {
|
|
31227
|
+
constructor() {
|
|
31228
|
+
this.type = "text", this.numberType = TEXT_NUMBER_TYPE;
|
|
31229
|
+
}
|
|
31230
|
+
contains(text, point, params) {
|
|
31231
|
+
return !!text.AABBBounds.containsPoint(point);
|
|
31232
|
+
}
|
|
31233
|
+
}
|
|
31234
|
+
|
|
31235
|
+
let loadTextPick = !1;
|
|
31236
|
+
function bindTextMathPickerContribution(container) {
|
|
31237
|
+
loadTextPick || (loadTextPick = !0, container.bind(MathTextPicker).toDynamicValue(() => new DefaultMathTextPicker()).inSingletonScope(), container.bind(MathPickerContribution).toService(MathTextPicker));
|
|
31238
|
+
}
|
|
31239
|
+
|
|
31240
|
+
function _registerText() {
|
|
31241
|
+
if (_registerText.__loaded) return;
|
|
31242
|
+
_registerText.__loaded = !0;
|
|
31243
|
+
const legacyContext = getLegacyBindingContext();
|
|
31244
|
+
registerTextGraphic(), textModule({
|
|
31245
|
+
bind: legacyContext.bind
|
|
31246
|
+
}), browser ? bindTextCanvasPickerContribution(legacyContext) : bindTextMathPickerContribution(legacyContext);
|
|
31247
|
+
}
|
|
31248
|
+
_registerText.__loaded = !1;
|
|
31249
|
+
const registerText = _registerText;
|
|
31250
|
+
|
|
31251
|
+
const createArc3d = attributes => (registerArc3d(), createGraphic$1("arc3d", attributes));
|
|
31252
|
+
const createPyramid3d = attributes => (registerPyramid3d(), createGraphic$1("pyramid3d", attributes));
|
|
31253
|
+
const createRect3d = attributes => (registerRect3d(), createGraphic$1("rect3d", attributes));
|
|
31254
|
+
const waitForAllSubLayers = stage => new Promise(resolve => {
|
|
31255
|
+
vglobal.getRequestAnimationFrame()(() => {
|
|
31256
|
+
resolve(null);
|
|
31257
|
+
});
|
|
31258
|
+
}).then(() => {
|
|
31259
|
+
const promiseList = [];
|
|
31260
|
+
return stage.getChildren().forEach(layer => {
|
|
31261
|
+
var _a;
|
|
31262
|
+
(null === (_a = layer.subLayers) || void 0 === _a ? void 0 : _a.size) && layer.subLayers.forEach(subLayer => {
|
|
31263
|
+
const drawContribution = subLayer.drawContribution;
|
|
31264
|
+
(null == drawContribution ? void 0 : drawContribution.hooks) && drawContribution.rendering && promiseList.push(new Promise(resolve => {
|
|
31265
|
+
drawContribution.hooks.completeDraw.tap("outWait", () => {
|
|
31266
|
+
drawContribution.hooks.completeDraw.taps = drawContribution.hooks.completeDraw.taps.filter(item => "outWait" !== item.name), resolve(null);
|
|
31267
|
+
});
|
|
31268
|
+
}));
|
|
31269
|
+
});
|
|
31270
|
+
}), Promise.all(promiseList);
|
|
31271
|
+
});
|
|
31272
|
+
|
|
31273
|
+
function combineDomains(domains) {
|
|
31274
|
+
const result = [];
|
|
31275
|
+
for (let index = 0; index < domains.length; index++) {
|
|
31276
|
+
const domain = domains[index];
|
|
31277
|
+
0 !== index && domain[0] === result[result.length - 1] || result.push(domain[0]), result.push(domain[1]);
|
|
31278
|
+
}
|
|
31279
|
+
return result;
|
|
31280
|
+
}
|
|
31281
|
+
function moveAfterInArray(array, target, ref) {
|
|
31282
|
+
const index = array.indexOf(target),
|
|
31283
|
+
refIndex = array.indexOf(ref);
|
|
31284
|
+
index >= 0 && refIndex >= 0 && index < refIndex && (array.splice(index, 1), array.splice(refIndex, 0, target));
|
|
31285
|
+
}
|
|
31286
|
+
|
|
31287
|
+
const log = (msg, ...args) => Logger.getInstance().info(`[VChart log]: ${msg}`, ...args);
|
|
31288
|
+
const warn = (msg, detail) => (isFunction$1(config.warnHandler) && config.warnHandler.call(null, msg, detail), detail ? Logger.getInstance().warn(`[VChart warn]: ${msg}`, detail) : Logger.getInstance().warn(`[VChart warn]: ${msg}`));
|
|
31289
|
+
const error = (msg, detail, err) => {
|
|
31290
|
+
{
|
|
31291
|
+
if (!isFunction$1(config.errorHandler)) throw new Error(msg);
|
|
31292
|
+
config.errorHandler.call(null, msg, detail);
|
|
31293
|
+
}
|
|
31294
|
+
};
|
|
31295
|
+
const config = {
|
|
31296
|
+
silent: !1,
|
|
31297
|
+
warnHandler: !1,
|
|
31298
|
+
errorHandler: !1
|
|
31299
|
+
};
|
|
31300
|
+
|
|
31301
|
+
const isBrowser = isBrowserEnv();
|
|
31302
|
+
const domDocument = isBrowser && globalThis ? globalThis.document : void 0;
|
|
31303
|
+
function isTrueBrowser(mode) {
|
|
31304
|
+
return ("desktop-browser" === mode || "mobile-browser" === mode) && isBrowser;
|
|
31305
|
+
}
|
|
31306
|
+
function isMobileLikeMode(mode) {
|
|
31307
|
+
return isMiniAppLikeMode(mode) || "mobile-browser" === mode;
|
|
31308
|
+
}
|
|
31309
|
+
function isMiniAppLikeMode(mode) {
|
|
31310
|
+
return mode.includes("miniApp") || "lynx" === mode || "wx" === mode || "harmony" === mode;
|
|
31311
|
+
}
|
|
31312
|
+
|
|
31313
|
+
let VChartId = 0;
|
|
31314
|
+
function createID() {
|
|
31315
|
+
return VChartId >= 9999999 && (VChartId = 0), VChartId++;
|
|
31316
|
+
}
|
|
31317
|
+
|
|
31318
|
+
function couldBeValidNumber(v) {
|
|
31319
|
+
return null != v && "" !== v && (!!isNumber$2(v) || +v == +v);
|
|
31320
|
+
}
|
|
31321
|
+
function toValidNumber(v) {
|
|
30634
31322
|
if (isValidNumber$1(v)) return v;
|
|
30635
31323
|
const value = +v;
|
|
30636
31324
|
return isValidNumber$1(value) ? value : 0;
|
|
@@ -35196,269 +35884,29 @@
|
|
|
35196
35884
|
|
|
35197
35885
|
let loaded$1 = !1;
|
|
35198
35886
|
function bindCanvasPickerContribution(c) {
|
|
35199
|
-
loaded$1 || (loaded$1 = !0, c.bind(CanvasGroupPicker).toDynamicValue(() => new DefaultCanvasGroupPicker()).inSingletonScope(), c.bind(CanvasPickerContribution).toService(CanvasGroupPicker), bindContributionProvider(c.bind.bind(c), CanvasPickerContribution));
|
|
35200
|
-
}
|
|
35201
|
-
|
|
35202
|
-
class PickerBase {
|
|
35203
|
-
contains(graphic, point, params) {
|
|
35204
|
-
if (!graphic.AABBBounds.containsPoint(point)) return !1;
|
|
35205
|
-
if ("imprecise" === graphic.attribute.pickMode) return !0;
|
|
35206
|
-
if (!this.canvasRenderer) return !0;
|
|
35207
|
-
const {
|
|
35208
|
-
pickContext: pickContext
|
|
35209
|
-
} = null != params ? params : {};
|
|
35210
|
-
if (!pickContext) return !1;
|
|
35211
|
-
const attribute = graphic.getGraphicTheme();
|
|
35212
|
-
pickContext.highPerformanceSave();
|
|
35213
|
-
let {
|
|
35214
|
-
x = attribute.x,
|
|
35215
|
-
y = attribute.y
|
|
35216
|
-
} = graphic.attribute;
|
|
35217
|
-
if (graphic.transMatrix.onlyTranslate()) {
|
|
35218
|
-
const point = graphic.getOffsetXY(attribute);
|
|
35219
|
-
x += point.x, y += point.y, pickContext.setTransformForCurrent();
|
|
35220
|
-
} else x = 0, y = 0, pickContext.transformFromMatrix(graphic.transMatrix, !0);
|
|
35221
|
-
let picked = !1,
|
|
35222
|
-
_final = !1;
|
|
35223
|
-
return this.canvasRenderer.drawShape(graphic, pickContext, x, y, {}, null, (context, arcAttribute, themeAttribute, final) => !(!picked && !_final) || (picked = context.isPointInPath(point.x, point.y), _final = final || _final, picked), (context, arcAttribute, themeAttribute, final) => {
|
|
35224
|
-
if (picked || _final) return !0;
|
|
35225
|
-
const lineWidth = arcAttribute.lineWidth || themeAttribute.lineWidth,
|
|
35226
|
-
pickStrokeBuffer = arcAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
|
|
35227
|
-
keepStrokeScale = arcAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
|
|
35228
|
-
return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), _final = final || _final, picked;
|
|
35229
|
-
}), pickContext.highPerformanceRestore(), picked;
|
|
35230
|
-
}
|
|
35231
|
-
}
|
|
35232
|
-
|
|
35233
|
-
class DefaultCanvasArcPicker extends PickerBase {
|
|
35234
|
-
constructor(canvasRenderer) {
|
|
35235
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "arc", this.numberType = ARC_NUMBER_TYPE;
|
|
35236
|
-
}
|
|
35237
|
-
}
|
|
35238
|
-
|
|
35239
|
-
let loadArcPick$1 = !1;
|
|
35240
|
-
function bindArcCanvasPickerContribution(container) {
|
|
35241
|
-
loadArcPick$1 || (loadArcPick$1 = !0, container.bind(CanvasArcPicker).toDynamicValue(() => new DefaultCanvasArcPicker(resolveContainerBinding$1(container, ArcRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasArcPicker));
|
|
35242
|
-
}
|
|
35243
|
-
|
|
35244
|
-
class DefaultCanvasAreaPicker extends PickerBase {
|
|
35245
|
-
constructor(canvasRenderer) {
|
|
35246
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "area", this.numberType = AREA_NUMBER_TYPE;
|
|
35247
|
-
}
|
|
35248
|
-
}
|
|
35249
|
-
|
|
35250
|
-
let loadAreaPick$1 = !1;
|
|
35251
|
-
function bindAreaCanvasPickerContribution(container) {
|
|
35252
|
-
loadAreaPick$1 || (loadAreaPick$1 = !0, container.bind(CanvasAreaPicker).toDynamicValue(() => new DefaultCanvasAreaPicker(resolveContainerBinding$1(container, AreaRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasAreaPicker));
|
|
35253
|
-
}
|
|
35254
|
-
|
|
35255
|
-
class DefaultCanvasCirclePicker extends PickerBase {
|
|
35256
|
-
constructor(canvasRenderer) {
|
|
35257
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "circle", this.numberType = CIRCLE_NUMBER_TYPE;
|
|
35258
|
-
}
|
|
35259
|
-
}
|
|
35260
|
-
|
|
35261
|
-
let loadCirclePick$1 = !1;
|
|
35262
|
-
function bindCircleCanvasPickerContribution(container) {
|
|
35263
|
-
loadCirclePick$1 || (loadCirclePick$1 = !0, container.bind(CanvasCirclePicker).toDynamicValue(() => new DefaultCanvasCirclePicker(resolveContainerBinding$1(container, CircleRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasCirclePicker));
|
|
35264
|
-
}
|
|
35265
|
-
|
|
35266
|
-
class GlyphPickerBase {
|
|
35267
|
-
constructor() {
|
|
35268
|
-
this.type = "glyph", this.numberType = GLYPH_NUMBER_TYPE;
|
|
35269
|
-
}
|
|
35270
|
-
contains(glyph, point, params) {
|
|
35271
|
-
if (!glyph.AABBBounds.containsPoint(point)) return !1;
|
|
35272
|
-
if ("imprecise" === glyph.attribute.pickMode) return !0;
|
|
35273
|
-
const {
|
|
35274
|
-
pickContext: pickContext
|
|
35275
|
-
} = null != params ? params : {};
|
|
35276
|
-
if (!pickContext) return !1;
|
|
35277
|
-
const pickerService = null == params ? void 0 : params.pickerService;
|
|
35278
|
-
if (pickerService) {
|
|
35279
|
-
let picked = !1;
|
|
35280
|
-
return glyph.getSubGraphic().forEach(g => {
|
|
35281
|
-
if (picked) return;
|
|
35282
|
-
const data = pickerService.pickItem(g, point, null, params);
|
|
35283
|
-
picked = !(!data || !data.graphic);
|
|
35284
|
-
}), picked;
|
|
35285
|
-
}
|
|
35286
|
-
return !1;
|
|
35287
|
-
}
|
|
35288
|
-
}
|
|
35289
|
-
|
|
35290
|
-
class DefaultCanvasGlyphPicker extends GlyphPickerBase {
|
|
35291
|
-
constructor(canvasRenderer) {
|
|
35292
|
-
super(), this.canvasRenderer = canvasRenderer;
|
|
35293
|
-
}
|
|
35294
|
-
}
|
|
35295
|
-
|
|
35296
|
-
let loadGlyphPick$1 = !1;
|
|
35297
|
-
function bindGlyphCanvasPickerContribution(container) {
|
|
35298
|
-
loadGlyphPick$1 || (loadGlyphPick$1 = !0, container.bind(CanvasGlyphPicker).toDynamicValue(() => new DefaultCanvasGlyphPicker(resolveContainerBinding$1(container, GlyphRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasGlyphPicker));
|
|
35299
|
-
}
|
|
35300
|
-
|
|
35301
|
-
class DefaultCanvasImagePicker extends PickerBase {
|
|
35302
|
-
constructor(canvasRenderer) {
|
|
35303
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "image", this.numberType = IMAGE_NUMBER_TYPE;
|
|
35304
|
-
}
|
|
35305
|
-
}
|
|
35306
|
-
|
|
35307
|
-
let loadImagePick$1 = !1;
|
|
35308
|
-
function bindImageCanvasPickerContribution(container) {
|
|
35309
|
-
loadImagePick$1 || (loadImagePick$1 = !0, container.bind(CanvasImagePicker).toDynamicValue(() => new DefaultCanvasImagePicker(resolveContainerBinding$1(container, ImageRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasImagePicker));
|
|
35310
|
-
}
|
|
35311
|
-
|
|
35312
|
-
class BaseLinePicker extends BaseRender {
|
|
35313
|
-
contains(graphic, point, params) {
|
|
35314
|
-
if (!graphic.AABBBounds.containsPoint(point)) return !1;
|
|
35315
|
-
if ("imprecise" === graphic.attribute.pickMode) return !0;
|
|
35316
|
-
const {
|
|
35317
|
-
pickContext: pickContext
|
|
35318
|
-
} = null != params ? params : {};
|
|
35319
|
-
if (!pickContext) return !1;
|
|
35320
|
-
pickContext.highPerformanceSave();
|
|
35321
|
-
const lineAttribute = graphic.getGraphicTheme(),
|
|
35322
|
-
data = this.transform(graphic, lineAttribute, pickContext),
|
|
35323
|
-
{
|
|
35324
|
-
x: x,
|
|
35325
|
-
y: y,
|
|
35326
|
-
z: z,
|
|
35327
|
-
lastModelMatrix: lastModelMatrix
|
|
35328
|
-
} = data;
|
|
35329
|
-
let pickPoint = point;
|
|
35330
|
-
if (pickContext.camera) {
|
|
35331
|
-
pickPoint = point.clone();
|
|
35332
|
-
const globalMatrix = graphic.parent.globalTransMatrix;
|
|
35333
|
-
pickPoint.x = globalMatrix.a * point.x + globalMatrix.c * point.y + globalMatrix.e, pickPoint.y = globalMatrix.b * point.x + globalMatrix.d * point.y + globalMatrix.f;
|
|
35334
|
-
}
|
|
35335
|
-
this.canvasRenderer.z = z;
|
|
35336
|
-
let picked = !1;
|
|
35337
|
-
return this.canvasRenderer.drawShape(graphic, pickContext, x, y, {}, null, context => !!picked || (picked = context.isPointInPath(pickPoint.x, pickPoint.y), picked), (context, lineAttribute, themeAttribute) => {
|
|
35338
|
-
if (picked) return !0;
|
|
35339
|
-
const lineWidth = lineAttribute.lineWidth || themeAttribute.lineWidth,
|
|
35340
|
-
pickStrokeBuffer = lineAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
|
|
35341
|
-
keepStrokeScale = lineAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
|
|
35342
|
-
return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(pickPoint.x, pickPoint.y), picked;
|
|
35343
|
-
}), this.canvasRenderer.z = 0, pickContext.modelMatrix !== lastModelMatrix && mat4Allocate.free(pickContext.modelMatrix), pickContext.modelMatrix = lastModelMatrix, pickContext.highPerformanceRestore(), picked;
|
|
35344
|
-
}
|
|
35345
|
-
}
|
|
35346
|
-
|
|
35347
|
-
class DefaultCanvasLinePicker extends BaseLinePicker {
|
|
35348
|
-
constructor(canvasRenderer) {
|
|
35349
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "line", this.numberType = LINE_NUMBER_TYPE;
|
|
35350
|
-
}
|
|
35351
|
-
}
|
|
35352
|
-
|
|
35353
|
-
let loadLinePick$1 = !1;
|
|
35354
|
-
function bindLineCanvasPickerContribution(container) {
|
|
35355
|
-
loadLinePick$1 || (loadLinePick$1 = !0, container.bind(CanvasLinePicker).toDynamicValue(() => new DefaultCanvasLinePicker(resolveContainerBinding$1(container, LineRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasLinePicker));
|
|
35356
|
-
}
|
|
35357
|
-
|
|
35358
|
-
const _bounds = new AABBBounds();
|
|
35359
|
-
class RectPickerBase {
|
|
35360
|
-
constructor() {
|
|
35361
|
-
this.type = "rect", this.numberType = RECT_NUMBER_TYPE;
|
|
35362
|
-
}
|
|
35363
|
-
contains(rect, point, params) {
|
|
35364
|
-
if (!rect.AABBBounds.containsPoint(point)) return !1;
|
|
35365
|
-
if ("imprecise" === rect.attribute.pickMode) return !0;
|
|
35366
|
-
const {
|
|
35367
|
-
pickContext: pickContext
|
|
35368
|
-
} = null != params ? params : {};
|
|
35369
|
-
if (!pickContext) return !1;
|
|
35370
|
-
const rectAttribute = rect.getGraphicTheme(),
|
|
35371
|
-
{
|
|
35372
|
-
cornerRadius = rectAttribute.cornerRadius
|
|
35373
|
-
} = rect.attribute;
|
|
35374
|
-
let {
|
|
35375
|
-
x = rectAttribute.x,
|
|
35376
|
-
y = rectAttribute.y
|
|
35377
|
-
} = rect.attribute;
|
|
35378
|
-
pickContext.highPerformanceSave();
|
|
35379
|
-
let onlyTranslate = !0;
|
|
35380
|
-
if (rect.transMatrix.onlyTranslate()) {
|
|
35381
|
-
const point = rect.getOffsetXY(rectAttribute);
|
|
35382
|
-
x += point.x, y += point.y, pickContext.setTransformForCurrent();
|
|
35383
|
-
} else x = 0, y = 0, onlyTranslate = !1, pickContext.transformFromMatrix(rect.transMatrix, !0);
|
|
35384
|
-
let picked = !0;
|
|
35385
|
-
if (!onlyTranslate || rect.shadowRoot || isNumber$2(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) => {
|
|
35386
|
-
if (picked) return !0;
|
|
35387
|
-
const lineWidth = rectAttribute.lineWidth || themeAttribute.lineWidth,
|
|
35388
|
-
pickStrokeBuffer = rectAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
|
|
35389
|
-
keepStrokeScale = rectAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
|
|
35390
|
-
return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), picked;
|
|
35391
|
-
});else {
|
|
35392
|
-
const {
|
|
35393
|
-
fill = rectAttribute.fill,
|
|
35394
|
-
stroke = rectAttribute.stroke,
|
|
35395
|
-
lineWidth = rectAttribute.lineWidth
|
|
35396
|
-
} = rect.attribute;
|
|
35397
|
-
if (fill) picked = !0;else if (stroke) {
|
|
35398
|
-
const bounds = rect.AABBBounds;
|
|
35399
|
-
_bounds.setValue(bounds.x1, bounds.y1, bounds.x2, bounds.y2), _bounds.expand(-lineWidth / 2), picked = !_bounds.containsPoint(point);
|
|
35400
|
-
}
|
|
35401
|
-
}
|
|
35402
|
-
return pickContext.highPerformanceRestore(), picked;
|
|
35403
|
-
}
|
|
35404
|
-
}
|
|
35405
|
-
|
|
35406
|
-
class DefaultCanvasLottiePicker extends RectPickerBase {
|
|
35407
|
-
constructor(canvasRenderer) {
|
|
35408
|
-
super(), this.canvasRenderer = canvasRenderer;
|
|
35409
|
-
}
|
|
35410
|
-
}
|
|
35411
|
-
|
|
35412
|
-
let loadLottiePick = !1;
|
|
35413
|
-
function bindLottieCanvasPickerContribution(container) {
|
|
35414
|
-
loadLottiePick || (loadLottiePick = !0, container.bind(CanvasLottiePicker).toDynamicValue(() => new DefaultCanvasLottiePicker(resolveContainerBinding$1(container, RectRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasLottiePicker));
|
|
35415
|
-
}
|
|
35416
|
-
|
|
35417
|
-
class DefaultCanvasPathPicker extends BaseLinePicker {
|
|
35418
|
-
constructor(canvasRenderer) {
|
|
35419
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "path", this.numberType = PATH_NUMBER_TYPE;
|
|
35420
|
-
}
|
|
35421
|
-
}
|
|
35422
|
-
|
|
35423
|
-
let loadPathPick$1 = !1;
|
|
35424
|
-
function bindPathCanvasPickerContribution(container) {
|
|
35425
|
-
loadPathPick$1 || (loadPathPick$1 = !0, container.bind(CanvasPathPicker).toDynamicValue(() => new DefaultCanvasPathPicker(resolveContainerBinding$1(container, PathRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasPathPicker));
|
|
35426
|
-
}
|
|
35427
|
-
|
|
35428
|
-
class DefaultCanvasPolygonPicker extends PickerBase {
|
|
35429
|
-
constructor(canvasRenderer) {
|
|
35430
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "polygon", this.numberType = POLYGON_NUMBER_TYPE;
|
|
35431
|
-
}
|
|
35432
|
-
}
|
|
35433
|
-
|
|
35434
|
-
let loadPolygonPick$1 = !1;
|
|
35435
|
-
function bindPolygonCanvasPickerContribution(container) {
|
|
35436
|
-
loadPolygonPick$1 || (loadPolygonPick$1 = !0, container.bind(CanvasPolygonPicker).toDynamicValue(() => new DefaultCanvasPolygonPicker(resolveContainerBinding$1(container, PolygonRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasPolygonPicker));
|
|
35887
|
+
loaded$1 || (loaded$1 = !0, c.bind(CanvasGroupPicker).toDynamicValue(() => new DefaultCanvasGroupPicker()).inSingletonScope(), c.bind(CanvasPickerContribution).toService(CanvasGroupPicker), bindContributionProvider(c.bind.bind(c), CanvasPickerContribution));
|
|
35437
35888
|
}
|
|
35438
35889
|
|
|
35439
|
-
class
|
|
35890
|
+
class DefaultCanvasCirclePicker extends PickerBase {
|
|
35440
35891
|
constructor(canvasRenderer) {
|
|
35441
|
-
super(), this.canvasRenderer = canvasRenderer;
|
|
35892
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "circle", this.numberType = CIRCLE_NUMBER_TYPE;
|
|
35442
35893
|
}
|
|
35443
35894
|
}
|
|
35444
35895
|
|
|
35445
|
-
let
|
|
35446
|
-
function
|
|
35447
|
-
|
|
35896
|
+
let loadCirclePick$1 = !1;
|
|
35897
|
+
function bindCircleCanvasPickerContribution(container) {
|
|
35898
|
+
loadCirclePick$1 || (loadCirclePick$1 = !0, container.bind(CanvasCirclePicker).toDynamicValue(() => new DefaultCanvasCirclePicker(resolveContainerBinding$1(container, CircleRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasCirclePicker));
|
|
35448
35899
|
}
|
|
35449
35900
|
|
|
35450
|
-
class
|
|
35901
|
+
class DefaultCanvasLottiePicker extends RectPickerBase {
|
|
35451
35902
|
constructor(canvasRenderer) {
|
|
35452
|
-
this.canvasRenderer = canvasRenderer
|
|
35453
|
-
}
|
|
35454
|
-
contains(richtext, point, params) {
|
|
35455
|
-
return !!richtext.AABBBounds.containsPoint(point);
|
|
35903
|
+
super(), this.canvasRenderer = canvasRenderer;
|
|
35456
35904
|
}
|
|
35457
35905
|
}
|
|
35458
35906
|
|
|
35459
|
-
let
|
|
35460
|
-
function
|
|
35461
|
-
|
|
35907
|
+
let loadLottiePick = !1;
|
|
35908
|
+
function bindLottieCanvasPickerContribution(container) {
|
|
35909
|
+
loadLottiePick || (loadLottiePick = !0, container.bind(CanvasLottiePicker).toDynamicValue(() => new DefaultCanvasLottiePicker(resolveContainerBinding$1(container, RectRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasLottiePicker));
|
|
35462
35910
|
}
|
|
35463
35911
|
|
|
35464
35912
|
class DefaultCanvasStarPicker extends PickerBase {
|
|
@@ -35473,106 +35921,6 @@
|
|
|
35473
35921
|
loadStarPick || (null === (_a = container.isBound) || void 0 === _a ? void 0 : _a.call(container, StarRender)) && (loadStarPick = !0, container.bind(CanvasStarPicker).toDynamicValue(() => new DefaultCanvasStarPicker(resolveContainerBinding$1(container, StarRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasStarPicker));
|
|
35474
35922
|
}
|
|
35475
35923
|
|
|
35476
|
-
class DefaultCanvasSymbolPicker extends Base3dPicker {
|
|
35477
|
-
constructor(canvasRenderer) {
|
|
35478
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "symbol", this.numberType = SYMBOL_NUMBER_TYPE;
|
|
35479
|
-
}
|
|
35480
|
-
contains(symbol, point, params) {
|
|
35481
|
-
const {
|
|
35482
|
-
pickContext: pickContext
|
|
35483
|
-
} = null != params ? params : {};
|
|
35484
|
-
if (!pickContext) return !1;
|
|
35485
|
-
const parsedPath = symbol.getParsedPath();
|
|
35486
|
-
if (!pickContext.camera) {
|
|
35487
|
-
if (!symbol.AABBBounds.containsPoint(point)) return !1;
|
|
35488
|
-
if (parsedPath.isSvg || "imprecise" === symbol.attribute.pickMode) return !0;
|
|
35489
|
-
}
|
|
35490
|
-
pickContext.highPerformanceSave();
|
|
35491
|
-
const symbolAttribute = symbol.getGraphicTheme(),
|
|
35492
|
-
data = this.transform(symbol, symbolAttribute, pickContext),
|
|
35493
|
-
{
|
|
35494
|
-
x: x,
|
|
35495
|
-
y: y,
|
|
35496
|
-
z: z,
|
|
35497
|
-
lastModelMatrix: lastModelMatrix
|
|
35498
|
-
} = data;
|
|
35499
|
-
let pickPoint = point;
|
|
35500
|
-
if (pickContext.camera) {
|
|
35501
|
-
pickPoint = point.clone();
|
|
35502
|
-
const globalMatrix = symbol.parent.globalTransMatrix;
|
|
35503
|
-
pickPoint.x = globalMatrix.a * point.x + globalMatrix.c * point.y + globalMatrix.e, pickPoint.y = globalMatrix.b * point.x + globalMatrix.d * point.y + globalMatrix.f;
|
|
35504
|
-
}
|
|
35505
|
-
this.canvasRenderer.z = z;
|
|
35506
|
-
let picked = !1;
|
|
35507
|
-
return this.canvasRenderer.drawShape(symbol, pickContext, x, y, {}, null, (context, symbolAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(pickPoint.x, pickPoint.y), picked), (context, symbolAttribute, themeAttribute) => {
|
|
35508
|
-
if (picked) return !0;
|
|
35509
|
-
const lineWidth = symbolAttribute.lineWidth || themeAttribute.lineWidth,
|
|
35510
|
-
pickStrokeBuffer = symbolAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
|
|
35511
|
-
keepStrokeScale = symbolAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
|
|
35512
|
-
return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(pickPoint.x, pickPoint.y), picked;
|
|
35513
|
-
}), this.canvasRenderer.z = 0, pickContext.modelMatrix !== lastModelMatrix && mat4Allocate.free(pickContext.modelMatrix), pickContext.modelMatrix = lastModelMatrix, pickContext.highPerformanceRestore(), picked;
|
|
35514
|
-
}
|
|
35515
|
-
}
|
|
35516
|
-
|
|
35517
|
-
let loadSymbolPick$1 = !1;
|
|
35518
|
-
function bindSymbolCanvasPickerContribution(container) {
|
|
35519
|
-
loadSymbolPick$1 || (loadSymbolPick$1 = !0, container.bind(CanvasSymbolPicker).toDynamicValue(() => new DefaultCanvasSymbolPicker(resolveContainerBinding$1(container, SymbolRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasSymbolPicker));
|
|
35520
|
-
}
|
|
35521
|
-
|
|
35522
|
-
class DefaultCanvasTextPicker extends Base3dPicker {
|
|
35523
|
-
constructor(canvasRenderer) {
|
|
35524
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "text", this.numberType = TEXT_NUMBER_TYPE;
|
|
35525
|
-
}
|
|
35526
|
-
contains(text, point, params) {
|
|
35527
|
-
const {
|
|
35528
|
-
pickContext: pickContext
|
|
35529
|
-
} = null != params ? params : {};
|
|
35530
|
-
if (!pickContext) return !1;
|
|
35531
|
-
const bounds = text.AABBBounds;
|
|
35532
|
-
if (!pickContext.camera) return !!bounds.containsPoint(point);
|
|
35533
|
-
pickContext.highPerformanceSave();
|
|
35534
|
-
const textAttribute = text.getGraphicTheme(),
|
|
35535
|
-
{
|
|
35536
|
-
keepDirIn3d = textAttribute.keepDirIn3d
|
|
35537
|
-
} = text.attribute,
|
|
35538
|
-
computed3dMatrix = !keepDirIn3d,
|
|
35539
|
-
data = this.transform(text, textAttribute, pickContext, computed3dMatrix),
|
|
35540
|
-
{
|
|
35541
|
-
x: x,
|
|
35542
|
-
y: y,
|
|
35543
|
-
z: z,
|
|
35544
|
-
lastModelMatrix: lastModelMatrix
|
|
35545
|
-
} = data;
|
|
35546
|
-
this.canvasRenderer.z = z;
|
|
35547
|
-
let pickPoint = point;
|
|
35548
|
-
if (pickContext.camera) {
|
|
35549
|
-
pickPoint = point.clone();
|
|
35550
|
-
const globalMatrix = text.parent.globalTransMatrix;
|
|
35551
|
-
pickPoint.x = globalMatrix.a * point.x + globalMatrix.c * point.y + globalMatrix.e, pickPoint.y = globalMatrix.b * point.x + globalMatrix.d * point.y + globalMatrix.f;
|
|
35552
|
-
}
|
|
35553
|
-
let picked = !1;
|
|
35554
|
-
return this.canvasRenderer.drawShape(text, pickContext, x, y, {}, null, (context, symbolAttribute, themeAttribute) => {
|
|
35555
|
-
if (picked) return !0;
|
|
35556
|
-
const {
|
|
35557
|
-
fontSize = textAttribute.fontSize,
|
|
35558
|
-
textBaseline = textAttribute.textBaseline,
|
|
35559
|
-
textAlign = textAttribute.textAlign
|
|
35560
|
-
} = text.attribute,
|
|
35561
|
-
bounds = text.AABBBounds,
|
|
35562
|
-
height = bounds.height(),
|
|
35563
|
-
width = bounds.width(),
|
|
35564
|
-
offsetY = textLayoutOffsetY(textBaseline, height, fontSize),
|
|
35565
|
-
offsetX = textDrawOffsetX(textAlign, width);
|
|
35566
|
-
return context.rect(offsetX + x, offsetY + y, width, height, z), picked = context.isPointInPath(pickPoint.x, pickPoint.y), picked;
|
|
35567
|
-
}, (context, symbolAttribute, themeAttribute) => picked), this.canvasRenderer.z = 0, pickContext.modelMatrix !== lastModelMatrix && mat4Allocate.free(pickContext.modelMatrix), pickContext.modelMatrix = lastModelMatrix, pickContext.highPerformanceRestore(), picked;
|
|
35568
|
-
}
|
|
35569
|
-
}
|
|
35570
|
-
|
|
35571
|
-
let loadTextPick$1 = !1;
|
|
35572
|
-
function bindTextCanvasPickerContribution(container) {
|
|
35573
|
-
loadTextPick$1 || (loadTextPick$1 = !0, container.bind(CanvasTextPicker).toDynamicValue(() => new DefaultCanvasTextPicker(resolveContainerBinding$1(container, TextRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasTextPicker));
|
|
35574
|
-
}
|
|
35575
|
-
|
|
35576
35924
|
const GIFIMAGE_NUMBER_TYPE = genNumberType();
|
|
35577
35925
|
genNumberType();
|
|
35578
35926
|
|
|
@@ -36121,216 +36469,83 @@
|
|
|
36121
36469
|
}
|
|
36122
36470
|
dispatchEvent(event) {
|
|
36123
36471
|
const {
|
|
36124
|
-
type: type
|
|
36125
|
-
} = event;
|
|
36126
|
-
return !!this.eventManager.cache[type] && (event.changedTouches && event.changedTouches[0] && (event.offsetX = event.changedTouches[0].x, event.changedTouches[0].offsetX = event.changedTouches[0].x, event.changedTouches[0].clientX = event.changedTouches[0].x, event.offsetY = event.changedTouches[0].y, event.changedTouches[0].offsetY = event.changedTouches[0].y, event.changedTouches[0].clientY = event.changedTouches[0].y), event.preventDefault = () => {}, event.stopPropagation = () => {}, this.eventManager.cache[type].listener && this.eventManager.cache[type].listener.forEach(f => {
|
|
36127
|
-
f(event);
|
|
36128
|
-
}), !0);
|
|
36129
|
-
}
|
|
36130
|
-
getStyle() {
|
|
36131
|
-
return {};
|
|
36132
|
-
}
|
|
36133
|
-
setStyle(style) {}
|
|
36134
|
-
getBoundingClientRect() {
|
|
36135
|
-
const wh = this.getWH();
|
|
36136
|
-
return {
|
|
36137
|
-
x: 0,
|
|
36138
|
-
y: 0,
|
|
36139
|
-
width: wh.width,
|
|
36140
|
-
height: wh.height,
|
|
36141
|
-
left: 0,
|
|
36142
|
-
top: 0,
|
|
36143
|
-
right: 0,
|
|
36144
|
-
bottom: 0
|
|
36145
|
-
};
|
|
36146
|
-
}
|
|
36147
|
-
clearViewBox(color) {
|
|
36148
|
-
const vb = this.viewBox,
|
|
36149
|
-
context = this.getContext(),
|
|
36150
|
-
dpr = this.getDpr();
|
|
36151
|
-
context.nativeContext.save(), context.nativeContext.setTransform(dpr, 0, 0, dpr, 0, 0), context.clearRect(vb.x1, vb.y1, vb.x2 - vb.x1, vb.y2 - vb.y1), color && (context.fillStyle = color, context.fillRect(vb.x1, vb.y1, vb.x2 - vb.x1, vb.y2 - vb.y1)), context.nativeContext.restore();
|
|
36152
|
-
}
|
|
36153
|
-
}
|
|
36154
|
-
FeishuWindowHandlerContribution.env = "feishu";
|
|
36155
|
-
function bindFeishuWindowContribution(container) {
|
|
36156
|
-
var _a, _b;
|
|
36157
|
-
(null === (_a = container.isBound) || void 0 === _a ? void 0 : _a.call(container, FeishuWindowHandlerContribution)) || container.bind(FeishuWindowHandlerContribution).toSelf(), (null === (_b = container.getNamed) || void 0 === _b ? void 0 : _b.call(container, WindowHandlerContribution, FeishuWindowHandlerContribution.env)) || container.bind(WindowHandlerContribution).toService(FeishuWindowHandlerContribution).whenTargetNamed(FeishuWindowHandlerContribution.env);
|
|
36158
|
-
}
|
|
36159
|
-
|
|
36160
|
-
class DefaultMathPickerService extends DefaultPickService {
|
|
36161
|
-
constructor(contributions, pickItemInterceptorContributions, pickServiceInterceptorContributions) {
|
|
36162
|
-
super(pickItemInterceptorContributions, pickServiceInterceptorContributions), this.contributions = contributions, this.pickItemInterceptorContributions = pickItemInterceptorContributions, this.pickServiceInterceptorContributions = pickServiceInterceptorContributions, this.global.hooks.onSetEnv.tap("math-picker-service", (lastEnv, env, global) => {
|
|
36163
|
-
this.configure(global, env);
|
|
36164
|
-
}), this.configure(this.global, this.global.env), this.pickerMap = new Map(), this.init();
|
|
36165
|
-
}
|
|
36166
|
-
init() {
|
|
36167
|
-
this.contributions.getContributions().forEach(item => {
|
|
36168
|
-
this.pickerMap.set(item.numberType, item);
|
|
36169
|
-
}), super._init();
|
|
36170
|
-
}
|
|
36171
|
-
configure(global, env) {
|
|
36172
|
-
this.pickContext = new EmptyContext2d(null, 1);
|
|
36173
|
-
}
|
|
36174
|
-
pickItem(graphic, point, parentMatrix, params) {
|
|
36175
|
-
if (!1 === graphic.attribute.pickable) return null;
|
|
36176
|
-
const picker = this.pickerMap.get(graphic.numberType);
|
|
36177
|
-
if (!picker) return null;
|
|
36178
|
-
const pd = picker.contains(graphic, point, params),
|
|
36179
|
-
g = pd ? graphic : null;
|
|
36180
|
-
return g ? {
|
|
36181
|
-
graphic: g,
|
|
36182
|
-
params: pd
|
|
36183
|
-
} : null;
|
|
36184
|
-
}
|
|
36185
|
-
}
|
|
36186
|
-
|
|
36187
|
-
let loaded = !1;
|
|
36188
|
-
function bindMathPickerContribution(c) {
|
|
36189
|
-
loaded || (loaded = !0, bindContributionProvider(c.bind.bind(c), MathPickerContribution));
|
|
36190
|
-
}
|
|
36191
|
-
|
|
36192
|
-
class DefaultMathArcPicker extends PickerBase {
|
|
36193
|
-
constructor(canvasRenderer) {
|
|
36194
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "arc", this.numberType = ARC_NUMBER_TYPE;
|
|
36195
|
-
}
|
|
36196
|
-
}
|
|
36197
|
-
|
|
36198
|
-
let loadArcPick = !1;
|
|
36199
|
-
function bindArcMathPickerContribution(container) {
|
|
36200
|
-
loadArcPick || (loadArcPick = !0, container.bind(MathArcPicker).toDynamicValue(() => new DefaultMathArcPicker(resolveContainerBinding$1(container, ArcRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathArcPicker));
|
|
36201
|
-
}
|
|
36202
|
-
|
|
36203
|
-
class DefaultMathAreaPicker extends PickerBase {
|
|
36204
|
-
constructor(canvasRenderer) {
|
|
36205
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "area", this.numberType = AREA_NUMBER_TYPE;
|
|
36206
|
-
}
|
|
36207
|
-
}
|
|
36208
|
-
|
|
36209
|
-
let loadAreaPick = !1;
|
|
36210
|
-
function bindAreaMathPickerContribution(container) {
|
|
36211
|
-
loadAreaPick || (loadAreaPick = !0, container.bind(MathAreaPicker).toDynamicValue(() => new DefaultMathAreaPicker(resolveContainerBinding$1(container, AreaRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathAreaPicker));
|
|
36212
|
-
}
|
|
36213
|
-
|
|
36214
|
-
class DefaultMathCirclePicker extends PickerBase {
|
|
36215
|
-
constructor(canvasRenderer) {
|
|
36216
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "circle", this.numberType = CIRCLE_NUMBER_TYPE;
|
|
36217
|
-
}
|
|
36218
|
-
}
|
|
36219
|
-
|
|
36220
|
-
let loadCirclePick = !1;
|
|
36221
|
-
function bindCircleMathPickerContribution(container) {
|
|
36222
|
-
loadCirclePick || (loadCirclePick = !0, container.bind(MathCirclePicker).toDynamicValue(() => new DefaultMathCirclePicker(resolveContainerBinding$1(container, CircleRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathCirclePicker));
|
|
36223
|
-
}
|
|
36224
|
-
|
|
36225
|
-
class DefaultMathGlyphPicker extends GlyphPickerBase {
|
|
36226
|
-
constructor(canvasRenderer) {
|
|
36227
|
-
super(), this.canvasRenderer = canvasRenderer;
|
|
36228
|
-
}
|
|
36229
|
-
}
|
|
36230
|
-
|
|
36231
|
-
let loadGlyphPick = !1;
|
|
36232
|
-
function bindGlyphMathPickerContribution(container) {
|
|
36233
|
-
loadGlyphPick || (loadGlyphPick = !0, container.bind(MathGlyphPicker).toDynamicValue(() => new DefaultMathGlyphPicker(resolveContainerBinding$1(container, GlyphRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathGlyphPicker));
|
|
36234
|
-
}
|
|
36235
|
-
|
|
36236
|
-
class DefaultMathImagePicker {
|
|
36237
|
-
constructor() {
|
|
36238
|
-
this.type = "image", this.numberType = IMAGE_NUMBER_TYPE;
|
|
36239
|
-
}
|
|
36240
|
-
contains(image, point, params) {
|
|
36241
|
-
const {
|
|
36242
|
-
pickContext: pickContext
|
|
36243
|
-
} = null != params ? params : {};
|
|
36244
|
-
return !!pickContext && !!image.AABBBounds.containsPoint(point);
|
|
36245
|
-
}
|
|
36246
|
-
}
|
|
36247
|
-
|
|
36248
|
-
let loadImagePick = !1;
|
|
36249
|
-
function bindImageMathPickerContribution(container) {
|
|
36250
|
-
loadImagePick || (loadImagePick = !0, container.bind(MathImagePicker).toDynamicValue(() => new DefaultMathImagePicker()).inSingletonScope(), container.bind(MathPickerContribution).toService(MathImagePicker));
|
|
36251
|
-
}
|
|
36252
|
-
|
|
36253
|
-
class DefaultMathLinePicker extends PickerBase {
|
|
36254
|
-
constructor(canvasRenderer) {
|
|
36255
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "line", this.numberType = LINE_NUMBER_TYPE;
|
|
36472
|
+
type: type
|
|
36473
|
+
} = event;
|
|
36474
|
+
return !!this.eventManager.cache[type] && (event.changedTouches && event.changedTouches[0] && (event.offsetX = event.changedTouches[0].x, event.changedTouches[0].offsetX = event.changedTouches[0].x, event.changedTouches[0].clientX = event.changedTouches[0].x, event.offsetY = event.changedTouches[0].y, event.changedTouches[0].offsetY = event.changedTouches[0].y, event.changedTouches[0].clientY = event.changedTouches[0].y), event.preventDefault = () => {}, event.stopPropagation = () => {}, this.eventManager.cache[type].listener && this.eventManager.cache[type].listener.forEach(f => {
|
|
36475
|
+
f(event);
|
|
36476
|
+
}), !0);
|
|
36256
36477
|
}
|
|
36257
|
-
|
|
36258
|
-
|
|
36259
|
-
let loadLinePick = !1;
|
|
36260
|
-
function bindLineMathPickerContribution(container) {
|
|
36261
|
-
loadLinePick || (loadLinePick = !0, container.bind(MathLinePicker).toDynamicValue(() => new DefaultMathLinePicker(resolveContainerBinding$1(container, LineRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathLinePicker));
|
|
36262
|
-
}
|
|
36263
|
-
|
|
36264
|
-
class DefaultMathPolygonPicker extends PickerBase {
|
|
36265
|
-
constructor(canvasRenderer) {
|
|
36266
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "polygon", this.numberType = POLYGON_NUMBER_TYPE;
|
|
36478
|
+
getStyle() {
|
|
36479
|
+
return {};
|
|
36267
36480
|
}
|
|
36268
|
-
|
|
36269
|
-
|
|
36270
|
-
|
|
36271
|
-
|
|
36272
|
-
|
|
36273
|
-
|
|
36274
|
-
|
|
36275
|
-
|
|
36276
|
-
|
|
36277
|
-
|
|
36481
|
+
setStyle(style) {}
|
|
36482
|
+
getBoundingClientRect() {
|
|
36483
|
+
const wh = this.getWH();
|
|
36484
|
+
return {
|
|
36485
|
+
x: 0,
|
|
36486
|
+
y: 0,
|
|
36487
|
+
width: wh.width,
|
|
36488
|
+
height: wh.height,
|
|
36489
|
+
left: 0,
|
|
36490
|
+
top: 0,
|
|
36491
|
+
right: 0,
|
|
36492
|
+
bottom: 0
|
|
36493
|
+
};
|
|
36278
36494
|
}
|
|
36279
|
-
|
|
36280
|
-
|
|
36281
|
-
|
|
36282
|
-
|
|
36283
|
-
|
|
36284
|
-
}
|
|
36285
|
-
|
|
36286
|
-
class DefaultMathRectPicker extends RectPickerBase {
|
|
36287
|
-
constructor(canvasRenderer) {
|
|
36288
|
-
super(), this.canvasRenderer = canvasRenderer;
|
|
36495
|
+
clearViewBox(color) {
|
|
36496
|
+
const vb = this.viewBox,
|
|
36497
|
+
context = this.getContext(),
|
|
36498
|
+
dpr = this.getDpr();
|
|
36499
|
+
context.nativeContext.save(), context.nativeContext.setTransform(dpr, 0, 0, dpr, 0, 0), context.clearRect(vb.x1, vb.y1, vb.x2 - vb.x1, vb.y2 - vb.y1), color && (context.fillStyle = color, context.fillRect(vb.x1, vb.y1, vb.x2 - vb.x1, vb.y2 - vb.y1)), context.nativeContext.restore();
|
|
36289
36500
|
}
|
|
36290
36501
|
}
|
|
36291
|
-
|
|
36292
|
-
|
|
36293
|
-
|
|
36294
|
-
|
|
36502
|
+
FeishuWindowHandlerContribution.env = "feishu";
|
|
36503
|
+
function bindFeishuWindowContribution(container) {
|
|
36504
|
+
var _a, _b;
|
|
36505
|
+
(null === (_a = container.isBound) || void 0 === _a ? void 0 : _a.call(container, FeishuWindowHandlerContribution)) || container.bind(FeishuWindowHandlerContribution).toSelf(), (null === (_b = container.getNamed) || void 0 === _b ? void 0 : _b.call(container, WindowHandlerContribution, FeishuWindowHandlerContribution.env)) || container.bind(WindowHandlerContribution).toService(FeishuWindowHandlerContribution).whenTargetNamed(FeishuWindowHandlerContribution.env);
|
|
36295
36506
|
}
|
|
36296
36507
|
|
|
36297
|
-
class
|
|
36298
|
-
constructor(
|
|
36299
|
-
this.
|
|
36508
|
+
class DefaultMathPickerService extends DefaultPickService {
|
|
36509
|
+
constructor(contributions, pickItemInterceptorContributions, pickServiceInterceptorContributions) {
|
|
36510
|
+
super(pickItemInterceptorContributions, pickServiceInterceptorContributions), this.contributions = contributions, this.pickItemInterceptorContributions = pickItemInterceptorContributions, this.pickServiceInterceptorContributions = pickServiceInterceptorContributions, this.global.hooks.onSetEnv.tap("math-picker-service", (lastEnv, env, global) => {
|
|
36511
|
+
this.configure(global, env);
|
|
36512
|
+
}), this.configure(this.global, this.global.env), this.pickerMap = new Map(), this.init();
|
|
36300
36513
|
}
|
|
36301
|
-
|
|
36302
|
-
|
|
36514
|
+
init() {
|
|
36515
|
+
this.contributions.getContributions().forEach(item => {
|
|
36516
|
+
this.pickerMap.set(item.numberType, item);
|
|
36517
|
+
}), super._init();
|
|
36303
36518
|
}
|
|
36304
|
-
|
|
36305
|
-
|
|
36306
|
-
|
|
36307
|
-
|
|
36308
|
-
|
|
36309
|
-
|
|
36310
|
-
|
|
36311
|
-
|
|
36312
|
-
|
|
36313
|
-
|
|
36519
|
+
configure(global, env) {
|
|
36520
|
+
this.pickContext = new EmptyContext2d(null, 1);
|
|
36521
|
+
}
|
|
36522
|
+
pickItem(graphic, point, parentMatrix, params) {
|
|
36523
|
+
if (!1 === graphic.attribute.pickable) return null;
|
|
36524
|
+
const picker = this.pickerMap.get(graphic.numberType);
|
|
36525
|
+
if (!picker) return null;
|
|
36526
|
+
const pd = picker.contains(graphic, point, params),
|
|
36527
|
+
g = pd ? graphic : null;
|
|
36528
|
+
return g ? {
|
|
36529
|
+
graphic: g,
|
|
36530
|
+
params: pd
|
|
36531
|
+
} : null;
|
|
36314
36532
|
}
|
|
36315
36533
|
}
|
|
36316
36534
|
|
|
36317
|
-
let
|
|
36318
|
-
function
|
|
36319
|
-
|
|
36535
|
+
let loaded = !1;
|
|
36536
|
+
function bindMathPickerContribution(c) {
|
|
36537
|
+
loaded || (loaded = !0, bindContributionProvider(c.bind.bind(c), MathPickerContribution));
|
|
36320
36538
|
}
|
|
36321
36539
|
|
|
36322
|
-
class
|
|
36323
|
-
constructor() {
|
|
36324
|
-
this.type = "
|
|
36325
|
-
}
|
|
36326
|
-
contains(text, point, params) {
|
|
36327
|
-
return !!text.AABBBounds.containsPoint(point);
|
|
36540
|
+
class DefaultMathCirclePicker extends PickerBase {
|
|
36541
|
+
constructor(canvasRenderer) {
|
|
36542
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "circle", this.numberType = CIRCLE_NUMBER_TYPE;
|
|
36328
36543
|
}
|
|
36329
36544
|
}
|
|
36330
36545
|
|
|
36331
|
-
let
|
|
36332
|
-
function
|
|
36333
|
-
|
|
36546
|
+
let loadCirclePick = !1;
|
|
36547
|
+
function bindCircleMathPickerContribution(container) {
|
|
36548
|
+
loadCirclePick || (loadCirclePick = !0, container.bind(MathCirclePicker).toDynamicValue(() => new DefaultMathCirclePicker(resolveContainerBinding$1(container, CircleRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathCirclePicker));
|
|
36334
36549
|
}
|
|
36335
36550
|
|
|
36336
36551
|
function bindMathPicker(c) {
|
|
@@ -39149,30 +39364,6 @@
|
|
|
39149
39364
|
installNodePickersToApp(app);
|
|
39150
39365
|
}
|
|
39151
39366
|
|
|
39152
|
-
const browser = isBrowserEnv();
|
|
39153
|
-
|
|
39154
|
-
function _registerArc() {
|
|
39155
|
-
if (_registerArc.__loaded) return;
|
|
39156
|
-
_registerArc.__loaded = !0;
|
|
39157
|
-
const legacyContext = getLegacyBindingContext();
|
|
39158
|
-
registerArcGraphic(), arcModule({
|
|
39159
|
-
bind: legacyContext.bind
|
|
39160
|
-
}), browser ? bindArcCanvasPickerContribution(legacyContext) : bindArcMathPickerContribution(legacyContext);
|
|
39161
|
-
}
|
|
39162
|
-
_registerArc.__loaded = !1;
|
|
39163
|
-
const registerArc = _registerArc;
|
|
39164
|
-
|
|
39165
|
-
function _registerArea() {
|
|
39166
|
-
if (_registerArea.__loaded) return;
|
|
39167
|
-
_registerArea.__loaded = !0;
|
|
39168
|
-
const legacyContext = getLegacyBindingContext();
|
|
39169
|
-
registerAreaGraphic(), areaModule({
|
|
39170
|
-
bind: legacyContext.bind
|
|
39171
|
-
}), browser ? bindAreaCanvasPickerContribution(legacyContext) : bindAreaMathPickerContribution(legacyContext);
|
|
39172
|
-
}
|
|
39173
|
-
_registerArea.__loaded = !1;
|
|
39174
|
-
const registerArea = _registerArea;
|
|
39175
|
-
|
|
39176
39367
|
function _registerCircle() {
|
|
39177
39368
|
if (_registerCircle.__loaded) return;
|
|
39178
39369
|
_registerCircle.__loaded = !0;
|
|
@@ -39184,95 +39375,6 @@
|
|
|
39184
39375
|
_registerCircle.__loaded = !1;
|
|
39185
39376
|
const registerCircle = _registerCircle;
|
|
39186
39377
|
|
|
39187
|
-
function _registerGlyph() {
|
|
39188
|
-
if (_registerGlyph.__loaded) return;
|
|
39189
|
-
_registerGlyph.__loaded = !0;
|
|
39190
|
-
const legacyContext = getLegacyBindingContext();
|
|
39191
|
-
registerGlyphGraphic(), glyphModule({
|
|
39192
|
-
bind: legacyContext.bind
|
|
39193
|
-
}), browser ? bindGlyphCanvasPickerContribution(legacyContext) : bindGlyphMathPickerContribution(legacyContext);
|
|
39194
|
-
}
|
|
39195
|
-
_registerGlyph.__loaded = !1;
|
|
39196
|
-
const registerGlyph = _registerGlyph;
|
|
39197
|
-
|
|
39198
|
-
function _registerGroup() {
|
|
39199
|
-
_registerGroup.__loaded || (_registerGroup.__loaded = !0, registerGroupGraphic());
|
|
39200
|
-
}
|
|
39201
|
-
_registerGroup.__loaded = !1;
|
|
39202
|
-
const registerGroup = _registerGroup;
|
|
39203
|
-
|
|
39204
|
-
function _registerImage() {
|
|
39205
|
-
if (_registerImage.__loaded) return;
|
|
39206
|
-
_registerImage.__loaded = !0;
|
|
39207
|
-
const legacyContext = getLegacyBindingContext();
|
|
39208
|
-
registerImageGraphic(), imageModule({
|
|
39209
|
-
bind: legacyContext.bind
|
|
39210
|
-
}), browser ? bindImageCanvasPickerContribution(legacyContext) : bindImageMathPickerContribution(legacyContext);
|
|
39211
|
-
}
|
|
39212
|
-
_registerImage.__loaded = !1;
|
|
39213
|
-
const registerImage = _registerImage;
|
|
39214
|
-
|
|
39215
|
-
function _registerLine() {
|
|
39216
|
-
if (_registerLine.__loaded) return;
|
|
39217
|
-
_registerLine.__loaded = !0;
|
|
39218
|
-
const legacyContext = getLegacyBindingContext();
|
|
39219
|
-
registerLineGraphic(), lineModule({
|
|
39220
|
-
bind: legacyContext.bind
|
|
39221
|
-
}), browser ? bindLineCanvasPickerContribution(legacyContext) : bindLineMathPickerContribution(legacyContext);
|
|
39222
|
-
}
|
|
39223
|
-
_registerLine.__loaded = !1;
|
|
39224
|
-
const registerLine = _registerLine;
|
|
39225
|
-
|
|
39226
|
-
function _registerPath() {
|
|
39227
|
-
if (_registerPath.__loaded) return;
|
|
39228
|
-
_registerPath.__loaded = !0;
|
|
39229
|
-
const legacyContext = getLegacyBindingContext();
|
|
39230
|
-
registerPathGraphic(), pathModule({
|
|
39231
|
-
bind: legacyContext.bind
|
|
39232
|
-
}), browser ? bindPathCanvasPickerContribution(legacyContext) : bindPathMathPickerContribution(legacyContext);
|
|
39233
|
-
}
|
|
39234
|
-
_registerPath.__loaded = !1;
|
|
39235
|
-
const registerPath = _registerPath;
|
|
39236
|
-
|
|
39237
|
-
function _registerPolygon() {
|
|
39238
|
-
if (_registerPolygon.__loaded) return;
|
|
39239
|
-
_registerPolygon.__loaded = !0;
|
|
39240
|
-
const legacyContext = getLegacyBindingContext();
|
|
39241
|
-
registerPolygonGraphic(), polygonModule({
|
|
39242
|
-
bind: legacyContext.bind
|
|
39243
|
-
}), browser ? bindPolygonCanvasPickerContribution(legacyContext) : bindPolygonMathPickerContribution(legacyContext);
|
|
39244
|
-
}
|
|
39245
|
-
_registerPolygon.__loaded = !1;
|
|
39246
|
-
const registerPolygon = _registerPolygon;
|
|
39247
|
-
|
|
39248
|
-
function _registerRect() {
|
|
39249
|
-
if (_registerRect.__loaded) return;
|
|
39250
|
-
_registerRect.__loaded = !0;
|
|
39251
|
-
const legacyContext = getLegacyBindingContext();
|
|
39252
|
-
registerRectGraphic(), rectModule({
|
|
39253
|
-
bind: legacyContext.bind
|
|
39254
|
-
}), browser ? bindRectCanvasPickerContribution(legacyContext) : bindRectMathPickerContribution(legacyContext);
|
|
39255
|
-
}
|
|
39256
|
-
_registerRect.__loaded = !1;
|
|
39257
|
-
const registerRect = _registerRect;
|
|
39258
|
-
|
|
39259
|
-
function _registerRichtext() {
|
|
39260
|
-
if (_registerRichtext.__loaded) return;
|
|
39261
|
-
_registerRichtext.__loaded = !0;
|
|
39262
|
-
const legacyContext = getLegacyBindingContext();
|
|
39263
|
-
registerRichtextGraphic(), richtextModule({
|
|
39264
|
-
bind: legacyContext.bind
|
|
39265
|
-
}), browser ? bindRichtextCanvasPickerContribution(legacyContext) : bindRichTextMathPickerContribution(legacyContext);
|
|
39266
|
-
}
|
|
39267
|
-
_registerRichtext.__loaded = !1;
|
|
39268
|
-
const registerRichtext = _registerRichtext;
|
|
39269
|
-
|
|
39270
|
-
function _registerShadowRoot() {
|
|
39271
|
-
_registerShadowRoot.__loaded || (_registerShadowRoot.__loaded = !0, registerShadowRootGraphic());
|
|
39272
|
-
}
|
|
39273
|
-
_registerShadowRoot.__loaded = !1;
|
|
39274
|
-
const registerShadowRoot = _registerShadowRoot;
|
|
39275
|
-
|
|
39276
39378
|
function _registerStar() {
|
|
39277
39379
|
if (_registerStar.__loaded) return;
|
|
39278
39380
|
_registerStar.__loaded = !0;
|
|
@@ -39284,28 +39386,6 @@
|
|
|
39284
39386
|
_registerStar.__loaded = !1;
|
|
39285
39387
|
const registerStar = _registerStar;
|
|
39286
39388
|
|
|
39287
|
-
function _registerSymbol() {
|
|
39288
|
-
if (_registerSymbol.__loaded) return;
|
|
39289
|
-
_registerSymbol.__loaded = !0;
|
|
39290
|
-
const legacyContext = getLegacyBindingContext();
|
|
39291
|
-
registerSymbolGraphic(), symbolModule({
|
|
39292
|
-
bind: legacyContext.bind
|
|
39293
|
-
}), browser ? bindSymbolCanvasPickerContribution(legacyContext) : bindSymbolMathPickerContribution(legacyContext);
|
|
39294
|
-
}
|
|
39295
|
-
_registerSymbol.__loaded = !1;
|
|
39296
|
-
const registerSymbol = _registerSymbol;
|
|
39297
|
-
|
|
39298
|
-
function _registerText() {
|
|
39299
|
-
if (_registerText.__loaded) return;
|
|
39300
|
-
_registerText.__loaded = !0;
|
|
39301
|
-
const legacyContext = getLegacyBindingContext();
|
|
39302
|
-
registerTextGraphic(), textModule({
|
|
39303
|
-
bind: legacyContext.bind
|
|
39304
|
-
}), browser ? bindTextCanvasPickerContribution(legacyContext) : bindTextMathPickerContribution(legacyContext);
|
|
39305
|
-
}
|
|
39306
|
-
_registerText.__loaded = !1;
|
|
39307
|
-
const registerText = _registerText;
|
|
39308
|
-
|
|
39309
39389
|
function _registerWrapText() {
|
|
39310
39390
|
_registerWrapText.__loaded || (_registerWrapText.__loaded = !0, registerWrapTextGraphic());
|
|
39311
39391
|
}
|