@visactor/vchart 2.1.3-alpha.3 → 2.1.3-alpha.5
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/es5/index.js +1 -1
- package/build/index.es.js +16 -16
- package/build/index.js +973 -890
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/constant/marker.js +2 -1
- package/cjs/constant/scatter.js +1 -2
- package/cjs/core/expression-function.js +1 -1
- package/cjs/data/data-view-utils.js +1 -1
- package/cjs/index.d.ts +1 -7
- package/cjs/index.js +31 -55
- package/cjs/index.js.map +1 -1
- package/cjs/mark/arc.js +2 -2
- package/cjs/mark/arc.js.map +1 -1
- package/cjs/mark/area.js +3 -3
- package/cjs/mark/area.js.map +1 -1
- package/cjs/mark/box-plot.js +2 -2
- package/cjs/mark/box-plot.js.map +1 -1
- package/cjs/mark/cell.js +2 -2
- package/cjs/mark/cell.js.map +1 -1
- package/cjs/mark/glyph.js +2 -2
- package/cjs/mark/glyph.js.map +1 -1
- package/cjs/mark/group.js +2 -2
- package/cjs/mark/group.js.map +1 -1
- package/cjs/mark/image.js +3 -3
- package/cjs/mark/image.js.map +1 -1
- package/cjs/mark/line.js +3 -3
- package/cjs/mark/line.js.map +1 -1
- package/cjs/mark/link-path.js +2 -2
- package/cjs/mark/link-path.js.map +1 -1
- package/cjs/mark/liquid.js +2 -2
- package/cjs/mark/liquid.js.map +1 -1
- package/cjs/mark/path.js +3 -3
- package/cjs/mark/path.js.map +1 -1
- package/cjs/mark/polygon/polygon.js +3 -3
- package/cjs/mark/polygon/polygon.js.map +1 -1
- package/cjs/mark/rect.js +2 -2
- package/cjs/mark/rect.js.map +1 -1
- package/cjs/mark/ripple.js +2 -2
- package/cjs/mark/ripple.js.map +1 -1
- package/cjs/mark/rule.js +3 -3
- package/cjs/mark/rule.js.map +1 -1
- package/cjs/mark/symbol.js +3 -3
- package/cjs/mark/symbol.js.map +1 -1
- package/cjs/mark/text.js +3 -3
- package/cjs/mark/text.js.map +1 -1
- package/cjs/series/radar/animation.js +2 -2
- package/cjs/series/radar/animation.js.map +1 -1
- package/cjs/vrender-bridge.d.ts +17 -1
- package/cjs/vrender-bridge.js +146 -3
- package/cjs/vrender-bridge.js.map +1 -1
- package/esm/constant/marker.js +2 -1
- package/esm/constant/scatter.js +1 -2
- package/esm/core/expression-function.js +1 -1
- package/esm/data/data-view-utils.js +1 -1
- package/esm/index.d.ts +1 -7
- package/esm/index.js +1 -13
- package/esm/index.js.map +1 -1
- package/esm/mark/arc.js +1 -5
- package/esm/mark/arc.js.map +1 -1
- package/esm/mark/area.js +1 -5
- package/esm/mark/area.js.map +1 -1
- package/esm/mark/box-plot.js +1 -5
- package/esm/mark/box-plot.js.map +1 -1
- package/esm/mark/cell.js +1 -5
- package/esm/mark/cell.js.map +1 -1
- package/esm/mark/glyph.js +1 -5
- package/esm/mark/glyph.js.map +1 -1
- package/esm/mark/group.js +1 -3
- package/esm/mark/group.js.map +1 -1
- package/esm/mark/image.js +1 -5
- package/esm/mark/image.js.map +1 -1
- package/esm/mark/line.js +1 -5
- package/esm/mark/line.js.map +1 -1
- package/esm/mark/link-path.js +1 -3
- package/esm/mark/link-path.js.map +1 -1
- package/esm/mark/liquid.js +1 -3
- package/esm/mark/liquid.js.map +1 -1
- package/esm/mark/path.js +1 -5
- package/esm/mark/path.js.map +1 -1
- package/esm/mark/polygon/polygon.js +1 -5
- package/esm/mark/polygon/polygon.js.map +1 -1
- package/esm/mark/rect.js +1 -5
- package/esm/mark/rect.js.map +1 -1
- package/esm/mark/ripple.js +1 -3
- package/esm/mark/ripple.js.map +1 -1
- package/esm/mark/rule.js +1 -5
- package/esm/mark/rule.js.map +1 -1
- package/esm/mark/symbol.js +1 -5
- package/esm/mark/symbol.js.map +1 -1
- package/esm/mark/text.js +1 -7
- package/esm/mark/text.js.map +1 -1
- package/esm/series/radar/animation.js +1 -1
- package/esm/series/radar/animation.js.map +1 -1
- package/esm/vrender-bridge.d.ts +17 -1
- package/esm/vrender-bridge.js +27 -1
- package/esm/vrender-bridge.js.map +1 -1
- package/package.json +9 -9
package/build/index.js
CHANGED
|
@@ -11730,7 +11730,17 @@
|
|
|
11730
11730
|
});
|
|
11731
11731
|
|
|
11732
11732
|
class Application {}
|
|
11733
|
-
const
|
|
11733
|
+
const APPLICATION_STATE_SYMBOL = Symbol.for("@visactor/vrender-core/application-state");
|
|
11734
|
+
function createApplicationState() {
|
|
11735
|
+
return {
|
|
11736
|
+
application: new Application()
|
|
11737
|
+
};
|
|
11738
|
+
}
|
|
11739
|
+
function getApplicationState() {
|
|
11740
|
+
const scope = globalThis;
|
|
11741
|
+
return scope[APPLICATION_STATE_SYMBOL] || (scope[APPLICATION_STATE_SYMBOL] = createApplicationState()), scope[APPLICATION_STATE_SYMBOL];
|
|
11742
|
+
}
|
|
11743
|
+
const application = getApplicationState().application;
|
|
11734
11744
|
|
|
11735
11745
|
class ResourceLoader {
|
|
11736
11746
|
static GetImage(url, mark) {
|
|
@@ -14648,12 +14658,12 @@
|
|
|
14648
14658
|
cursor: 1,
|
|
14649
14659
|
html: 1
|
|
14650
14660
|
};
|
|
14651
|
-
class
|
|
14661
|
+
class GraphicImpl extends Node {
|
|
14652
14662
|
static mixin(source) {
|
|
14653
14663
|
const keys = Object.keys(source);
|
|
14654
14664
|
for (let i = 0; i < keys.length; ++i) {
|
|
14655
14665
|
const propertyName = keys[i];
|
|
14656
|
-
Object.defineProperty(
|
|
14666
|
+
Object.defineProperty(this.prototype, propertyName, Object.getOwnPropertyDescriptor(source, propertyName));
|
|
14657
14667
|
}
|
|
14658
14668
|
}
|
|
14659
14669
|
get AABBBounds() {
|
|
@@ -15892,13 +15902,26 @@
|
|
|
15892
15902
|
return null;
|
|
15893
15903
|
}
|
|
15894
15904
|
}
|
|
15905
|
+
GraphicImpl.userSymbolMap = {};
|
|
15906
|
+
const GRAPHIC_CLASS_SYMBOL = Symbol.for("@visactor/vrender-core/graphic-class");
|
|
15907
|
+
function createGraphicClassState() {
|
|
15908
|
+
return {
|
|
15909
|
+
Graphic: GraphicImpl
|
|
15910
|
+
};
|
|
15911
|
+
}
|
|
15912
|
+
function getGraphicClassState() {
|
|
15913
|
+
var _a;
|
|
15914
|
+
const globalScope = globalThis;
|
|
15915
|
+
return null !== (_a = globalScope[GRAPHIC_CLASS_SYMBOL]) && void 0 !== _a || (globalScope[GRAPHIC_CLASS_SYMBOL] = createGraphicClassState()), globalScope[GRAPHIC_CLASS_SYMBOL];
|
|
15916
|
+
}
|
|
15917
|
+
const Graphic = getGraphicClassState().Graphic;
|
|
15895
15918
|
function backgroundNotImage(image) {
|
|
15896
15919
|
return "string" == typeof image ? !(image.startsWith("<svg") || isValidUrl$1(image) || image.includes("/") || isBase64$1(image)) : !(!image.fill && !image.stroke) || !("string" != typeof image.gradient || !Array.isArray(image.stops));
|
|
15897
15920
|
}
|
|
15898
15921
|
function isExternalTexture(texture) {
|
|
15899
15922
|
return !!texture && ("string" == typeof texture ? !builtinTextureTypes.has(texture) && (texture.startsWith("<svg") || isValidUrl$1(texture) || texture.includes("/") || isBase64$1(texture)) : isObject$2(texture));
|
|
15900
15923
|
}
|
|
15901
|
-
Graphic.
|
|
15924
|
+
Graphic.mixin(EventTarget);
|
|
15902
15925
|
|
|
15903
15926
|
const defaultThemeObj = {
|
|
15904
15927
|
arc: DefaultArcAttribute,
|
|
@@ -19046,7 +19069,6 @@
|
|
|
19046
19069
|
}
|
|
19047
19070
|
};
|
|
19048
19071
|
}
|
|
19049
|
-
const sharedGraphicFactory = new GraphicFactory();
|
|
19050
19072
|
class GraphicCreator {
|
|
19051
19073
|
constructor() {
|
|
19052
19074
|
this.store = new Map();
|
|
@@ -19061,13 +19083,25 @@
|
|
|
19061
19083
|
return this.store.has(name) ? createGraphic$1(name, attributes) : null;
|
|
19062
19084
|
}
|
|
19063
19085
|
}
|
|
19064
|
-
const
|
|
19086
|
+
const GRAPHIC_REGISTRY_SYMBOL = Symbol.for("@visactor/vrender-core/graphic-registry");
|
|
19087
|
+
function createGraphicRegistryState() {
|
|
19088
|
+
return {
|
|
19089
|
+
graphicCreator: new GraphicCreator(),
|
|
19090
|
+
graphicFactory: new GraphicFactory()
|
|
19091
|
+
};
|
|
19092
|
+
}
|
|
19093
|
+
function getGraphicRegistryState() {
|
|
19094
|
+
const scope = globalThis;
|
|
19095
|
+
return scope[GRAPHIC_REGISTRY_SYMBOL] || (scope[GRAPHIC_REGISTRY_SYMBOL] = createGraphicRegistryState()), scope[GRAPHIC_REGISTRY_SYMBOL];
|
|
19096
|
+
}
|
|
19097
|
+
const sharedGraphicRegistry = getGraphicRegistryState();
|
|
19098
|
+
const graphicCreator$1 = sharedGraphicRegistry.graphicCreator;
|
|
19065
19099
|
function registerGraphic(name, creator) {
|
|
19066
19100
|
if (!name) throw new Error("Graphic registration requires a non-empty graphic type");
|
|
19067
|
-
graphicCreator$1.registerStore(name, creator),
|
|
19101
|
+
graphicCreator$1.registerStore(name, creator), sharedGraphicRegistry.graphicFactory.register(name, createGraphicCtor(creator));
|
|
19068
19102
|
}
|
|
19069
19103
|
function createGraphic$1(name, attributes) {
|
|
19070
|
-
return
|
|
19104
|
+
return sharedGraphicRegistry.graphicFactory.create(name, attributes);
|
|
19071
19105
|
}
|
|
19072
19106
|
|
|
19073
19107
|
class Hook {
|
|
@@ -19776,6 +19810,17 @@
|
|
|
19776
19810
|
}
|
|
19777
19811
|
}
|
|
19778
19812
|
|
|
19813
|
+
const FACTORY_STATE_SYMBOL = Symbol.for("@visactor/vrender-core/factory-state");
|
|
19814
|
+
function createFactoryState() {
|
|
19815
|
+
return {
|
|
19816
|
+
pluginClasses: {}
|
|
19817
|
+
};
|
|
19818
|
+
}
|
|
19819
|
+
function getFactoryState() {
|
|
19820
|
+
const scope = globalThis;
|
|
19821
|
+
return scope[FACTORY_STATE_SYMBOL] || (scope[FACTORY_STATE_SYMBOL] = createFactoryState()), scope[FACTORY_STATE_SYMBOL];
|
|
19822
|
+
}
|
|
19823
|
+
|
|
19779
19824
|
class DefaultGlobalPickerService {
|
|
19780
19825
|
constructor() {
|
|
19781
19826
|
this.global = application.global, this.global.hooks.onSetEnv.tap("global-picker-service", (lastEnv, env, global) => {
|
|
@@ -21637,7 +21682,7 @@
|
|
|
21637
21682
|
return Factory._pluginClasses[pluginKey];
|
|
21638
21683
|
}
|
|
21639
21684
|
};
|
|
21640
|
-
Factory$1._pluginClasses =
|
|
21685
|
+
Factory$1._pluginClasses = getFactoryState().pluginClasses;
|
|
21641
21686
|
|
|
21642
21687
|
function defaultLayerHandlerFactory(layerMode) {
|
|
21643
21688
|
const handlerFactory = application.layerHandlerFactory;
|
|
@@ -21717,6 +21762,17 @@
|
|
|
21717
21762
|
const DynamicLayerHandlerContribution = Symbol.for("DynamicLayerHandlerContribution");
|
|
21718
21763
|
const VirtualLayerHandlerContribution = Symbol.for("VirtualLayerHandlerContribution");
|
|
21719
21764
|
|
|
21765
|
+
const CONTRIBUTION_STORE_STATE_SYMBOL = Symbol.for("@visactor/vrender-core/contribution-store-state");
|
|
21766
|
+
function createContributionStoreState() {
|
|
21767
|
+
return {
|
|
21768
|
+
store: new Map()
|
|
21769
|
+
};
|
|
21770
|
+
}
|
|
21771
|
+
function getContributionStoreState() {
|
|
21772
|
+
const scope = globalThis;
|
|
21773
|
+
return scope[CONTRIBUTION_STORE_STATE_SYMBOL] || (scope[CONTRIBUTION_STORE_STATE_SYMBOL] = createContributionStoreState()), scope[CONTRIBUTION_STORE_STATE_SYMBOL];
|
|
21774
|
+
}
|
|
21775
|
+
|
|
21720
21776
|
const ContributionProvider = Symbol("ContributionProvider");
|
|
21721
21777
|
class ContributionProviderCache {
|
|
21722
21778
|
constructor(serviceIdentifier, container) {
|
|
@@ -21759,7 +21815,7 @@
|
|
|
21759
21815
|
});
|
|
21760
21816
|
}
|
|
21761
21817
|
}
|
|
21762
|
-
ContributionStore.store =
|
|
21818
|
+
ContributionStore.store = getContributionStoreState().store;
|
|
21763
21819
|
|
|
21764
21820
|
class ATextMeasure {
|
|
21765
21821
|
constructor() {
|
|
@@ -24076,13 +24132,26 @@
|
|
|
24076
24132
|
return new LegacyBindingContext();
|
|
24077
24133
|
}
|
|
24078
24134
|
|
|
24079
|
-
const
|
|
24135
|
+
const LEGACY_BOOTSTRAP_STATE_SYMBOL = Symbol.for("@visactor/vrender-core/legacy-bootstrap-state");
|
|
24136
|
+
function createLegacyBootstrapState() {
|
|
24137
|
+
return {
|
|
24138
|
+
legacyBindingContext: createLegacyBindingContext(),
|
|
24139
|
+
preloaded: !1
|
|
24140
|
+
};
|
|
24141
|
+
}
|
|
24142
|
+
function getLegacyBootstrapState() {
|
|
24143
|
+
const scope = globalThis;
|
|
24144
|
+
return scope[LEGACY_BOOTSTRAP_STATE_SYMBOL] || (scope[LEGACY_BOOTSTRAP_STATE_SYMBOL] = createLegacyBootstrapState()), scope[LEGACY_BOOTSTRAP_STATE_SYMBOL];
|
|
24145
|
+
}
|
|
24146
|
+
|
|
24147
|
+
const legacyBootstrapState = getLegacyBootstrapState(),
|
|
24148
|
+
legacyBindingContext = legacyBootstrapState.legacyBindingContext;
|
|
24080
24149
|
function getLegacyTarget(resolver) {
|
|
24081
24150
|
let target;
|
|
24082
24151
|
return () => (void 0 === target && (target = resolver()), target);
|
|
24083
24152
|
}
|
|
24084
24153
|
function preLoadAllModule() {
|
|
24085
|
-
|
|
24154
|
+
legacyBootstrapState.preloaded || (legacyBootstrapState.preloaded = !0, bindCoreModules({
|
|
24086
24155
|
bind: legacyBindingContext.bind
|
|
24087
24156
|
}), bindGraphicModules({
|
|
24088
24157
|
bind: legacyBindingContext.bind
|
|
@@ -24095,7 +24164,6 @@
|
|
|
24095
24164
|
bind: legacyBindingContext.bind
|
|
24096
24165
|
}), load$1(legacyBindingContext), load(legacyBindingContext));
|
|
24097
24166
|
}
|
|
24098
|
-
preLoadAllModule.__loaded = !1;
|
|
24099
24167
|
function getLegacyBindingContext() {
|
|
24100
24168
|
return legacyBindingContext;
|
|
24101
24169
|
}
|
|
@@ -28357,126 +28425,7 @@
|
|
|
28357
28425
|
}
|
|
28358
28426
|
const textModule = bindTextRenderModule;
|
|
28359
28427
|
|
|
28360
|
-
|
|
28361
|
-
constructor(dir, color, ambient = .8) {
|
|
28362
|
-
this.dir = dir, this.color = color, this.colorRgb = ColorStore.Get(color, ColorType.Color1), this.ambient = ambient;
|
|
28363
|
-
const length = sqrt$3(dir[0] * dir[0] + dir[1] * dir[1] + dir[2] * dir[2]);
|
|
28364
|
-
this.formatedDir = [dir[0] / length, dir[1] / length, dir[2] / length];
|
|
28365
|
-
}
|
|
28366
|
-
computeColor(normal, color) {
|
|
28367
|
-
const lightDir = this.formatedDir,
|
|
28368
|
-
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);
|
|
28369
|
-
let colorArray;
|
|
28370
|
-
colorArray = isString$1(color) ? ColorStore.Get(color, ColorType.Color1) : color;
|
|
28371
|
-
const lightColorArray = this.colorRgb;
|
|
28372
|
-
return `rgb(${lightColorArray[0] * colorArray[0] * brightness}, ${lightColorArray[1] * colorArray[1] * brightness}, ${lightColorArray[2] * colorArray[2] * brightness})`;
|
|
28373
|
-
}
|
|
28374
|
-
}
|
|
28375
|
-
const registerDirectionalLight = () => {
|
|
28376
|
-
Factory$1.registerPlugin("DirectionalLight", DirectionalLight);
|
|
28377
|
-
};
|
|
28378
|
-
|
|
28379
|
-
class OrthoCamera {
|
|
28380
|
-
set params(params) {
|
|
28381
|
-
this._params = Object.assign({}, params), this._projectionMatrixCached = this.forceGetProjectionMatrix(), this._viewMatrixCached = this.forceGetViewMatrix();
|
|
28382
|
-
}
|
|
28383
|
-
get params() {
|
|
28384
|
-
return Object.assign({}, this._params);
|
|
28385
|
-
}
|
|
28386
|
-
constructor(params) {
|
|
28387
|
-
this.params = params;
|
|
28388
|
-
}
|
|
28389
|
-
getViewMatrix() {
|
|
28390
|
-
return this._viewMatrixCached || (this._viewMatrixCached = mat4Allocate.allocate()), this._viewMatrixCached;
|
|
28391
|
-
}
|
|
28392
|
-
forceGetViewMatrix() {
|
|
28393
|
-
this._viewMatrixCached || (this._viewMatrixCached = mat4Allocate.allocate());
|
|
28394
|
-
const {
|
|
28395
|
-
pos: pos,
|
|
28396
|
-
center: center,
|
|
28397
|
-
up: up
|
|
28398
|
-
} = this.params.viewParams;
|
|
28399
|
-
return lookAt(this._viewMatrixCached, pos, center, up), this._vp || (this._vp = mat4Allocate.allocate()), this._vp = multiplyMat4Mat4(this._vp, this.getProjectionMatrix(), this.getViewMatrix()), this._viewMatrixCached;
|
|
28400
|
-
}
|
|
28401
|
-
getProjectionMatrix() {
|
|
28402
|
-
return this._projectionMatrixCached || (this._projectionMatrixCached = mat4Allocate.allocate()), this._projectionMatrixCached;
|
|
28403
|
-
}
|
|
28404
|
-
forceGetProjectionMatrix() {
|
|
28405
|
-
this._projectionMatrixCached || (this._projectionMatrixCached = mat4Allocate.allocate());
|
|
28406
|
-
const {
|
|
28407
|
-
left: left,
|
|
28408
|
-
top: top,
|
|
28409
|
-
right: right,
|
|
28410
|
-
bottom: bottom
|
|
28411
|
-
} = this._params;
|
|
28412
|
-
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;
|
|
28413
|
-
}
|
|
28414
|
-
getField() {
|
|
28415
|
-
const {
|
|
28416
|
-
fieldRatio = .8,
|
|
28417
|
-
fieldDepth: fieldDepth,
|
|
28418
|
-
left: left,
|
|
28419
|
-
right: right
|
|
28420
|
-
} = this._params;
|
|
28421
|
-
return (null != fieldDepth ? fieldDepth : right - left) * fieldRatio;
|
|
28422
|
-
}
|
|
28423
|
-
getProjectionScale(z) {
|
|
28424
|
-
const field = this.getField();
|
|
28425
|
-
return field / (field + z);
|
|
28426
|
-
}
|
|
28427
|
-
view(x, y, z) {
|
|
28428
|
-
const outP = [0, 0, 0];
|
|
28429
|
-
return transformMat4(outP, [x, y, z], this._viewMatrixCached), outP;
|
|
28430
|
-
}
|
|
28431
|
-
vp(x, y, z) {
|
|
28432
|
-
const outP = [0, 0, 0],
|
|
28433
|
-
{
|
|
28434
|
-
pos: pos
|
|
28435
|
-
} = this._params.viewParams;
|
|
28436
|
-
transformMat4(outP, [x, y, z], this._viewMatrixCached), x = outP[0], y = outP[1], z = outP[2];
|
|
28437
|
-
const sizeProjection = this.getProjectionScale(z);
|
|
28438
|
-
return {
|
|
28439
|
-
x: x * sizeProjection + pos[0],
|
|
28440
|
-
y: y * sizeProjection + pos[1]
|
|
28441
|
-
};
|
|
28442
|
-
}
|
|
28443
|
-
}
|
|
28444
|
-
const registerOrthoCamera = () => {
|
|
28445
|
-
Factory$1.registerPlugin("OrthoCamera", OrthoCamera);
|
|
28446
|
-
};
|
|
28447
|
-
|
|
28448
|
-
class ViewTransform3dPlugin {
|
|
28449
|
-
constructor() {
|
|
28450
|
-
this.name = "ViewTransform3dPlugin", this.activeEvent = "onRegister", this._uid = Generator.GenAutoIncrementId(), this.key = this.name + this._uid, this.onMouseDown = e => {
|
|
28451
|
-
this.option3d || (this.option3d = this.pluginService.stage.option3d), this.option3d && (this.mousedown = !0, this.pageX = e.page.x, this.pageY = e.page.y);
|
|
28452
|
-
}, this.onMouseUp = e => {
|
|
28453
|
-
this.option3d || (this.option3d = this.pluginService.stage.option3d), this.option3d && (this.mousedown = !1);
|
|
28454
|
-
}, this.onMouseMove = e => {
|
|
28455
|
-
var _a, _b;
|
|
28456
|
-
const stage = this.pluginService.stage;
|
|
28457
|
-
if (this.option3d || (this.option3d = stage.option3d), this.option3d && this.mousedown) if (this.pageX && this.pageY) {
|
|
28458
|
-
const deltaX = e.page.x - this.pageX,
|
|
28459
|
-
deltaY = e.page.y - this.pageY;
|
|
28460
|
-
this.pageX = e.page.x, this.pageY = e.page.y;
|
|
28461
|
-
const angle1 = deltaX / 100,
|
|
28462
|
-
angle2 = deltaY / 100;
|
|
28463
|
-
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();
|
|
28464
|
-
} else this.pageX = e.page.x, this.pageY = e.page.y;
|
|
28465
|
-
};
|
|
28466
|
-
}
|
|
28467
|
-
activate(context) {
|
|
28468
|
-
this.pluginService = context;
|
|
28469
|
-
const stage = context.stage;
|
|
28470
|
-
this.option3d = stage.option3d, stage.addEventListener("mousedown", this.onMouseDown), stage.addEventListener("mouseup", this.onMouseUp), stage.addEventListener("mousemove", this.onMouseMove);
|
|
28471
|
-
}
|
|
28472
|
-
deactivate(context) {
|
|
28473
|
-
const stage = context.stage;
|
|
28474
|
-
stage.removeEventListener("mousedown", this.onMouseDown), stage.removeEventListener("mouseup", this.onMouseUp), stage.removeEventListener("mousemove", this.onMouseMove);
|
|
28475
|
-
}
|
|
28476
|
-
}
|
|
28477
|
-
const registerViewTransform3dPlugin = () => {
|
|
28478
|
-
Factory$1.registerPlugin("ViewTransform3dPlugin", ViewTransform3dPlugin);
|
|
28479
|
-
};
|
|
28428
|
+
const browser = isBrowserEnv();
|
|
28480
28429
|
|
|
28481
28430
|
function resolveContainerBinding(container, serviceIdentifier) {
|
|
28482
28431
|
const [instance] = container.getAll(serviceIdentifier);
|
|
@@ -28684,6 +28633,94 @@
|
|
|
28684
28633
|
}
|
|
28685
28634
|
}
|
|
28686
28635
|
|
|
28636
|
+
class DirectionalLight {
|
|
28637
|
+
constructor(dir, color, ambient = .8) {
|
|
28638
|
+
this.dir = dir, this.color = color, this.colorRgb = ColorStore.Get(color, ColorType.Color1), this.ambient = ambient;
|
|
28639
|
+
const length = sqrt$3(dir[0] * dir[0] + dir[1] * dir[1] + dir[2] * dir[2]);
|
|
28640
|
+
this.formatedDir = [dir[0] / length, dir[1] / length, dir[2] / length];
|
|
28641
|
+
}
|
|
28642
|
+
computeColor(normal, color) {
|
|
28643
|
+
const lightDir = this.formatedDir,
|
|
28644
|
+
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);
|
|
28645
|
+
let colorArray;
|
|
28646
|
+
colorArray = isString$1(color) ? ColorStore.Get(color, ColorType.Color1) : color;
|
|
28647
|
+
const lightColorArray = this.colorRgb;
|
|
28648
|
+
return `rgb(${lightColorArray[0] * colorArray[0] * brightness}, ${lightColorArray[1] * colorArray[1] * brightness}, ${lightColorArray[2] * colorArray[2] * brightness})`;
|
|
28649
|
+
}
|
|
28650
|
+
}
|
|
28651
|
+
const registerDirectionalLight = () => {
|
|
28652
|
+
Factory$1.registerPlugin("DirectionalLight", DirectionalLight);
|
|
28653
|
+
};
|
|
28654
|
+
|
|
28655
|
+
class OrthoCamera {
|
|
28656
|
+
set params(params) {
|
|
28657
|
+
this._params = Object.assign({}, params), this._projectionMatrixCached = this.forceGetProjectionMatrix(), this._viewMatrixCached = this.forceGetViewMatrix();
|
|
28658
|
+
}
|
|
28659
|
+
get params() {
|
|
28660
|
+
return Object.assign({}, this._params);
|
|
28661
|
+
}
|
|
28662
|
+
constructor(params) {
|
|
28663
|
+
this.params = params;
|
|
28664
|
+
}
|
|
28665
|
+
getViewMatrix() {
|
|
28666
|
+
return this._viewMatrixCached || (this._viewMatrixCached = mat4Allocate.allocate()), this._viewMatrixCached;
|
|
28667
|
+
}
|
|
28668
|
+
forceGetViewMatrix() {
|
|
28669
|
+
this._viewMatrixCached || (this._viewMatrixCached = mat4Allocate.allocate());
|
|
28670
|
+
const {
|
|
28671
|
+
pos: pos,
|
|
28672
|
+
center: center,
|
|
28673
|
+
up: up
|
|
28674
|
+
} = this.params.viewParams;
|
|
28675
|
+
return lookAt(this._viewMatrixCached, pos, center, up), this._vp || (this._vp = mat4Allocate.allocate()), this._vp = multiplyMat4Mat4(this._vp, this.getProjectionMatrix(), this.getViewMatrix()), this._viewMatrixCached;
|
|
28676
|
+
}
|
|
28677
|
+
getProjectionMatrix() {
|
|
28678
|
+
return this._projectionMatrixCached || (this._projectionMatrixCached = mat4Allocate.allocate()), this._projectionMatrixCached;
|
|
28679
|
+
}
|
|
28680
|
+
forceGetProjectionMatrix() {
|
|
28681
|
+
this._projectionMatrixCached || (this._projectionMatrixCached = mat4Allocate.allocate());
|
|
28682
|
+
const {
|
|
28683
|
+
left: left,
|
|
28684
|
+
top: top,
|
|
28685
|
+
right: right,
|
|
28686
|
+
bottom: bottom
|
|
28687
|
+
} = this._params;
|
|
28688
|
+
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;
|
|
28689
|
+
}
|
|
28690
|
+
getField() {
|
|
28691
|
+
const {
|
|
28692
|
+
fieldRatio = .8,
|
|
28693
|
+
fieldDepth: fieldDepth,
|
|
28694
|
+
left: left,
|
|
28695
|
+
right: right
|
|
28696
|
+
} = this._params;
|
|
28697
|
+
return (null != fieldDepth ? fieldDepth : right - left) * fieldRatio;
|
|
28698
|
+
}
|
|
28699
|
+
getProjectionScale(z) {
|
|
28700
|
+
const field = this.getField();
|
|
28701
|
+
return field / (field + z);
|
|
28702
|
+
}
|
|
28703
|
+
view(x, y, z) {
|
|
28704
|
+
const outP = [0, 0, 0];
|
|
28705
|
+
return transformMat4(outP, [x, y, z], this._viewMatrixCached), outP;
|
|
28706
|
+
}
|
|
28707
|
+
vp(x, y, z) {
|
|
28708
|
+
const outP = [0, 0, 0],
|
|
28709
|
+
{
|
|
28710
|
+
pos: pos
|
|
28711
|
+
} = this._params.viewParams;
|
|
28712
|
+
transformMat4(outP, [x, y, z], this._viewMatrixCached), x = outP[0], y = outP[1], z = outP[2];
|
|
28713
|
+
const sizeProjection = this.getProjectionScale(z);
|
|
28714
|
+
return {
|
|
28715
|
+
x: x * sizeProjection + pos[0],
|
|
28716
|
+
y: y * sizeProjection + pos[1]
|
|
28717
|
+
};
|
|
28718
|
+
}
|
|
28719
|
+
}
|
|
28720
|
+
const registerOrthoCamera = () => {
|
|
28721
|
+
Factory$1.registerPlugin("OrthoCamera", OrthoCamera);
|
|
28722
|
+
};
|
|
28723
|
+
|
|
28687
28724
|
const EMPTY_PICK_ITEM_INTERCEPTOR_PROVIDER = {
|
|
28688
28725
|
getContributions: () => []
|
|
28689
28726
|
},
|
|
@@ -28986,18 +29023,32 @@
|
|
|
28986
29023
|
}
|
|
28987
29024
|
}
|
|
28988
29025
|
|
|
28989
|
-
const
|
|
28990
|
-
|
|
28991
|
-
|
|
28992
|
-
|
|
29026
|
+
const RUNTIME_INSTALLER_STATE_SYMBOL = Symbol.for("@visactor/vrender-core/runtime-installer-state");
|
|
29027
|
+
function createRuntimeInstallerState() {
|
|
29028
|
+
return {
|
|
29029
|
+
runtimeInstallerContext: createLegacyBindingContext(),
|
|
29030
|
+
preloaded: !1,
|
|
29031
|
+
runtimeEntryKeys: new WeakMap(),
|
|
29032
|
+
runtimeDrawContributions: new WeakMap(),
|
|
29033
|
+
loadedRuntimeContributionModules: new WeakMap()
|
|
29034
|
+
};
|
|
29035
|
+
}
|
|
29036
|
+
function getRuntimeInstallerState() {
|
|
29037
|
+
const scope = globalThis;
|
|
29038
|
+
return scope[RUNTIME_INSTALLER_STATE_SYMBOL] || (scope[RUNTIME_INSTALLER_STATE_SYMBOL] = createRuntimeInstallerState()), scope[RUNTIME_INSTALLER_STATE_SYMBOL];
|
|
29039
|
+
}
|
|
29040
|
+
|
|
29041
|
+
const runtimeInstallerState = getRuntimeInstallerState(),
|
|
29042
|
+
runtimeInstallerContext = runtimeInstallerState.runtimeInstallerContext,
|
|
29043
|
+
RUNTIME_RENDERER_NAMESPACE = "vrender:runtime-renderer",
|
|
28993
29044
|
RUNTIME_PICKER_NAMESPACE = "vrender:runtime-picker",
|
|
28994
|
-
runtimeEntryKeys =
|
|
28995
|
-
runtimeDrawContributions =
|
|
28996
|
-
loadedRuntimeContributionModules =
|
|
29045
|
+
runtimeEntryKeys = runtimeInstallerState.runtimeEntryKeys,
|
|
29046
|
+
runtimeDrawContributions = runtimeInstallerState.runtimeDrawContributions,
|
|
29047
|
+
loadedRuntimeContributionModules = runtimeInstallerState.loadedRuntimeContributionModules,
|
|
28997
29048
|
DEFAULT_RUNTIME_CONTRIBUTION_TARGETS = ["graphic-renderer"],
|
|
28998
29049
|
noopUnbindRuntimeContributionService = () => {};
|
|
28999
29050
|
function ensureRuntimeInstallerPreloaded() {
|
|
29000
|
-
|
|
29051
|
+
runtimeInstallerState.preloaded || (runtimeInstallerState.preloaded = !0, bindCoreModules({
|
|
29001
29052
|
bind: runtimeInstallerContext.bind
|
|
29002
29053
|
}), bindGraphicModules({
|
|
29003
29054
|
bind: runtimeInstallerContext.bind
|
|
@@ -29042,7 +29093,8 @@
|
|
|
29042
29093
|
ContributionStore.refreshAllContributions();
|
|
29043
29094
|
}
|
|
29044
29095
|
function getRuntimeInstallerGlobal() {
|
|
29045
|
-
|
|
29096
|
+
var _a;
|
|
29097
|
+
return ensureRuntimeInstallerPreloaded(), null !== (_a = runtimeInstallerState.runtimeGlobal) && void 0 !== _a || (runtimeInstallerState.runtimeGlobal = new DefaultGlobal(createContributionProvider$1(EnvContribution, runtimeInstallerContext))), runtimeInstallerState.runtimeGlobal;
|
|
29046
29098
|
}
|
|
29047
29099
|
function configureRuntimeApplicationForApp(app) {
|
|
29048
29100
|
const bindingContext = getRuntimeInstallerBindingContext(),
|
|
@@ -29649,19 +29701,52 @@
|
|
|
29649
29701
|
return res;
|
|
29650
29702
|
};
|
|
29651
29703
|
|
|
29652
|
-
|
|
29653
|
-
class FlexLayoutPlugin {
|
|
29704
|
+
class ViewTransform3dPlugin {
|
|
29654
29705
|
constructor() {
|
|
29655
|
-
this.name = "
|
|
29656
|
-
|
|
29657
|
-
|
|
29658
|
-
|
|
29659
|
-
|
|
29660
|
-
|
|
29661
|
-
|
|
29662
|
-
|
|
29663
|
-
|
|
29664
|
-
|
|
29706
|
+
this.name = "ViewTransform3dPlugin", this.activeEvent = "onRegister", this._uid = Generator.GenAutoIncrementId(), this.key = this.name + this._uid, this.onMouseDown = e => {
|
|
29707
|
+
this.option3d || (this.option3d = this.pluginService.stage.option3d), this.option3d && (this.mousedown = !0, this.pageX = e.page.x, this.pageY = e.page.y);
|
|
29708
|
+
}, this.onMouseUp = e => {
|
|
29709
|
+
this.option3d || (this.option3d = this.pluginService.stage.option3d), this.option3d && (this.mousedown = !1);
|
|
29710
|
+
}, this.onMouseMove = e => {
|
|
29711
|
+
var _a, _b;
|
|
29712
|
+
const stage = this.pluginService.stage;
|
|
29713
|
+
if (this.option3d || (this.option3d = stage.option3d), this.option3d && this.mousedown) if (this.pageX && this.pageY) {
|
|
29714
|
+
const deltaX = e.page.x - this.pageX,
|
|
29715
|
+
deltaY = e.page.y - this.pageY;
|
|
29716
|
+
this.pageX = e.page.x, this.pageY = e.page.y;
|
|
29717
|
+
const angle1 = deltaX / 100,
|
|
29718
|
+
angle2 = deltaY / 100;
|
|
29719
|
+
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();
|
|
29720
|
+
} else this.pageX = e.page.x, this.pageY = e.page.y;
|
|
29721
|
+
};
|
|
29722
|
+
}
|
|
29723
|
+
activate(context) {
|
|
29724
|
+
this.pluginService = context;
|
|
29725
|
+
const stage = context.stage;
|
|
29726
|
+
this.option3d = stage.option3d, stage.addEventListener("mousedown", this.onMouseDown), stage.addEventListener("mouseup", this.onMouseUp), stage.addEventListener("mousemove", this.onMouseMove);
|
|
29727
|
+
}
|
|
29728
|
+
deactivate(context) {
|
|
29729
|
+
const stage = context.stage;
|
|
29730
|
+
stage.removeEventListener("mousedown", this.onMouseDown), stage.removeEventListener("mouseup", this.onMouseUp), stage.removeEventListener("mousemove", this.onMouseMove);
|
|
29731
|
+
}
|
|
29732
|
+
}
|
|
29733
|
+
const registerViewTransform3dPlugin = () => {
|
|
29734
|
+
Factory$1.registerPlugin("ViewTransform3dPlugin", ViewTransform3dPlugin);
|
|
29735
|
+
};
|
|
29736
|
+
|
|
29737
|
+
const _tempBounds = new AABBBounds();
|
|
29738
|
+
class FlexLayoutPlugin {
|
|
29739
|
+
constructor() {
|
|
29740
|
+
this.name = "FlexLayoutPlugin", this.activeEvent = "onRegister", this.id = Generator.GenAutoIncrementId(), this.key = this.name + this.id, this.tempBounds = new AABBBounds();
|
|
29741
|
+
}
|
|
29742
|
+
pauseLayout(p) {
|
|
29743
|
+
this.pause = p;
|
|
29744
|
+
}
|
|
29745
|
+
tryLayoutChildren(graphic) {
|
|
29746
|
+
graphic.firstChild && this.tryLayout(graphic.firstChild);
|
|
29747
|
+
}
|
|
29748
|
+
tryLayout(graphic, force = !0) {
|
|
29749
|
+
if (this.pause) return;
|
|
29665
29750
|
const p = graphic.parent;
|
|
29666
29751
|
if (!(force || p && graphic.needUpdateLayout())) return;
|
|
29667
29752
|
const theme = getTheme$1(p).group,
|
|
@@ -29918,6 +30003,70 @@
|
|
|
29918
30003
|
Factory$1.registerPlugin("FlexLayoutPlugin", FlexLayoutPlugin);
|
|
29919
30004
|
};
|
|
29920
30005
|
|
|
30006
|
+
class PickerBase {
|
|
30007
|
+
contains(graphic, point, params) {
|
|
30008
|
+
if (!graphic.AABBBounds.containsPoint(point)) return !1;
|
|
30009
|
+
if ("imprecise" === graphic.attribute.pickMode) return !0;
|
|
30010
|
+
if (!this.canvasRenderer) return !0;
|
|
30011
|
+
const {
|
|
30012
|
+
pickContext: pickContext
|
|
30013
|
+
} = null != params ? params : {};
|
|
30014
|
+
if (!pickContext) return !1;
|
|
30015
|
+
const attribute = graphic.getGraphicTheme();
|
|
30016
|
+
pickContext.highPerformanceSave();
|
|
30017
|
+
let {
|
|
30018
|
+
x = attribute.x,
|
|
30019
|
+
y = attribute.y
|
|
30020
|
+
} = graphic.attribute;
|
|
30021
|
+
if (graphic.transMatrix.onlyTranslate()) {
|
|
30022
|
+
const point = graphic.getOffsetXY(attribute);
|
|
30023
|
+
x += point.x, y += point.y, pickContext.setTransformForCurrent();
|
|
30024
|
+
} else x = 0, y = 0, pickContext.transformFromMatrix(graphic.transMatrix, !0);
|
|
30025
|
+
let picked = !1,
|
|
30026
|
+
_final = !1;
|
|
30027
|
+
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) => {
|
|
30028
|
+
if (picked || _final) return !0;
|
|
30029
|
+
const lineWidth = arcAttribute.lineWidth || themeAttribute.lineWidth,
|
|
30030
|
+
pickStrokeBuffer = arcAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
|
|
30031
|
+
keepStrokeScale = arcAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
|
|
30032
|
+
return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), _final = final || _final, picked;
|
|
30033
|
+
}), pickContext.highPerformanceRestore(), picked;
|
|
30034
|
+
}
|
|
30035
|
+
}
|
|
30036
|
+
|
|
30037
|
+
class DefaultCanvasArcPicker extends PickerBase {
|
|
30038
|
+
constructor(canvasRenderer) {
|
|
30039
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "arc", this.numberType = ARC_NUMBER_TYPE;
|
|
30040
|
+
}
|
|
30041
|
+
}
|
|
30042
|
+
|
|
30043
|
+
let loadArcPick$1 = !1;
|
|
30044
|
+
function bindArcCanvasPickerContribution(container) {
|
|
30045
|
+
loadArcPick$1 || (loadArcPick$1 = !0, container.bind(CanvasArcPicker).toDynamicValue(() => new DefaultCanvasArcPicker(resolveContainerBinding(container, ArcRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasArcPicker));
|
|
30046
|
+
}
|
|
30047
|
+
|
|
30048
|
+
class DefaultMathArcPicker extends PickerBase {
|
|
30049
|
+
constructor(canvasRenderer) {
|
|
30050
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "arc", this.numberType = ARC_NUMBER_TYPE;
|
|
30051
|
+
}
|
|
30052
|
+
}
|
|
30053
|
+
|
|
30054
|
+
let loadArcPick = !1;
|
|
30055
|
+
function bindArcMathPickerContribution(container) {
|
|
30056
|
+
loadArcPick || (loadArcPick = !0, container.bind(MathArcPicker).toDynamicValue(() => new DefaultMathArcPicker(resolveContainerBinding(container, ArcRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathArcPicker));
|
|
30057
|
+
}
|
|
30058
|
+
|
|
30059
|
+
function _registerArc() {
|
|
30060
|
+
if (_registerArc.__loaded) return;
|
|
30061
|
+
_registerArc.__loaded = !0;
|
|
30062
|
+
const legacyContext = getLegacyBindingContext();
|
|
30063
|
+
registerArcGraphic(), arcModule({
|
|
30064
|
+
bind: legacyContext.bind
|
|
30065
|
+
}), browser ? bindArcCanvasPickerContribution(legacyContext) : bindArcMathPickerContribution(legacyContext);
|
|
30066
|
+
}
|
|
30067
|
+
_registerArc.__loaded = !1;
|
|
30068
|
+
const registerArc = _registerArc;
|
|
30069
|
+
|
|
29921
30070
|
class Base3dPicker extends BaseRender {
|
|
29922
30071
|
contains(graphic, point, params) {
|
|
29923
30072
|
const {
|
|
@@ -29968,103 +30117,645 @@
|
|
|
29968
30117
|
_registerArc3d.__loaded = !1;
|
|
29969
30118
|
const registerArc3d = _registerArc3d;
|
|
29970
30119
|
|
|
29971
|
-
class
|
|
30120
|
+
class DefaultCanvasAreaPicker extends PickerBase {
|
|
29972
30121
|
constructor(canvasRenderer) {
|
|
29973
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "
|
|
30122
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "area", this.numberType = AREA_NUMBER_TYPE;
|
|
29974
30123
|
}
|
|
29975
30124
|
}
|
|
29976
30125
|
|
|
29977
|
-
let
|
|
29978
|
-
function
|
|
29979
|
-
|
|
29980
|
-
loadPyramid3dPick || (null === (_a = container.isBound) || void 0 === _a ? void 0 : _a.call(container, Pyramid3dRender)) && (loadPyramid3dPick = !0, container.bind(CanvasPyramid3dPicker).toDynamicValue(() => new DefaultCanvasPyramid3dPicker(resolveContainerBinding(container, Pyramid3dRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasPyramid3dPicker));
|
|
30126
|
+
let loadAreaPick$1 = !1;
|
|
30127
|
+
function bindAreaCanvasPickerContribution(container) {
|
|
30128
|
+
loadAreaPick$1 || (loadAreaPick$1 = !0, container.bind(CanvasAreaPicker).toDynamicValue(() => new DefaultCanvasAreaPicker(resolveContainerBinding(container, AreaRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasAreaPicker));
|
|
29981
30129
|
}
|
|
29982
30130
|
|
|
29983
|
-
|
|
29984
|
-
|
|
29985
|
-
|
|
30131
|
+
class DefaultMathAreaPicker extends PickerBase {
|
|
30132
|
+
constructor(canvasRenderer) {
|
|
30133
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "area", this.numberType = AREA_NUMBER_TYPE;
|
|
30134
|
+
}
|
|
30135
|
+
}
|
|
30136
|
+
|
|
30137
|
+
let loadAreaPick = !1;
|
|
30138
|
+
function bindAreaMathPickerContribution(container) {
|
|
30139
|
+
loadAreaPick || (loadAreaPick = !0, container.bind(MathAreaPicker).toDynamicValue(() => new DefaultMathAreaPicker(resolveContainerBinding(container, AreaRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathAreaPicker));
|
|
30140
|
+
}
|
|
30141
|
+
|
|
30142
|
+
function _registerArea() {
|
|
30143
|
+
if (_registerArea.__loaded) return;
|
|
30144
|
+
_registerArea.__loaded = !0;
|
|
29986
30145
|
const legacyContext = getLegacyBindingContext();
|
|
29987
|
-
|
|
30146
|
+
registerAreaGraphic(), areaModule({
|
|
29988
30147
|
bind: legacyContext.bind
|
|
29989
|
-
}),
|
|
30148
|
+
}), browser ? bindAreaCanvasPickerContribution(legacyContext) : bindAreaMathPickerContribution(legacyContext);
|
|
29990
30149
|
}
|
|
29991
|
-
|
|
29992
|
-
const
|
|
30150
|
+
_registerArea.__loaded = !1;
|
|
30151
|
+
const registerArea = _registerArea;
|
|
29993
30152
|
|
|
29994
|
-
class
|
|
30153
|
+
class GlyphPickerBase {
|
|
30154
|
+
constructor() {
|
|
30155
|
+
this.type = "glyph", this.numberType = GLYPH_NUMBER_TYPE;
|
|
30156
|
+
}
|
|
30157
|
+
contains(glyph, point, params) {
|
|
30158
|
+
if (!glyph.AABBBounds.containsPoint(point)) return !1;
|
|
30159
|
+
if ("imprecise" === glyph.attribute.pickMode) return !0;
|
|
30160
|
+
const {
|
|
30161
|
+
pickContext: pickContext
|
|
30162
|
+
} = null != params ? params : {};
|
|
30163
|
+
if (!pickContext) return !1;
|
|
30164
|
+
const pickerService = null == params ? void 0 : params.pickerService;
|
|
30165
|
+
if (pickerService) {
|
|
30166
|
+
let picked = !1;
|
|
30167
|
+
return glyph.getSubGraphic().forEach(g => {
|
|
30168
|
+
if (picked) return;
|
|
30169
|
+
const data = pickerService.pickItem(g, point, null, params);
|
|
30170
|
+
picked = !(!data || !data.graphic);
|
|
30171
|
+
}), picked;
|
|
30172
|
+
}
|
|
30173
|
+
return !1;
|
|
30174
|
+
}
|
|
30175
|
+
}
|
|
30176
|
+
|
|
30177
|
+
class DefaultCanvasGlyphPicker extends GlyphPickerBase {
|
|
29995
30178
|
constructor(canvasRenderer) {
|
|
29996
|
-
super(), this.canvasRenderer = canvasRenderer
|
|
30179
|
+
super(), this.canvasRenderer = canvasRenderer;
|
|
29997
30180
|
}
|
|
29998
30181
|
}
|
|
29999
30182
|
|
|
30000
|
-
let
|
|
30001
|
-
function
|
|
30002
|
-
|
|
30003
|
-
loadRect3dPick || (null === (_a = container.isBound) || void 0 === _a ? void 0 : _a.call(container, Rect3DRender)) && (loadRect3dPick = !0, container.bind(CanvasRect3dPicker).toDynamicValue(() => new DefaultCanvasRect3dPicker(resolveContainerBinding(container, Rect3DRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasRect3dPicker));
|
|
30183
|
+
let loadGlyphPick$1 = !1;
|
|
30184
|
+
function bindGlyphCanvasPickerContribution(container) {
|
|
30185
|
+
loadGlyphPick$1 || (loadGlyphPick$1 = !0, container.bind(CanvasGlyphPicker).toDynamicValue(() => new DefaultCanvasGlyphPicker(resolveContainerBinding(container, GlyphRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasGlyphPicker));
|
|
30004
30186
|
}
|
|
30005
30187
|
|
|
30006
|
-
|
|
30007
|
-
|
|
30008
|
-
|
|
30188
|
+
class DefaultMathGlyphPicker extends GlyphPickerBase {
|
|
30189
|
+
constructor(canvasRenderer) {
|
|
30190
|
+
super(), this.canvasRenderer = canvasRenderer;
|
|
30191
|
+
}
|
|
30192
|
+
}
|
|
30193
|
+
|
|
30194
|
+
let loadGlyphPick = !1;
|
|
30195
|
+
function bindGlyphMathPickerContribution(container) {
|
|
30196
|
+
loadGlyphPick || (loadGlyphPick = !0, container.bind(MathGlyphPicker).toDynamicValue(() => new DefaultMathGlyphPicker(resolveContainerBinding(container, GlyphRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathGlyphPicker));
|
|
30197
|
+
}
|
|
30198
|
+
|
|
30199
|
+
function _registerGlyph() {
|
|
30200
|
+
if (_registerGlyph.__loaded) return;
|
|
30201
|
+
_registerGlyph.__loaded = !0;
|
|
30009
30202
|
const legacyContext = getLegacyBindingContext();
|
|
30010
|
-
|
|
30203
|
+
registerGlyphGraphic(), glyphModule({
|
|
30011
30204
|
bind: legacyContext.bind
|
|
30012
|
-
}),
|
|
30205
|
+
}), browser ? bindGlyphCanvasPickerContribution(legacyContext) : bindGlyphMathPickerContribution(legacyContext);
|
|
30013
30206
|
}
|
|
30014
|
-
|
|
30015
|
-
const
|
|
30016
|
-
|
|
30017
|
-
const createArc3d = (attributes) => {
|
|
30018
|
-
registerArc3d();
|
|
30019
|
-
return createGraphic$1('arc3d', attributes);
|
|
30020
|
-
};
|
|
30021
|
-
const createPyramid3d = (attributes) => {
|
|
30022
|
-
registerPyramid3d();
|
|
30023
|
-
return createGraphic$1('pyramid3d', attributes);
|
|
30024
|
-
};
|
|
30025
|
-
const createRect3d = (attributes) => {
|
|
30026
|
-
registerRect3d();
|
|
30027
|
-
return createGraphic$1('rect3d', attributes);
|
|
30028
|
-
};
|
|
30029
|
-
const waitForAllSubLayers = (stage) => new Promise(resolve => {
|
|
30030
|
-
vglobal.getRequestAnimationFrame()(() => {
|
|
30031
|
-
resolve(null);
|
|
30032
|
-
});
|
|
30033
|
-
}).then(() => {
|
|
30034
|
-
const promiseList = [];
|
|
30035
|
-
const layers = stage.getChildren();
|
|
30036
|
-
layers.forEach((layer) => {
|
|
30037
|
-
var _a;
|
|
30038
|
-
if (!((_a = layer.subLayers) === null || _a === void 0 ? void 0 : _a.size)) {
|
|
30039
|
-
return;
|
|
30040
|
-
}
|
|
30041
|
-
layer.subLayers.forEach((subLayer) => {
|
|
30042
|
-
const drawContribution = subLayer.drawContribution;
|
|
30043
|
-
if ((drawContribution === null || drawContribution === void 0 ? void 0 : drawContribution.hooks) && drawContribution.rendering) {
|
|
30044
|
-
promiseList.push(new Promise(resolve => {
|
|
30045
|
-
drawContribution.hooks.completeDraw.tap('outWait', () => {
|
|
30046
|
-
drawContribution.hooks.completeDraw.taps = drawContribution.hooks.completeDraw.taps.filter((item) => item.name !== 'outWait');
|
|
30047
|
-
resolve(null);
|
|
30048
|
-
});
|
|
30049
|
-
}));
|
|
30050
|
-
}
|
|
30051
|
-
});
|
|
30052
|
-
});
|
|
30053
|
-
return Promise.all(promiseList);
|
|
30054
|
-
});
|
|
30207
|
+
_registerGlyph.__loaded = !1;
|
|
30208
|
+
const registerGlyph = _registerGlyph;
|
|
30055
30209
|
|
|
30056
|
-
function
|
|
30057
|
-
|
|
30058
|
-
for (let index = 0; index < domains.length; index++) {
|
|
30059
|
-
const domain = domains[index];
|
|
30060
|
-
if (index === 0 || domain[0] !== result[result.length - 1]) {
|
|
30061
|
-
result.push(domain[0]);
|
|
30062
|
-
}
|
|
30063
|
-
result.push(domain[1]);
|
|
30064
|
-
}
|
|
30065
|
-
return result;
|
|
30210
|
+
function _registerGroup() {
|
|
30211
|
+
_registerGroup.__loaded || (_registerGroup.__loaded = !0, registerGroupGraphic());
|
|
30066
30212
|
}
|
|
30067
|
-
|
|
30213
|
+
_registerGroup.__loaded = !1;
|
|
30214
|
+
const registerGroup = _registerGroup;
|
|
30215
|
+
|
|
30216
|
+
class DefaultCanvasImagePicker extends PickerBase {
|
|
30217
|
+
constructor(canvasRenderer) {
|
|
30218
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "image", this.numberType = IMAGE_NUMBER_TYPE;
|
|
30219
|
+
}
|
|
30220
|
+
}
|
|
30221
|
+
|
|
30222
|
+
let loadImagePick$1 = !1;
|
|
30223
|
+
function bindImageCanvasPickerContribution(container) {
|
|
30224
|
+
loadImagePick$1 || (loadImagePick$1 = !0, container.bind(CanvasImagePicker).toDynamicValue(() => new DefaultCanvasImagePicker(resolveContainerBinding(container, ImageRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasImagePicker));
|
|
30225
|
+
}
|
|
30226
|
+
|
|
30227
|
+
class DefaultMathImagePicker {
|
|
30228
|
+
constructor() {
|
|
30229
|
+
this.type = "image", this.numberType = IMAGE_NUMBER_TYPE;
|
|
30230
|
+
}
|
|
30231
|
+
contains(image, point, params) {
|
|
30232
|
+
const {
|
|
30233
|
+
pickContext: pickContext
|
|
30234
|
+
} = null != params ? params : {};
|
|
30235
|
+
return !!pickContext && !!image.AABBBounds.containsPoint(point);
|
|
30236
|
+
}
|
|
30237
|
+
}
|
|
30238
|
+
|
|
30239
|
+
let loadImagePick = !1;
|
|
30240
|
+
function bindImageMathPickerContribution(container) {
|
|
30241
|
+
loadImagePick || (loadImagePick = !0, container.bind(MathImagePicker).toDynamicValue(() => new DefaultMathImagePicker()).inSingletonScope(), container.bind(MathPickerContribution).toService(MathImagePicker));
|
|
30242
|
+
}
|
|
30243
|
+
|
|
30244
|
+
function _registerImage() {
|
|
30245
|
+
if (_registerImage.__loaded) return;
|
|
30246
|
+
_registerImage.__loaded = !0;
|
|
30247
|
+
const legacyContext = getLegacyBindingContext();
|
|
30248
|
+
registerImageGraphic(), imageModule({
|
|
30249
|
+
bind: legacyContext.bind
|
|
30250
|
+
}), browser ? bindImageCanvasPickerContribution(legacyContext) : bindImageMathPickerContribution(legacyContext);
|
|
30251
|
+
}
|
|
30252
|
+
_registerImage.__loaded = !1;
|
|
30253
|
+
const registerImage = _registerImage;
|
|
30254
|
+
|
|
30255
|
+
class BaseLinePicker extends BaseRender {
|
|
30256
|
+
contains(graphic, point, params) {
|
|
30257
|
+
if (!graphic.AABBBounds.containsPoint(point)) return !1;
|
|
30258
|
+
if ("imprecise" === graphic.attribute.pickMode) return !0;
|
|
30259
|
+
const {
|
|
30260
|
+
pickContext: pickContext
|
|
30261
|
+
} = null != params ? params : {};
|
|
30262
|
+
if (!pickContext) return !1;
|
|
30263
|
+
pickContext.highPerformanceSave();
|
|
30264
|
+
const lineAttribute = graphic.getGraphicTheme(),
|
|
30265
|
+
data = this.transform(graphic, lineAttribute, pickContext),
|
|
30266
|
+
{
|
|
30267
|
+
x: x,
|
|
30268
|
+
y: y,
|
|
30269
|
+
z: z,
|
|
30270
|
+
lastModelMatrix: lastModelMatrix
|
|
30271
|
+
} = data;
|
|
30272
|
+
let pickPoint = point;
|
|
30273
|
+
if (pickContext.camera) {
|
|
30274
|
+
pickPoint = point.clone();
|
|
30275
|
+
const globalMatrix = graphic.parent.globalTransMatrix;
|
|
30276
|
+
pickPoint.x = globalMatrix.a * point.x + globalMatrix.c * point.y + globalMatrix.e, pickPoint.y = globalMatrix.b * point.x + globalMatrix.d * point.y + globalMatrix.f;
|
|
30277
|
+
}
|
|
30278
|
+
this.canvasRenderer.z = z;
|
|
30279
|
+
let picked = !1;
|
|
30280
|
+
return this.canvasRenderer.drawShape(graphic, pickContext, x, y, {}, null, context => !!picked || (picked = context.isPointInPath(pickPoint.x, pickPoint.y), picked), (context, lineAttribute, themeAttribute) => {
|
|
30281
|
+
if (picked) return !0;
|
|
30282
|
+
const lineWidth = lineAttribute.lineWidth || themeAttribute.lineWidth,
|
|
30283
|
+
pickStrokeBuffer = lineAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
|
|
30284
|
+
keepStrokeScale = lineAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
|
|
30285
|
+
return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(pickPoint.x, pickPoint.y), picked;
|
|
30286
|
+
}), this.canvasRenderer.z = 0, pickContext.modelMatrix !== lastModelMatrix && mat4Allocate.free(pickContext.modelMatrix), pickContext.modelMatrix = lastModelMatrix, pickContext.highPerformanceRestore(), picked;
|
|
30287
|
+
}
|
|
30288
|
+
}
|
|
30289
|
+
|
|
30290
|
+
class DefaultCanvasLinePicker extends BaseLinePicker {
|
|
30291
|
+
constructor(canvasRenderer) {
|
|
30292
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "line", this.numberType = LINE_NUMBER_TYPE;
|
|
30293
|
+
}
|
|
30294
|
+
}
|
|
30295
|
+
|
|
30296
|
+
let loadLinePick$1 = !1;
|
|
30297
|
+
function bindLineCanvasPickerContribution(container) {
|
|
30298
|
+
loadLinePick$1 || (loadLinePick$1 = !0, container.bind(CanvasLinePicker).toDynamicValue(() => new DefaultCanvasLinePicker(resolveContainerBinding(container, LineRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasLinePicker));
|
|
30299
|
+
}
|
|
30300
|
+
|
|
30301
|
+
class DefaultMathLinePicker extends PickerBase {
|
|
30302
|
+
constructor(canvasRenderer) {
|
|
30303
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "line", this.numberType = LINE_NUMBER_TYPE;
|
|
30304
|
+
}
|
|
30305
|
+
}
|
|
30306
|
+
|
|
30307
|
+
let loadLinePick = !1;
|
|
30308
|
+
function bindLineMathPickerContribution(container) {
|
|
30309
|
+
loadLinePick || (loadLinePick = !0, container.bind(MathLinePicker).toDynamicValue(() => new DefaultMathLinePicker(resolveContainerBinding(container, LineRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathLinePicker));
|
|
30310
|
+
}
|
|
30311
|
+
|
|
30312
|
+
function _registerLine() {
|
|
30313
|
+
if (_registerLine.__loaded) return;
|
|
30314
|
+
_registerLine.__loaded = !0;
|
|
30315
|
+
const legacyContext = getLegacyBindingContext();
|
|
30316
|
+
registerLineGraphic(), lineModule({
|
|
30317
|
+
bind: legacyContext.bind
|
|
30318
|
+
}), browser ? bindLineCanvasPickerContribution(legacyContext) : bindLineMathPickerContribution(legacyContext);
|
|
30319
|
+
}
|
|
30320
|
+
_registerLine.__loaded = !1;
|
|
30321
|
+
const registerLine = _registerLine;
|
|
30322
|
+
|
|
30323
|
+
class DefaultCanvasPathPicker extends BaseLinePicker {
|
|
30324
|
+
constructor(canvasRenderer) {
|
|
30325
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "path", this.numberType = PATH_NUMBER_TYPE;
|
|
30326
|
+
}
|
|
30327
|
+
}
|
|
30328
|
+
|
|
30329
|
+
let loadPathPick$1 = !1;
|
|
30330
|
+
function bindPathCanvasPickerContribution(container) {
|
|
30331
|
+
loadPathPick$1 || (loadPathPick$1 = !0, container.bind(CanvasPathPicker).toDynamicValue(() => new DefaultCanvasPathPicker(resolveContainerBinding(container, PathRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasPathPicker));
|
|
30332
|
+
}
|
|
30333
|
+
|
|
30334
|
+
class DefaultMathPathPicker extends PickerBase {
|
|
30335
|
+
constructor(canvasRenderer) {
|
|
30336
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "path", this.numberType = PATH_NUMBER_TYPE;
|
|
30337
|
+
}
|
|
30338
|
+
}
|
|
30339
|
+
|
|
30340
|
+
let loadPathPick = !1;
|
|
30341
|
+
function bindPathMathPickerContribution(container) {
|
|
30342
|
+
loadPathPick || (loadPathPick = !0, container.bind(MathPathPicker).toDynamicValue(() => new DefaultMathPathPicker(resolveContainerBinding(container, PathRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathPathPicker));
|
|
30343
|
+
}
|
|
30344
|
+
|
|
30345
|
+
function _registerPath() {
|
|
30346
|
+
if (_registerPath.__loaded) return;
|
|
30347
|
+
_registerPath.__loaded = !0;
|
|
30348
|
+
const legacyContext = getLegacyBindingContext();
|
|
30349
|
+
registerPathGraphic(), pathModule({
|
|
30350
|
+
bind: legacyContext.bind
|
|
30351
|
+
}), browser ? bindPathCanvasPickerContribution(legacyContext) : bindPathMathPickerContribution(legacyContext);
|
|
30352
|
+
}
|
|
30353
|
+
_registerPath.__loaded = !1;
|
|
30354
|
+
const registerPath = _registerPath;
|
|
30355
|
+
|
|
30356
|
+
class DefaultCanvasPolygonPicker extends PickerBase {
|
|
30357
|
+
constructor(canvasRenderer) {
|
|
30358
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "polygon", this.numberType = POLYGON_NUMBER_TYPE;
|
|
30359
|
+
}
|
|
30360
|
+
}
|
|
30361
|
+
|
|
30362
|
+
let loadPolygonPick$1 = !1;
|
|
30363
|
+
function bindPolygonCanvasPickerContribution(container) {
|
|
30364
|
+
loadPolygonPick$1 || (loadPolygonPick$1 = !0, container.bind(CanvasPolygonPicker).toDynamicValue(() => new DefaultCanvasPolygonPicker(resolveContainerBinding(container, PolygonRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasPolygonPicker));
|
|
30365
|
+
}
|
|
30366
|
+
|
|
30367
|
+
class DefaultMathPolygonPicker extends PickerBase {
|
|
30368
|
+
constructor(canvasRenderer) {
|
|
30369
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "polygon", this.numberType = POLYGON_NUMBER_TYPE;
|
|
30370
|
+
}
|
|
30371
|
+
}
|
|
30372
|
+
|
|
30373
|
+
let loadPolygonPick = !1;
|
|
30374
|
+
function bindPolygonMathPickerContribution(container) {
|
|
30375
|
+
loadPolygonPick || (loadPolygonPick = !0, container.bind(MathPolygonPicker).toDynamicValue(() => new DefaultMathPolygonPicker(resolveContainerBinding(container, PolygonRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathPolygonPicker));
|
|
30376
|
+
}
|
|
30377
|
+
|
|
30378
|
+
function _registerPolygon() {
|
|
30379
|
+
if (_registerPolygon.__loaded) return;
|
|
30380
|
+
_registerPolygon.__loaded = !0;
|
|
30381
|
+
const legacyContext = getLegacyBindingContext();
|
|
30382
|
+
registerPolygonGraphic(), polygonModule({
|
|
30383
|
+
bind: legacyContext.bind
|
|
30384
|
+
}), browser ? bindPolygonCanvasPickerContribution(legacyContext) : bindPolygonMathPickerContribution(legacyContext);
|
|
30385
|
+
}
|
|
30386
|
+
_registerPolygon.__loaded = !1;
|
|
30387
|
+
const registerPolygon = _registerPolygon;
|
|
30388
|
+
|
|
30389
|
+
class DefaultCanvasPyramid3dPicker extends Base3dPicker {
|
|
30390
|
+
constructor(canvasRenderer) {
|
|
30391
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "pyramid3d", this.numberType = PYRAMID3D_NUMBER_TYPE, this.themeType = "polygon";
|
|
30392
|
+
}
|
|
30393
|
+
}
|
|
30394
|
+
|
|
30395
|
+
let loadPyramid3dPick = !1;
|
|
30396
|
+
function bindPyramid3dCanvasPickerContribution(container) {
|
|
30397
|
+
var _a;
|
|
30398
|
+
loadPyramid3dPick || (null === (_a = container.isBound) || void 0 === _a ? void 0 : _a.call(container, Pyramid3dRender)) && (loadPyramid3dPick = !0, container.bind(CanvasPyramid3dPicker).toDynamicValue(() => new DefaultCanvasPyramid3dPicker(resolveContainerBinding(container, Pyramid3dRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasPyramid3dPicker));
|
|
30399
|
+
}
|
|
30400
|
+
|
|
30401
|
+
function _registerPyramid3d() {
|
|
30402
|
+
if (_registerPyramid3d.__loaded) return;
|
|
30403
|
+
_registerPyramid3d.__loaded = !0;
|
|
30404
|
+
const legacyContext = getLegacyBindingContext();
|
|
30405
|
+
registerPyramid3dGraphic(), registerDirectionalLight(), registerOrthoCamera(), pyramid3dModule({
|
|
30406
|
+
bind: legacyContext.bind
|
|
30407
|
+
}), bindPyramid3dCanvasPickerContribution(legacyContext);
|
|
30408
|
+
}
|
|
30409
|
+
_registerPyramid3d.__loaded = !1;
|
|
30410
|
+
const registerPyramid3d = _registerPyramid3d;
|
|
30411
|
+
|
|
30412
|
+
const _bounds = new AABBBounds();
|
|
30413
|
+
class RectPickerBase {
|
|
30414
|
+
constructor() {
|
|
30415
|
+
this.type = "rect", this.numberType = RECT_NUMBER_TYPE;
|
|
30416
|
+
}
|
|
30417
|
+
contains(rect, point, params) {
|
|
30418
|
+
if (!rect.AABBBounds.containsPoint(point)) return !1;
|
|
30419
|
+
if ("imprecise" === rect.attribute.pickMode) return !0;
|
|
30420
|
+
const {
|
|
30421
|
+
pickContext: pickContext
|
|
30422
|
+
} = null != params ? params : {};
|
|
30423
|
+
if (!pickContext) return !1;
|
|
30424
|
+
const rectAttribute = rect.getGraphicTheme(),
|
|
30425
|
+
{
|
|
30426
|
+
cornerRadius = rectAttribute.cornerRadius
|
|
30427
|
+
} = rect.attribute;
|
|
30428
|
+
let {
|
|
30429
|
+
x = rectAttribute.x,
|
|
30430
|
+
y = rectAttribute.y
|
|
30431
|
+
} = rect.attribute;
|
|
30432
|
+
pickContext.highPerformanceSave();
|
|
30433
|
+
let onlyTranslate = !0;
|
|
30434
|
+
if (rect.transMatrix.onlyTranslate()) {
|
|
30435
|
+
const point = rect.getOffsetXY(rectAttribute);
|
|
30436
|
+
x += point.x, y += point.y, pickContext.setTransformForCurrent();
|
|
30437
|
+
} else x = 0, y = 0, onlyTranslate = !1, pickContext.transformFromMatrix(rect.transMatrix, !0);
|
|
30438
|
+
let picked = !0;
|
|
30439
|
+
if (!onlyTranslate || rect.shadowRoot || isNumber$1(cornerRadius, !0) && 0 !== cornerRadius || isArray$1(cornerRadius) && cornerRadius.some(num => 0 !== num)) picked = !1, this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, rectAttribute, themeAttribute) => {
|
|
30440
|
+
if (picked) return !0;
|
|
30441
|
+
const lineWidth = rectAttribute.lineWidth || themeAttribute.lineWidth,
|
|
30442
|
+
pickStrokeBuffer = rectAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
|
|
30443
|
+
keepStrokeScale = rectAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
|
|
30444
|
+
return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), picked;
|
|
30445
|
+
});else {
|
|
30446
|
+
const {
|
|
30447
|
+
fill = rectAttribute.fill,
|
|
30448
|
+
stroke = rectAttribute.stroke,
|
|
30449
|
+
lineWidth = rectAttribute.lineWidth
|
|
30450
|
+
} = rect.attribute;
|
|
30451
|
+
if (fill) picked = !0;else if (stroke) {
|
|
30452
|
+
const bounds = rect.AABBBounds;
|
|
30453
|
+
_bounds.setValue(bounds.x1, bounds.y1, bounds.x2, bounds.y2), _bounds.expand(-lineWidth / 2), picked = !_bounds.containsPoint(point);
|
|
30454
|
+
}
|
|
30455
|
+
}
|
|
30456
|
+
return pickContext.highPerformanceRestore(), picked;
|
|
30457
|
+
}
|
|
30458
|
+
}
|
|
30459
|
+
|
|
30460
|
+
class DefaultCanvasRectPicker extends RectPickerBase {
|
|
30461
|
+
constructor(canvasRenderer) {
|
|
30462
|
+
super(), this.canvasRenderer = canvasRenderer;
|
|
30463
|
+
}
|
|
30464
|
+
}
|
|
30465
|
+
|
|
30466
|
+
let loadRectPick$1 = !1;
|
|
30467
|
+
function bindRectCanvasPickerContribution(container) {
|
|
30468
|
+
loadRectPick$1 || (loadRectPick$1 = !0, container.bind(CanvasRectPicker).toDynamicValue(() => new DefaultCanvasRectPicker(resolveContainerBinding(container, RectRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasRectPicker));
|
|
30469
|
+
}
|
|
30470
|
+
|
|
30471
|
+
class DefaultMathRectPicker extends RectPickerBase {
|
|
30472
|
+
constructor(canvasRenderer) {
|
|
30473
|
+
super(), this.canvasRenderer = canvasRenderer;
|
|
30474
|
+
}
|
|
30475
|
+
}
|
|
30476
|
+
|
|
30477
|
+
let loadRectPick = !1;
|
|
30478
|
+
function bindRectMathPickerContribution(container) {
|
|
30479
|
+
loadRectPick || (loadRectPick = !0, container.bind(MathRectPicker).toDynamicValue(() => new DefaultMathRectPicker(resolveContainerBinding(container, RectRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathRectPicker));
|
|
30480
|
+
}
|
|
30481
|
+
|
|
30482
|
+
function _registerRect() {
|
|
30483
|
+
if (_registerRect.__loaded) return;
|
|
30484
|
+
_registerRect.__loaded = !0;
|
|
30485
|
+
const legacyContext = getLegacyBindingContext();
|
|
30486
|
+
registerRectGraphic(), rectModule({
|
|
30487
|
+
bind: legacyContext.bind
|
|
30488
|
+
}), browser ? bindRectCanvasPickerContribution(legacyContext) : bindRectMathPickerContribution(legacyContext);
|
|
30489
|
+
}
|
|
30490
|
+
_registerRect.__loaded = !1;
|
|
30491
|
+
const registerRect = _registerRect;
|
|
30492
|
+
|
|
30493
|
+
class DefaultCanvasRect3dPicker extends Base3dPicker {
|
|
30494
|
+
constructor(canvasRenderer) {
|
|
30495
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "rect3d", this.numberType = RECT3D_NUMBER_TYPE, this.themeType = "rect";
|
|
30496
|
+
}
|
|
30497
|
+
}
|
|
30498
|
+
|
|
30499
|
+
let loadRect3dPick = !1;
|
|
30500
|
+
function bindRect3dCanvasPickerContribution(container) {
|
|
30501
|
+
var _a;
|
|
30502
|
+
loadRect3dPick || (null === (_a = container.isBound) || void 0 === _a ? void 0 : _a.call(container, Rect3DRender)) && (loadRect3dPick = !0, container.bind(CanvasRect3dPicker).toDynamicValue(() => new DefaultCanvasRect3dPicker(resolveContainerBinding(container, Rect3DRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasRect3dPicker));
|
|
30503
|
+
}
|
|
30504
|
+
|
|
30505
|
+
function _registerRect3d() {
|
|
30506
|
+
if (_registerRect3d.__loaded) return;
|
|
30507
|
+
_registerRect3d.__loaded = !0;
|
|
30508
|
+
const legacyContext = getLegacyBindingContext();
|
|
30509
|
+
registerRect3dGraphic(), rect3dModule({
|
|
30510
|
+
bind: legacyContext.bind
|
|
30511
|
+
}), bindRect3dCanvasPickerContribution(legacyContext);
|
|
30512
|
+
}
|
|
30513
|
+
_registerRect3d.__loaded = !1;
|
|
30514
|
+
const registerRect3d = _registerRect3d;
|
|
30515
|
+
|
|
30516
|
+
class DefaultCanvasRichTextPicker {
|
|
30517
|
+
constructor(canvasRenderer) {
|
|
30518
|
+
this.canvasRenderer = canvasRenderer, this.type = "richtext", this.numberType = RICHTEXT_NUMBER_TYPE;
|
|
30519
|
+
}
|
|
30520
|
+
contains(richtext, point, params) {
|
|
30521
|
+
return !!richtext.AABBBounds.containsPoint(point);
|
|
30522
|
+
}
|
|
30523
|
+
}
|
|
30524
|
+
|
|
30525
|
+
let loadRichtextPick = !1;
|
|
30526
|
+
function bindRichtextCanvasPickerContribution(container) {
|
|
30527
|
+
loadRichtextPick || (loadRichtextPick = !0, container.bind(CanvasRichTextPicker).toDynamicValue(() => new DefaultCanvasRichTextPicker(resolveContainerBinding(container, RichTextRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasRichTextPicker));
|
|
30528
|
+
}
|
|
30529
|
+
|
|
30530
|
+
class DefaultMathRichTextPicker {
|
|
30531
|
+
constructor(canvasRenderer) {
|
|
30532
|
+
this.canvasRenderer = canvasRenderer, this.type = "richtext", this.numberType = RICHTEXT_NUMBER_TYPE;
|
|
30533
|
+
}
|
|
30534
|
+
contains(richtext, point, params) {
|
|
30535
|
+
return !!richtext.AABBBounds.containsPoint(point);
|
|
30536
|
+
}
|
|
30537
|
+
}
|
|
30538
|
+
|
|
30539
|
+
let loadRichTextPick = !1;
|
|
30540
|
+
function bindRichTextMathPickerContribution(container) {
|
|
30541
|
+
loadRichTextPick || (loadRichTextPick = !0, container.bind(MathRichTextPicker).toDynamicValue(() => new DefaultMathRichTextPicker(resolveContainerBinding(container, RichTextRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathRichTextPicker));
|
|
30542
|
+
}
|
|
30543
|
+
|
|
30544
|
+
function _registerRichtext() {
|
|
30545
|
+
if (_registerRichtext.__loaded) return;
|
|
30546
|
+
_registerRichtext.__loaded = !0;
|
|
30547
|
+
const legacyContext = getLegacyBindingContext();
|
|
30548
|
+
registerRichtextGraphic(), richtextModule({
|
|
30549
|
+
bind: legacyContext.bind
|
|
30550
|
+
}), browser ? bindRichtextCanvasPickerContribution(legacyContext) : bindRichTextMathPickerContribution(legacyContext);
|
|
30551
|
+
}
|
|
30552
|
+
_registerRichtext.__loaded = !1;
|
|
30553
|
+
const registerRichtext = _registerRichtext;
|
|
30554
|
+
|
|
30555
|
+
function _registerShadowRoot() {
|
|
30556
|
+
_registerShadowRoot.__loaded || (_registerShadowRoot.__loaded = !0, registerShadowRootGraphic());
|
|
30557
|
+
}
|
|
30558
|
+
_registerShadowRoot.__loaded = !1;
|
|
30559
|
+
const registerShadowRoot = _registerShadowRoot;
|
|
30560
|
+
|
|
30561
|
+
class DefaultCanvasSymbolPicker extends Base3dPicker {
|
|
30562
|
+
constructor(canvasRenderer) {
|
|
30563
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "symbol", this.numberType = SYMBOL_NUMBER_TYPE;
|
|
30564
|
+
}
|
|
30565
|
+
contains(symbol, point, params) {
|
|
30566
|
+
const {
|
|
30567
|
+
pickContext: pickContext
|
|
30568
|
+
} = null != params ? params : {};
|
|
30569
|
+
if (!pickContext) return !1;
|
|
30570
|
+
const parsedPath = symbol.getParsedPath();
|
|
30571
|
+
if (!pickContext.camera) {
|
|
30572
|
+
if (!symbol.AABBBounds.containsPoint(point)) return !1;
|
|
30573
|
+
if (parsedPath.isSvg || "imprecise" === symbol.attribute.pickMode) return !0;
|
|
30574
|
+
}
|
|
30575
|
+
pickContext.highPerformanceSave();
|
|
30576
|
+
const symbolAttribute = symbol.getGraphicTheme(),
|
|
30577
|
+
data = this.transform(symbol, symbolAttribute, pickContext),
|
|
30578
|
+
{
|
|
30579
|
+
x: x,
|
|
30580
|
+
y: y,
|
|
30581
|
+
z: z,
|
|
30582
|
+
lastModelMatrix: lastModelMatrix
|
|
30583
|
+
} = data;
|
|
30584
|
+
let pickPoint = point;
|
|
30585
|
+
if (pickContext.camera) {
|
|
30586
|
+
pickPoint = point.clone();
|
|
30587
|
+
const globalMatrix = symbol.parent.globalTransMatrix;
|
|
30588
|
+
pickPoint.x = globalMatrix.a * point.x + globalMatrix.c * point.y + globalMatrix.e, pickPoint.y = globalMatrix.b * point.x + globalMatrix.d * point.y + globalMatrix.f;
|
|
30589
|
+
}
|
|
30590
|
+
this.canvasRenderer.z = z;
|
|
30591
|
+
let picked = !1;
|
|
30592
|
+
return this.canvasRenderer.drawShape(symbol, pickContext, x, y, {}, null, (context, symbolAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(pickPoint.x, pickPoint.y), picked), (context, symbolAttribute, themeAttribute) => {
|
|
30593
|
+
if (picked) return !0;
|
|
30594
|
+
const lineWidth = symbolAttribute.lineWidth || themeAttribute.lineWidth,
|
|
30595
|
+
pickStrokeBuffer = symbolAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
|
|
30596
|
+
keepStrokeScale = symbolAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
|
|
30597
|
+
return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(pickPoint.x, pickPoint.y), picked;
|
|
30598
|
+
}), this.canvasRenderer.z = 0, pickContext.modelMatrix !== lastModelMatrix && mat4Allocate.free(pickContext.modelMatrix), pickContext.modelMatrix = lastModelMatrix, pickContext.highPerformanceRestore(), picked;
|
|
30599
|
+
}
|
|
30600
|
+
}
|
|
30601
|
+
|
|
30602
|
+
let loadSymbolPick$1 = !1;
|
|
30603
|
+
function bindSymbolCanvasPickerContribution(container) {
|
|
30604
|
+
loadSymbolPick$1 || (loadSymbolPick$1 = !0, container.bind(CanvasSymbolPicker).toDynamicValue(() => new DefaultCanvasSymbolPicker(resolveContainerBinding(container, SymbolRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasSymbolPicker));
|
|
30605
|
+
}
|
|
30606
|
+
|
|
30607
|
+
class DefaultMathSymbolPicker extends PickerBase {
|
|
30608
|
+
constructor(canvasRenderer) {
|
|
30609
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "symbol", this.numberType = SYMBOL_NUMBER_TYPE;
|
|
30610
|
+
}
|
|
30611
|
+
}
|
|
30612
|
+
|
|
30613
|
+
let loadSymbolPick = !1;
|
|
30614
|
+
function bindSymbolMathPickerContribution(container) {
|
|
30615
|
+
loadSymbolPick || (loadSymbolPick = !0, container.bind(MathSymbolPicker).toDynamicValue(() => new DefaultMathSymbolPicker(resolveContainerBinding(container, SymbolRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathSymbolPicker));
|
|
30616
|
+
}
|
|
30617
|
+
|
|
30618
|
+
function _registerSymbol() {
|
|
30619
|
+
if (_registerSymbol.__loaded) return;
|
|
30620
|
+
_registerSymbol.__loaded = !0;
|
|
30621
|
+
const legacyContext = getLegacyBindingContext();
|
|
30622
|
+
registerSymbolGraphic(), symbolModule({
|
|
30623
|
+
bind: legacyContext.bind
|
|
30624
|
+
}), browser ? bindSymbolCanvasPickerContribution(legacyContext) : bindSymbolMathPickerContribution(legacyContext);
|
|
30625
|
+
}
|
|
30626
|
+
_registerSymbol.__loaded = !1;
|
|
30627
|
+
const registerSymbol = _registerSymbol;
|
|
30628
|
+
|
|
30629
|
+
class DefaultCanvasTextPicker extends Base3dPicker {
|
|
30630
|
+
constructor(canvasRenderer) {
|
|
30631
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "text", this.numberType = TEXT_NUMBER_TYPE;
|
|
30632
|
+
}
|
|
30633
|
+
contains(text, point, params) {
|
|
30634
|
+
const {
|
|
30635
|
+
pickContext: pickContext
|
|
30636
|
+
} = null != params ? params : {};
|
|
30637
|
+
if (!pickContext) return !1;
|
|
30638
|
+
const bounds = text.AABBBounds;
|
|
30639
|
+
if (!pickContext.camera) return !!bounds.containsPoint(point);
|
|
30640
|
+
pickContext.highPerformanceSave();
|
|
30641
|
+
const textAttribute = text.getGraphicTheme(),
|
|
30642
|
+
{
|
|
30643
|
+
keepDirIn3d = textAttribute.keepDirIn3d
|
|
30644
|
+
} = text.attribute,
|
|
30645
|
+
computed3dMatrix = !keepDirIn3d,
|
|
30646
|
+
data = this.transform(text, textAttribute, pickContext, computed3dMatrix),
|
|
30647
|
+
{
|
|
30648
|
+
x: x,
|
|
30649
|
+
y: y,
|
|
30650
|
+
z: z,
|
|
30651
|
+
lastModelMatrix: lastModelMatrix
|
|
30652
|
+
} = data;
|
|
30653
|
+
this.canvasRenderer.z = z;
|
|
30654
|
+
let pickPoint = point;
|
|
30655
|
+
if (pickContext.camera) {
|
|
30656
|
+
pickPoint = point.clone();
|
|
30657
|
+
const globalMatrix = text.parent.globalTransMatrix;
|
|
30658
|
+
pickPoint.x = globalMatrix.a * point.x + globalMatrix.c * point.y + globalMatrix.e, pickPoint.y = globalMatrix.b * point.x + globalMatrix.d * point.y + globalMatrix.f;
|
|
30659
|
+
}
|
|
30660
|
+
let picked = !1;
|
|
30661
|
+
return this.canvasRenderer.drawShape(text, pickContext, x, y, {}, null, (context, symbolAttribute, themeAttribute) => {
|
|
30662
|
+
if (picked) return !0;
|
|
30663
|
+
const {
|
|
30664
|
+
fontSize = textAttribute.fontSize,
|
|
30665
|
+
textBaseline = textAttribute.textBaseline,
|
|
30666
|
+
textAlign = textAttribute.textAlign
|
|
30667
|
+
} = text.attribute,
|
|
30668
|
+
bounds = text.AABBBounds,
|
|
30669
|
+
height = bounds.height(),
|
|
30670
|
+
width = bounds.width(),
|
|
30671
|
+
offsetY = textLayoutOffsetY(textBaseline, height, fontSize),
|
|
30672
|
+
offsetX = textDrawOffsetX(textAlign, width);
|
|
30673
|
+
return context.rect(offsetX + x, offsetY + y, width, height, z), picked = context.isPointInPath(pickPoint.x, pickPoint.y), picked;
|
|
30674
|
+
}, (context, symbolAttribute, themeAttribute) => picked), this.canvasRenderer.z = 0, pickContext.modelMatrix !== lastModelMatrix && mat4Allocate.free(pickContext.modelMatrix), pickContext.modelMatrix = lastModelMatrix, pickContext.highPerformanceRestore(), picked;
|
|
30675
|
+
}
|
|
30676
|
+
}
|
|
30677
|
+
|
|
30678
|
+
let loadTextPick$1 = !1;
|
|
30679
|
+
function bindTextCanvasPickerContribution(container) {
|
|
30680
|
+
loadTextPick$1 || (loadTextPick$1 = !0, container.bind(CanvasTextPicker).toDynamicValue(() => new DefaultCanvasTextPicker(resolveContainerBinding(container, TextRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasTextPicker));
|
|
30681
|
+
}
|
|
30682
|
+
|
|
30683
|
+
class DefaultMathTextPicker {
|
|
30684
|
+
constructor() {
|
|
30685
|
+
this.type = "text", this.numberType = TEXT_NUMBER_TYPE;
|
|
30686
|
+
}
|
|
30687
|
+
contains(text, point, params) {
|
|
30688
|
+
return !!text.AABBBounds.containsPoint(point);
|
|
30689
|
+
}
|
|
30690
|
+
}
|
|
30691
|
+
|
|
30692
|
+
let loadTextPick = !1;
|
|
30693
|
+
function bindTextMathPickerContribution(container) {
|
|
30694
|
+
loadTextPick || (loadTextPick = !0, container.bind(MathTextPicker).toDynamicValue(() => new DefaultMathTextPicker()).inSingletonScope(), container.bind(MathPickerContribution).toService(MathTextPicker));
|
|
30695
|
+
}
|
|
30696
|
+
|
|
30697
|
+
function _registerText() {
|
|
30698
|
+
if (_registerText.__loaded) return;
|
|
30699
|
+
_registerText.__loaded = !0;
|
|
30700
|
+
const legacyContext = getLegacyBindingContext();
|
|
30701
|
+
registerTextGraphic(), textModule({
|
|
30702
|
+
bind: legacyContext.bind
|
|
30703
|
+
}), browser ? bindTextCanvasPickerContribution(legacyContext) : bindTextMathPickerContribution(legacyContext);
|
|
30704
|
+
}
|
|
30705
|
+
_registerText.__loaded = !1;
|
|
30706
|
+
const registerText = _registerText;
|
|
30707
|
+
|
|
30708
|
+
const createArc3d = (attributes) => {
|
|
30709
|
+
registerArc3d();
|
|
30710
|
+
return createGraphic$1('arc3d', attributes);
|
|
30711
|
+
};
|
|
30712
|
+
const createPyramid3d = (attributes) => {
|
|
30713
|
+
registerPyramid3d();
|
|
30714
|
+
return createGraphic$1('pyramid3d', attributes);
|
|
30715
|
+
};
|
|
30716
|
+
const createRect3d = (attributes) => {
|
|
30717
|
+
registerRect3d();
|
|
30718
|
+
return createGraphic$1('rect3d', attributes);
|
|
30719
|
+
};
|
|
30720
|
+
const waitForAllSubLayers = (stage) => new Promise(resolve => {
|
|
30721
|
+
vglobal.getRequestAnimationFrame()(() => {
|
|
30722
|
+
resolve(null);
|
|
30723
|
+
});
|
|
30724
|
+
}).then(() => {
|
|
30725
|
+
const promiseList = [];
|
|
30726
|
+
const layers = stage.getChildren();
|
|
30727
|
+
layers.forEach((layer) => {
|
|
30728
|
+
var _a;
|
|
30729
|
+
if (!((_a = layer.subLayers) === null || _a === void 0 ? void 0 : _a.size)) {
|
|
30730
|
+
return;
|
|
30731
|
+
}
|
|
30732
|
+
layer.subLayers.forEach((subLayer) => {
|
|
30733
|
+
const drawContribution = subLayer.drawContribution;
|
|
30734
|
+
if ((drawContribution === null || drawContribution === void 0 ? void 0 : drawContribution.hooks) && drawContribution.rendering) {
|
|
30735
|
+
promiseList.push(new Promise(resolve => {
|
|
30736
|
+
drawContribution.hooks.completeDraw.tap('outWait', () => {
|
|
30737
|
+
drawContribution.hooks.completeDraw.taps = drawContribution.hooks.completeDraw.taps.filter((item) => item.name !== 'outWait');
|
|
30738
|
+
resolve(null);
|
|
30739
|
+
});
|
|
30740
|
+
}));
|
|
30741
|
+
}
|
|
30742
|
+
});
|
|
30743
|
+
});
|
|
30744
|
+
return Promise.all(promiseList);
|
|
30745
|
+
});
|
|
30746
|
+
|
|
30747
|
+
function combineDomains(domains) {
|
|
30748
|
+
const result = [];
|
|
30749
|
+
for (let index = 0; index < domains.length; index++) {
|
|
30750
|
+
const domain = domains[index];
|
|
30751
|
+
if (index === 0 || domain[0] !== result[result.length - 1]) {
|
|
30752
|
+
result.push(domain[0]);
|
|
30753
|
+
}
|
|
30754
|
+
result.push(domain[1]);
|
|
30755
|
+
}
|
|
30756
|
+
return result;
|
|
30757
|
+
}
|
|
30758
|
+
function moveAfterInArray(array, target, ref) {
|
|
30068
30759
|
const index = array.indexOf(target);
|
|
30069
30760
|
const refIndex = array.indexOf(ref);
|
|
30070
30761
|
if (index >= 0 && refIndex >= 0 && index < refIndex) {
|
|
@@ -35680,285 +36371,45 @@
|
|
|
35680
36371
|
current = element.offsetParent;
|
|
35681
36372
|
for (; null !== current;) actualTop += current.offsetTop, actualLeft += current.offsetLeft, current = current.offsetParent;
|
|
35682
36373
|
return {
|
|
35683
|
-
top: actualTop,
|
|
35684
|
-
left: actualLeft
|
|
35685
|
-
};
|
|
35686
|
-
}
|
|
35687
|
-
loadFont(font, source, descriptors) {
|
|
35688
|
-
return __awaiter$1(this, void 0, void 0, function* () {
|
|
35689
|
-
return new FontFace(font, isString$1(source) ? `url(${source})` : source, descriptors).load().then(function (loadedFont) {
|
|
35690
|
-
return document.fonts.add(loadedFont), {
|
|
35691
|
-
loadState: "success"
|
|
35692
|
-
};
|
|
35693
|
-
}).catch(function (error) {
|
|
35694
|
-
return console.error("Failed to load font:", error), {
|
|
35695
|
-
loadState: "fail"
|
|
35696
|
-
};
|
|
35697
|
-
});
|
|
35698
|
-
});
|
|
35699
|
-
}
|
|
35700
|
-
isMacOS() {
|
|
35701
|
-
if (void 0 === this._isMacOS) try {
|
|
35702
|
-
this._isMacOS = navigator.platform.toUpperCase().indexOf("MAC") >= 0;
|
|
35703
|
-
} catch (err) {
|
|
35704
|
-
this._isMacOS = !1;
|
|
35705
|
-
}
|
|
35706
|
-
return this._isMacOS;
|
|
35707
|
-
}
|
|
35708
|
-
copyToClipBoard(text) {
|
|
35709
|
-
return navigator.clipboard.writeText(text).then(() => {}).catch(err => {});
|
|
35710
|
-
}
|
|
35711
|
-
}
|
|
35712
|
-
|
|
35713
|
-
class PickerBase {
|
|
35714
|
-
contains(graphic, point, params) {
|
|
35715
|
-
if (!graphic.AABBBounds.containsPoint(point)) return !1;
|
|
35716
|
-
if ("imprecise" === graphic.attribute.pickMode) return !0;
|
|
35717
|
-
if (!this.canvasRenderer) return !0;
|
|
35718
|
-
const {
|
|
35719
|
-
pickContext: pickContext
|
|
35720
|
-
} = null != params ? params : {};
|
|
35721
|
-
if (!pickContext) return !1;
|
|
35722
|
-
const attribute = graphic.getGraphicTheme();
|
|
35723
|
-
pickContext.highPerformanceSave();
|
|
35724
|
-
let {
|
|
35725
|
-
x = attribute.x,
|
|
35726
|
-
y = attribute.y
|
|
35727
|
-
} = graphic.attribute;
|
|
35728
|
-
if (graphic.transMatrix.onlyTranslate()) {
|
|
35729
|
-
const point = graphic.getOffsetXY(attribute);
|
|
35730
|
-
x += point.x, y += point.y, pickContext.setTransformForCurrent();
|
|
35731
|
-
} else x = 0, y = 0, pickContext.transformFromMatrix(graphic.transMatrix, !0);
|
|
35732
|
-
let picked = !1,
|
|
35733
|
-
_final = !1;
|
|
35734
|
-
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) => {
|
|
35735
|
-
if (picked || _final) return !0;
|
|
35736
|
-
const lineWidth = arcAttribute.lineWidth || themeAttribute.lineWidth,
|
|
35737
|
-
pickStrokeBuffer = arcAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
|
|
35738
|
-
keepStrokeScale = arcAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
|
|
35739
|
-
return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), _final = final || _final, picked;
|
|
35740
|
-
}), pickContext.highPerformanceRestore(), picked;
|
|
35741
|
-
}
|
|
35742
|
-
}
|
|
35743
|
-
|
|
35744
|
-
class DefaultCanvasArcPicker extends PickerBase {
|
|
35745
|
-
constructor(canvasRenderer) {
|
|
35746
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "arc", this.numberType = ARC_NUMBER_TYPE;
|
|
35747
|
-
}
|
|
35748
|
-
}
|
|
35749
|
-
|
|
35750
|
-
let loadArcPick$1 = !1;
|
|
35751
|
-
function bindArcCanvasPickerContribution(container) {
|
|
35752
|
-
loadArcPick$1 || (loadArcPick$1 = !0, container.bind(CanvasArcPicker).toDynamicValue(() => new DefaultCanvasArcPicker(resolveContainerBinding(container, ArcRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasArcPicker));
|
|
35753
|
-
}
|
|
35754
|
-
|
|
35755
|
-
class DefaultCanvasAreaPicker extends PickerBase {
|
|
35756
|
-
constructor(canvasRenderer) {
|
|
35757
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "area", this.numberType = AREA_NUMBER_TYPE;
|
|
35758
|
-
}
|
|
35759
|
-
}
|
|
35760
|
-
|
|
35761
|
-
let loadAreaPick$1 = !1;
|
|
35762
|
-
function bindAreaCanvasPickerContribution(container) {
|
|
35763
|
-
loadAreaPick$1 || (loadAreaPick$1 = !0, container.bind(CanvasAreaPicker).toDynamicValue(() => new DefaultCanvasAreaPicker(resolveContainerBinding(container, AreaRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasAreaPicker));
|
|
35764
|
-
}
|
|
35765
|
-
|
|
35766
|
-
class DefaultCanvasCirclePicker extends PickerBase {
|
|
35767
|
-
constructor(canvasRenderer) {
|
|
35768
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "circle", this.numberType = CIRCLE_NUMBER_TYPE;
|
|
35769
|
-
}
|
|
35770
|
-
}
|
|
35771
|
-
|
|
35772
|
-
let loadCirclePick$1 = !1;
|
|
35773
|
-
function bindCircleCanvasPickerContribution(container) {
|
|
35774
|
-
loadCirclePick$1 || (loadCirclePick$1 = !0, container.bind(CanvasCirclePicker).toDynamicValue(() => new DefaultCanvasCirclePicker(resolveContainerBinding(container, CircleRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasCirclePicker));
|
|
35775
|
-
}
|
|
35776
|
-
|
|
35777
|
-
class GlyphPickerBase {
|
|
35778
|
-
constructor() {
|
|
35779
|
-
this.type = "glyph", this.numberType = GLYPH_NUMBER_TYPE;
|
|
35780
|
-
}
|
|
35781
|
-
contains(glyph, point, params) {
|
|
35782
|
-
if (!glyph.AABBBounds.containsPoint(point)) return !1;
|
|
35783
|
-
if ("imprecise" === glyph.attribute.pickMode) return !0;
|
|
35784
|
-
const {
|
|
35785
|
-
pickContext: pickContext
|
|
35786
|
-
} = null != params ? params : {};
|
|
35787
|
-
if (!pickContext) return !1;
|
|
35788
|
-
const pickerService = null == params ? void 0 : params.pickerService;
|
|
35789
|
-
if (pickerService) {
|
|
35790
|
-
let picked = !1;
|
|
35791
|
-
return glyph.getSubGraphic().forEach(g => {
|
|
35792
|
-
if (picked) return;
|
|
35793
|
-
const data = pickerService.pickItem(g, point, null, params);
|
|
35794
|
-
picked = !(!data || !data.graphic);
|
|
35795
|
-
}), picked;
|
|
35796
|
-
}
|
|
35797
|
-
return !1;
|
|
35798
|
-
}
|
|
35799
|
-
}
|
|
35800
|
-
|
|
35801
|
-
class DefaultCanvasGlyphPicker extends GlyphPickerBase {
|
|
35802
|
-
constructor(canvasRenderer) {
|
|
35803
|
-
super(), this.canvasRenderer = canvasRenderer;
|
|
35804
|
-
}
|
|
35805
|
-
}
|
|
35806
|
-
|
|
35807
|
-
let loadGlyphPick$1 = !1;
|
|
35808
|
-
function bindGlyphCanvasPickerContribution(container) {
|
|
35809
|
-
loadGlyphPick$1 || (loadGlyphPick$1 = !0, container.bind(CanvasGlyphPicker).toDynamicValue(() => new DefaultCanvasGlyphPicker(resolveContainerBinding(container, GlyphRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasGlyphPicker));
|
|
35810
|
-
}
|
|
35811
|
-
|
|
35812
|
-
class DefaultCanvasImagePicker extends PickerBase {
|
|
35813
|
-
constructor(canvasRenderer) {
|
|
35814
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "image", this.numberType = IMAGE_NUMBER_TYPE;
|
|
35815
|
-
}
|
|
35816
|
-
}
|
|
35817
|
-
|
|
35818
|
-
let loadImagePick$1 = !1;
|
|
35819
|
-
function bindImageCanvasPickerContribution(container) {
|
|
35820
|
-
loadImagePick$1 || (loadImagePick$1 = !0, container.bind(CanvasImagePicker).toDynamicValue(() => new DefaultCanvasImagePicker(resolveContainerBinding(container, ImageRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasImagePicker));
|
|
35821
|
-
}
|
|
35822
|
-
|
|
35823
|
-
class BaseLinePicker extends BaseRender {
|
|
35824
|
-
contains(graphic, point, params) {
|
|
35825
|
-
if (!graphic.AABBBounds.containsPoint(point)) return !1;
|
|
35826
|
-
if ("imprecise" === graphic.attribute.pickMode) return !0;
|
|
35827
|
-
const {
|
|
35828
|
-
pickContext: pickContext
|
|
35829
|
-
} = null != params ? params : {};
|
|
35830
|
-
if (!pickContext) return !1;
|
|
35831
|
-
pickContext.highPerformanceSave();
|
|
35832
|
-
const lineAttribute = graphic.getGraphicTheme(),
|
|
35833
|
-
data = this.transform(graphic, lineAttribute, pickContext),
|
|
35834
|
-
{
|
|
35835
|
-
x: x,
|
|
35836
|
-
y: y,
|
|
35837
|
-
z: z,
|
|
35838
|
-
lastModelMatrix: lastModelMatrix
|
|
35839
|
-
} = data;
|
|
35840
|
-
let pickPoint = point;
|
|
35841
|
-
if (pickContext.camera) {
|
|
35842
|
-
pickPoint = point.clone();
|
|
35843
|
-
const globalMatrix = graphic.parent.globalTransMatrix;
|
|
35844
|
-
pickPoint.x = globalMatrix.a * point.x + globalMatrix.c * point.y + globalMatrix.e, pickPoint.y = globalMatrix.b * point.x + globalMatrix.d * point.y + globalMatrix.f;
|
|
35845
|
-
}
|
|
35846
|
-
this.canvasRenderer.z = z;
|
|
35847
|
-
let picked = !1;
|
|
35848
|
-
return this.canvasRenderer.drawShape(graphic, pickContext, x, y, {}, null, context => !!picked || (picked = context.isPointInPath(pickPoint.x, pickPoint.y), picked), (context, lineAttribute, themeAttribute) => {
|
|
35849
|
-
if (picked) return !0;
|
|
35850
|
-
const lineWidth = lineAttribute.lineWidth || themeAttribute.lineWidth,
|
|
35851
|
-
pickStrokeBuffer = lineAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
|
|
35852
|
-
keepStrokeScale = lineAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
|
|
35853
|
-
return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(pickPoint.x, pickPoint.y), picked;
|
|
35854
|
-
}), this.canvasRenderer.z = 0, pickContext.modelMatrix !== lastModelMatrix && mat4Allocate.free(pickContext.modelMatrix), pickContext.modelMatrix = lastModelMatrix, pickContext.highPerformanceRestore(), picked;
|
|
35855
|
-
}
|
|
35856
|
-
}
|
|
35857
|
-
|
|
35858
|
-
class DefaultCanvasLinePicker extends BaseLinePicker {
|
|
35859
|
-
constructor(canvasRenderer) {
|
|
35860
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "line", this.numberType = LINE_NUMBER_TYPE;
|
|
35861
|
-
}
|
|
35862
|
-
}
|
|
35863
|
-
|
|
35864
|
-
let loadLinePick$1 = !1;
|
|
35865
|
-
function bindLineCanvasPickerContribution(container) {
|
|
35866
|
-
loadLinePick$1 || (loadLinePick$1 = !0, container.bind(CanvasLinePicker).toDynamicValue(() => new DefaultCanvasLinePicker(resolveContainerBinding(container, LineRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasLinePicker));
|
|
35867
|
-
}
|
|
35868
|
-
|
|
35869
|
-
class DefaultCanvasPathPicker extends BaseLinePicker {
|
|
35870
|
-
constructor(canvasRenderer) {
|
|
35871
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "path", this.numberType = PATH_NUMBER_TYPE;
|
|
35872
|
-
}
|
|
35873
|
-
}
|
|
35874
|
-
|
|
35875
|
-
let loadPathPick$1 = !1;
|
|
35876
|
-
function bindPathCanvasPickerContribution(container) {
|
|
35877
|
-
loadPathPick$1 || (loadPathPick$1 = !0, container.bind(CanvasPathPicker).toDynamicValue(() => new DefaultCanvasPathPicker(resolveContainerBinding(container, PathRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasPathPicker));
|
|
35878
|
-
}
|
|
35879
|
-
|
|
35880
|
-
class DefaultCanvasPolygonPicker extends PickerBase {
|
|
35881
|
-
constructor(canvasRenderer) {
|
|
35882
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "polygon", this.numberType = POLYGON_NUMBER_TYPE;
|
|
36374
|
+
top: actualTop,
|
|
36375
|
+
left: actualLeft
|
|
36376
|
+
};
|
|
35883
36377
|
}
|
|
35884
|
-
|
|
35885
|
-
|
|
35886
|
-
|
|
35887
|
-
|
|
35888
|
-
|
|
35889
|
-
|
|
35890
|
-
|
|
35891
|
-
|
|
35892
|
-
|
|
35893
|
-
|
|
35894
|
-
|
|
36378
|
+
loadFont(font, source, descriptors) {
|
|
36379
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
36380
|
+
return new FontFace(font, isString$1(source) ? `url(${source})` : source, descriptors).load().then(function (loadedFont) {
|
|
36381
|
+
return document.fonts.add(loadedFont), {
|
|
36382
|
+
loadState: "success"
|
|
36383
|
+
};
|
|
36384
|
+
}).catch(function (error) {
|
|
36385
|
+
return console.error("Failed to load font:", error), {
|
|
36386
|
+
loadState: "fail"
|
|
36387
|
+
};
|
|
36388
|
+
});
|
|
36389
|
+
});
|
|
35895
36390
|
}
|
|
35896
|
-
|
|
35897
|
-
if (
|
|
35898
|
-
|
|
35899
|
-
|
|
35900
|
-
|
|
35901
|
-
} = null != params ? params : {};
|
|
35902
|
-
if (!pickContext) return !1;
|
|
35903
|
-
const rectAttribute = rect.getGraphicTheme(),
|
|
35904
|
-
{
|
|
35905
|
-
cornerRadius = rectAttribute.cornerRadius
|
|
35906
|
-
} = rect.attribute;
|
|
35907
|
-
let {
|
|
35908
|
-
x = rectAttribute.x,
|
|
35909
|
-
y = rectAttribute.y
|
|
35910
|
-
} = rect.attribute;
|
|
35911
|
-
pickContext.highPerformanceSave();
|
|
35912
|
-
let onlyTranslate = !0;
|
|
35913
|
-
if (rect.transMatrix.onlyTranslate()) {
|
|
35914
|
-
const point = rect.getOffsetXY(rectAttribute);
|
|
35915
|
-
x += point.x, y += point.y, pickContext.setTransformForCurrent();
|
|
35916
|
-
} else x = 0, y = 0, onlyTranslate = !1, pickContext.transformFromMatrix(rect.transMatrix, !0);
|
|
35917
|
-
let picked = !0;
|
|
35918
|
-
if (!onlyTranslate || rect.shadowRoot || isNumber$1(cornerRadius, !0) && 0 !== cornerRadius || isArray$1(cornerRadius) && cornerRadius.some(num => 0 !== num)) picked = !1, this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, rectAttribute, themeAttribute) => {
|
|
35919
|
-
if (picked) return !0;
|
|
35920
|
-
const lineWidth = rectAttribute.lineWidth || themeAttribute.lineWidth,
|
|
35921
|
-
pickStrokeBuffer = rectAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
|
|
35922
|
-
keepStrokeScale = rectAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
|
|
35923
|
-
return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), picked;
|
|
35924
|
-
});else {
|
|
35925
|
-
const {
|
|
35926
|
-
fill = rectAttribute.fill,
|
|
35927
|
-
stroke = rectAttribute.stroke,
|
|
35928
|
-
lineWidth = rectAttribute.lineWidth
|
|
35929
|
-
} = rect.attribute;
|
|
35930
|
-
if (fill) picked = !0;else if (stroke) {
|
|
35931
|
-
const bounds = rect.AABBBounds;
|
|
35932
|
-
_bounds.setValue(bounds.x1, bounds.y1, bounds.x2, bounds.y2), _bounds.expand(-lineWidth / 2), picked = !_bounds.containsPoint(point);
|
|
35933
|
-
}
|
|
36391
|
+
isMacOS() {
|
|
36392
|
+
if (void 0 === this._isMacOS) try {
|
|
36393
|
+
this._isMacOS = navigator.platform.toUpperCase().indexOf("MAC") >= 0;
|
|
36394
|
+
} catch (err) {
|
|
36395
|
+
this._isMacOS = !1;
|
|
35934
36396
|
}
|
|
35935
|
-
return
|
|
36397
|
+
return this._isMacOS;
|
|
35936
36398
|
}
|
|
35937
|
-
|
|
35938
|
-
|
|
35939
|
-
class DefaultCanvasRectPicker extends RectPickerBase {
|
|
35940
|
-
constructor(canvasRenderer) {
|
|
35941
|
-
super(), this.canvasRenderer = canvasRenderer;
|
|
36399
|
+
copyToClipBoard(text) {
|
|
36400
|
+
return navigator.clipboard.writeText(text).then(() => {}).catch(err => {});
|
|
35942
36401
|
}
|
|
35943
36402
|
}
|
|
35944
36403
|
|
|
35945
|
-
|
|
35946
|
-
function bindRectCanvasPickerContribution(container) {
|
|
35947
|
-
loadRectPick$1 || (loadRectPick$1 = !0, container.bind(CanvasRectPicker).toDynamicValue(() => new DefaultCanvasRectPicker(resolveContainerBinding(container, RectRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasRectPicker));
|
|
35948
|
-
}
|
|
35949
|
-
|
|
35950
|
-
class DefaultCanvasRichTextPicker {
|
|
36404
|
+
class DefaultCanvasCirclePicker extends PickerBase {
|
|
35951
36405
|
constructor(canvasRenderer) {
|
|
35952
|
-
this.canvasRenderer = canvasRenderer, this.type = "
|
|
35953
|
-
}
|
|
35954
|
-
contains(richtext, point, params) {
|
|
35955
|
-
return !!richtext.AABBBounds.containsPoint(point);
|
|
36406
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "circle", this.numberType = CIRCLE_NUMBER_TYPE;
|
|
35956
36407
|
}
|
|
35957
36408
|
}
|
|
35958
36409
|
|
|
35959
|
-
let
|
|
35960
|
-
function
|
|
35961
|
-
|
|
36410
|
+
let loadCirclePick$1 = !1;
|
|
36411
|
+
function bindCircleCanvasPickerContribution(container) {
|
|
36412
|
+
loadCirclePick$1 || (loadCirclePick$1 = !0, container.bind(CanvasCirclePicker).toDynamicValue(() => new DefaultCanvasCirclePicker(resolveContainerBinding(container, CircleRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasCirclePicker));
|
|
35962
36413
|
}
|
|
35963
36414
|
|
|
35964
36415
|
class DefaultCanvasStarPicker extends PickerBase {
|
|
@@ -35973,106 +36424,6 @@
|
|
|
35973
36424
|
loadStarPick || (null === (_a = container.isBound) || void 0 === _a ? void 0 : _a.call(container, StarRender)) && (loadStarPick = !0, container.bind(CanvasStarPicker).toDynamicValue(() => new DefaultCanvasStarPicker(resolveContainerBinding(container, StarRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasStarPicker));
|
|
35974
36425
|
}
|
|
35975
36426
|
|
|
35976
|
-
class DefaultCanvasSymbolPicker extends Base3dPicker {
|
|
35977
|
-
constructor(canvasRenderer) {
|
|
35978
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "symbol", this.numberType = SYMBOL_NUMBER_TYPE;
|
|
35979
|
-
}
|
|
35980
|
-
contains(symbol, point, params) {
|
|
35981
|
-
const {
|
|
35982
|
-
pickContext: pickContext
|
|
35983
|
-
} = null != params ? params : {};
|
|
35984
|
-
if (!pickContext) return !1;
|
|
35985
|
-
const parsedPath = symbol.getParsedPath();
|
|
35986
|
-
if (!pickContext.camera) {
|
|
35987
|
-
if (!symbol.AABBBounds.containsPoint(point)) return !1;
|
|
35988
|
-
if (parsedPath.isSvg || "imprecise" === symbol.attribute.pickMode) return !0;
|
|
35989
|
-
}
|
|
35990
|
-
pickContext.highPerformanceSave();
|
|
35991
|
-
const symbolAttribute = symbol.getGraphicTheme(),
|
|
35992
|
-
data = this.transform(symbol, symbolAttribute, pickContext),
|
|
35993
|
-
{
|
|
35994
|
-
x: x,
|
|
35995
|
-
y: y,
|
|
35996
|
-
z: z,
|
|
35997
|
-
lastModelMatrix: lastModelMatrix
|
|
35998
|
-
} = data;
|
|
35999
|
-
let pickPoint = point;
|
|
36000
|
-
if (pickContext.camera) {
|
|
36001
|
-
pickPoint = point.clone();
|
|
36002
|
-
const globalMatrix = symbol.parent.globalTransMatrix;
|
|
36003
|
-
pickPoint.x = globalMatrix.a * point.x + globalMatrix.c * point.y + globalMatrix.e, pickPoint.y = globalMatrix.b * point.x + globalMatrix.d * point.y + globalMatrix.f;
|
|
36004
|
-
}
|
|
36005
|
-
this.canvasRenderer.z = z;
|
|
36006
|
-
let picked = !1;
|
|
36007
|
-
return this.canvasRenderer.drawShape(symbol, pickContext, x, y, {}, null, (context, symbolAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(pickPoint.x, pickPoint.y), picked), (context, symbolAttribute, themeAttribute) => {
|
|
36008
|
-
if (picked) return !0;
|
|
36009
|
-
const lineWidth = symbolAttribute.lineWidth || themeAttribute.lineWidth,
|
|
36010
|
-
pickStrokeBuffer = symbolAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
|
|
36011
|
-
keepStrokeScale = symbolAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
|
|
36012
|
-
return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(pickPoint.x, pickPoint.y), picked;
|
|
36013
|
-
}), this.canvasRenderer.z = 0, pickContext.modelMatrix !== lastModelMatrix && mat4Allocate.free(pickContext.modelMatrix), pickContext.modelMatrix = lastModelMatrix, pickContext.highPerformanceRestore(), picked;
|
|
36014
|
-
}
|
|
36015
|
-
}
|
|
36016
|
-
|
|
36017
|
-
let loadSymbolPick$1 = !1;
|
|
36018
|
-
function bindSymbolCanvasPickerContribution(container) {
|
|
36019
|
-
loadSymbolPick$1 || (loadSymbolPick$1 = !0, container.bind(CanvasSymbolPicker).toDynamicValue(() => new DefaultCanvasSymbolPicker(resolveContainerBinding(container, SymbolRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasSymbolPicker));
|
|
36020
|
-
}
|
|
36021
|
-
|
|
36022
|
-
class DefaultCanvasTextPicker extends Base3dPicker {
|
|
36023
|
-
constructor(canvasRenderer) {
|
|
36024
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "text", this.numberType = TEXT_NUMBER_TYPE;
|
|
36025
|
-
}
|
|
36026
|
-
contains(text, point, params) {
|
|
36027
|
-
const {
|
|
36028
|
-
pickContext: pickContext
|
|
36029
|
-
} = null != params ? params : {};
|
|
36030
|
-
if (!pickContext) return !1;
|
|
36031
|
-
const bounds = text.AABBBounds;
|
|
36032
|
-
if (!pickContext.camera) return !!bounds.containsPoint(point);
|
|
36033
|
-
pickContext.highPerformanceSave();
|
|
36034
|
-
const textAttribute = text.getGraphicTheme(),
|
|
36035
|
-
{
|
|
36036
|
-
keepDirIn3d = textAttribute.keepDirIn3d
|
|
36037
|
-
} = text.attribute,
|
|
36038
|
-
computed3dMatrix = !keepDirIn3d,
|
|
36039
|
-
data = this.transform(text, textAttribute, pickContext, computed3dMatrix),
|
|
36040
|
-
{
|
|
36041
|
-
x: x,
|
|
36042
|
-
y: y,
|
|
36043
|
-
z: z,
|
|
36044
|
-
lastModelMatrix: lastModelMatrix
|
|
36045
|
-
} = data;
|
|
36046
|
-
this.canvasRenderer.z = z;
|
|
36047
|
-
let pickPoint = point;
|
|
36048
|
-
if (pickContext.camera) {
|
|
36049
|
-
pickPoint = point.clone();
|
|
36050
|
-
const globalMatrix = text.parent.globalTransMatrix;
|
|
36051
|
-
pickPoint.x = globalMatrix.a * point.x + globalMatrix.c * point.y + globalMatrix.e, pickPoint.y = globalMatrix.b * point.x + globalMatrix.d * point.y + globalMatrix.f;
|
|
36052
|
-
}
|
|
36053
|
-
let picked = !1;
|
|
36054
|
-
return this.canvasRenderer.drawShape(text, pickContext, x, y, {}, null, (context, symbolAttribute, themeAttribute) => {
|
|
36055
|
-
if (picked) return !0;
|
|
36056
|
-
const {
|
|
36057
|
-
fontSize = textAttribute.fontSize,
|
|
36058
|
-
textBaseline = textAttribute.textBaseline,
|
|
36059
|
-
textAlign = textAttribute.textAlign
|
|
36060
|
-
} = text.attribute,
|
|
36061
|
-
bounds = text.AABBBounds,
|
|
36062
|
-
height = bounds.height(),
|
|
36063
|
-
width = bounds.width(),
|
|
36064
|
-
offsetY = textLayoutOffsetY(textBaseline, height, fontSize),
|
|
36065
|
-
offsetX = textDrawOffsetX(textAlign, width);
|
|
36066
|
-
return context.rect(offsetX + x, offsetY + y, width, height, z), picked = context.isPointInPath(pickPoint.x, pickPoint.y), picked;
|
|
36067
|
-
}, (context, symbolAttribute, themeAttribute) => picked), this.canvasRenderer.z = 0, pickContext.modelMatrix !== lastModelMatrix && mat4Allocate.free(pickContext.modelMatrix), pickContext.modelMatrix = lastModelMatrix, pickContext.highPerformanceRestore(), picked;
|
|
36068
|
-
}
|
|
36069
|
-
}
|
|
36070
|
-
|
|
36071
|
-
let loadTextPick$1 = !1;
|
|
36072
|
-
function bindTextCanvasPickerContribution(container) {
|
|
36073
|
-
loadTextPick$1 || (loadTextPick$1 = !0, container.bind(CanvasTextPicker).toDynamicValue(() => new DefaultCanvasTextPicker(resolveContainerBinding(container, TextRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasTextPicker));
|
|
36074
|
-
}
|
|
36075
|
-
|
|
36076
36427
|
class DefaultCanvasPickerService extends DefaultPickService {
|
|
36077
36428
|
constructor(contributions, drawContribution, pickItemInterceptorContributions, pickServiceInterceptorContributions) {
|
|
36078
36429
|
super(pickItemInterceptorContributions, pickServiceInterceptorContributions), this.contributions = contributions, this.drawContribution = drawContribution, this.pickItemInterceptorContributions = pickItemInterceptorContributions, this.pickServiceInterceptorContributions = pickServiceInterceptorContributions, this.global.hooks.onSetEnv.tap("canvas-picker-service", (_, env, global) => {
|
|
@@ -36382,78 +36733,32 @@
|
|
|
36382
36733
|
register: registerShadowRootGraphic
|
|
36383
36734
|
}, {
|
|
36384
36735
|
register: registerStarGraphic,
|
|
36385
|
-
bindModule: starModule
|
|
36386
|
-
}, {
|
|
36387
|
-
register: registerSymbolGraphic,
|
|
36388
|
-
bindModule: symbolModule
|
|
36389
|
-
}, {
|
|
36390
|
-
register: registerTextGraphic,
|
|
36391
|
-
bindModule: textModule
|
|
36392
|
-
}, {
|
|
36393
|
-
register: registerWrapTextGraphic
|
|
36394
|
-
}];
|
|
36395
|
-
let standardGraphicsInstalled = !1;
|
|
36396
|
-
function ensureStandardGraphicsInstalled() {
|
|
36397
|
-
if (standardGraphicsInstalled) return;
|
|
36398
|
-
const bindingContext = getRuntimeInstallerBindingContext();
|
|
36399
|
-
standardGraphicsInstalled = !0, standardGraphicInstallSteps.forEach(({
|
|
36400
|
-
register: register,
|
|
36401
|
-
bindModule: bindModule
|
|
36402
|
-
}) => {
|
|
36403
|
-
register(), null == bindModule || bindModule({
|
|
36404
|
-
bind: bindingContext.bind
|
|
36405
|
-
});
|
|
36406
|
-
}), refreshRuntimeInstallerContributions();
|
|
36407
|
-
}
|
|
36408
|
-
function installStandardGraphicsToApp(app) {
|
|
36409
|
-
configureRuntimeApplicationForApp(app), ensureStandardGraphicsInstalled(), installRuntimeDrawContributionsToApp(app), installRuntimeGraphicRenderersToApp(app);
|
|
36410
|
-
}
|
|
36411
|
-
|
|
36412
|
-
const browser = isBrowserEnv();
|
|
36413
|
-
|
|
36414
|
-
class DefaultMathArcPicker extends PickerBase {
|
|
36415
|
-
constructor(canvasRenderer) {
|
|
36416
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "arc", this.numberType = ARC_NUMBER_TYPE;
|
|
36417
|
-
}
|
|
36418
|
-
}
|
|
36419
|
-
|
|
36420
|
-
let loadArcPick = !1;
|
|
36421
|
-
function bindArcMathPickerContribution(container) {
|
|
36422
|
-
loadArcPick || (loadArcPick = !0, container.bind(MathArcPicker).toDynamicValue(() => new DefaultMathArcPicker(resolveContainerBinding(container, ArcRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathArcPicker));
|
|
36423
|
-
}
|
|
36424
|
-
|
|
36425
|
-
function _registerArc() {
|
|
36426
|
-
if (_registerArc.__loaded) return;
|
|
36427
|
-
_registerArc.__loaded = !0;
|
|
36428
|
-
const legacyContext = getLegacyBindingContext();
|
|
36429
|
-
registerArcGraphic(), arcModule({
|
|
36430
|
-
bind: legacyContext.bind
|
|
36431
|
-
}), browser ? bindArcCanvasPickerContribution(legacyContext) : bindArcMathPickerContribution(legacyContext);
|
|
36432
|
-
}
|
|
36433
|
-
_registerArc.__loaded = !1;
|
|
36434
|
-
const registerArc = _registerArc;
|
|
36435
|
-
|
|
36436
|
-
class DefaultMathAreaPicker extends PickerBase {
|
|
36437
|
-
constructor(canvasRenderer) {
|
|
36438
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "area", this.numberType = AREA_NUMBER_TYPE;
|
|
36439
|
-
}
|
|
36440
|
-
}
|
|
36441
|
-
|
|
36442
|
-
let loadAreaPick = !1;
|
|
36443
|
-
function bindAreaMathPickerContribution(container) {
|
|
36444
|
-
loadAreaPick || (loadAreaPick = !0, container.bind(MathAreaPicker).toDynamicValue(() => new DefaultMathAreaPicker(resolveContainerBinding(container, AreaRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathAreaPicker));
|
|
36736
|
+
bindModule: starModule
|
|
36737
|
+
}, {
|
|
36738
|
+
register: registerSymbolGraphic,
|
|
36739
|
+
bindModule: symbolModule
|
|
36740
|
+
}, {
|
|
36741
|
+
register: registerTextGraphic,
|
|
36742
|
+
bindModule: textModule
|
|
36743
|
+
}, {
|
|
36744
|
+
register: registerWrapTextGraphic
|
|
36745
|
+
}];
|
|
36746
|
+
let standardGraphicsInstalled = !1;
|
|
36747
|
+
function ensureStandardGraphicsInstalled() {
|
|
36748
|
+
if (standardGraphicsInstalled) return;
|
|
36749
|
+
const bindingContext = getRuntimeInstallerBindingContext();
|
|
36750
|
+
standardGraphicsInstalled = !0, standardGraphicInstallSteps.forEach(({
|
|
36751
|
+
register: register,
|
|
36752
|
+
bindModule: bindModule
|
|
36753
|
+
}) => {
|
|
36754
|
+
register(), null == bindModule || bindModule({
|
|
36755
|
+
bind: bindingContext.bind
|
|
36756
|
+
});
|
|
36757
|
+
}), refreshRuntimeInstallerContributions();
|
|
36445
36758
|
}
|
|
36446
|
-
|
|
36447
|
-
|
|
36448
|
-
if (_registerArea.__loaded) return;
|
|
36449
|
-
_registerArea.__loaded = !0;
|
|
36450
|
-
const legacyContext = getLegacyBindingContext();
|
|
36451
|
-
registerAreaGraphic(), areaModule({
|
|
36452
|
-
bind: legacyContext.bind
|
|
36453
|
-
}), browser ? bindAreaCanvasPickerContribution(legacyContext) : bindAreaMathPickerContribution(legacyContext);
|
|
36759
|
+
function installStandardGraphicsToApp(app) {
|
|
36760
|
+
configureRuntimeApplicationForApp(app), ensureStandardGraphicsInstalled(), installRuntimeDrawContributionsToApp(app), installRuntimeGraphicRenderersToApp(app);
|
|
36454
36761
|
}
|
|
36455
|
-
_registerArea.__loaded = !1;
|
|
36456
|
-
const registerArea = _registerArea;
|
|
36457
36762
|
|
|
36458
36763
|
class DefaultMathCirclePicker extends PickerBase {
|
|
36459
36764
|
constructor(canvasRenderer) {
|
|
@@ -36477,181 +36782,6 @@
|
|
|
36477
36782
|
_registerCircle.__loaded = !1;
|
|
36478
36783
|
const registerCircle = _registerCircle;
|
|
36479
36784
|
|
|
36480
|
-
class DefaultMathGlyphPicker extends GlyphPickerBase {
|
|
36481
|
-
constructor(canvasRenderer) {
|
|
36482
|
-
super(), this.canvasRenderer = canvasRenderer;
|
|
36483
|
-
}
|
|
36484
|
-
}
|
|
36485
|
-
|
|
36486
|
-
let loadGlyphPick = !1;
|
|
36487
|
-
function bindGlyphMathPickerContribution(container) {
|
|
36488
|
-
loadGlyphPick || (loadGlyphPick = !0, container.bind(MathGlyphPicker).toDynamicValue(() => new DefaultMathGlyphPicker(resolveContainerBinding(container, GlyphRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathGlyphPicker));
|
|
36489
|
-
}
|
|
36490
|
-
|
|
36491
|
-
function _registerGlyph() {
|
|
36492
|
-
if (_registerGlyph.__loaded) return;
|
|
36493
|
-
_registerGlyph.__loaded = !0;
|
|
36494
|
-
const legacyContext = getLegacyBindingContext();
|
|
36495
|
-
registerGlyphGraphic(), glyphModule({
|
|
36496
|
-
bind: legacyContext.bind
|
|
36497
|
-
}), browser ? bindGlyphCanvasPickerContribution(legacyContext) : bindGlyphMathPickerContribution(legacyContext);
|
|
36498
|
-
}
|
|
36499
|
-
_registerGlyph.__loaded = !1;
|
|
36500
|
-
const registerGlyph = _registerGlyph;
|
|
36501
|
-
|
|
36502
|
-
function _registerGroup() {
|
|
36503
|
-
_registerGroup.__loaded || (_registerGroup.__loaded = !0, registerGroupGraphic());
|
|
36504
|
-
}
|
|
36505
|
-
_registerGroup.__loaded = !1;
|
|
36506
|
-
const registerGroup = _registerGroup;
|
|
36507
|
-
|
|
36508
|
-
class DefaultMathImagePicker {
|
|
36509
|
-
constructor() {
|
|
36510
|
-
this.type = "image", this.numberType = IMAGE_NUMBER_TYPE;
|
|
36511
|
-
}
|
|
36512
|
-
contains(image, point, params) {
|
|
36513
|
-
const {
|
|
36514
|
-
pickContext: pickContext
|
|
36515
|
-
} = null != params ? params : {};
|
|
36516
|
-
return !!pickContext && !!image.AABBBounds.containsPoint(point);
|
|
36517
|
-
}
|
|
36518
|
-
}
|
|
36519
|
-
|
|
36520
|
-
let loadImagePick = !1;
|
|
36521
|
-
function bindImageMathPickerContribution(container) {
|
|
36522
|
-
loadImagePick || (loadImagePick = !0, container.bind(MathImagePicker).toDynamicValue(() => new DefaultMathImagePicker()).inSingletonScope(), container.bind(MathPickerContribution).toService(MathImagePicker));
|
|
36523
|
-
}
|
|
36524
|
-
|
|
36525
|
-
function _registerImage() {
|
|
36526
|
-
if (_registerImage.__loaded) return;
|
|
36527
|
-
_registerImage.__loaded = !0;
|
|
36528
|
-
const legacyContext = getLegacyBindingContext();
|
|
36529
|
-
registerImageGraphic(), imageModule({
|
|
36530
|
-
bind: legacyContext.bind
|
|
36531
|
-
}), browser ? bindImageCanvasPickerContribution(legacyContext) : bindImageMathPickerContribution(legacyContext);
|
|
36532
|
-
}
|
|
36533
|
-
_registerImage.__loaded = !1;
|
|
36534
|
-
const registerImage = _registerImage;
|
|
36535
|
-
|
|
36536
|
-
class DefaultMathLinePicker extends PickerBase {
|
|
36537
|
-
constructor(canvasRenderer) {
|
|
36538
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "line", this.numberType = LINE_NUMBER_TYPE;
|
|
36539
|
-
}
|
|
36540
|
-
}
|
|
36541
|
-
|
|
36542
|
-
let loadLinePick = !1;
|
|
36543
|
-
function bindLineMathPickerContribution(container) {
|
|
36544
|
-
loadLinePick || (loadLinePick = !0, container.bind(MathLinePicker).toDynamicValue(() => new DefaultMathLinePicker(resolveContainerBinding(container, LineRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathLinePicker));
|
|
36545
|
-
}
|
|
36546
|
-
|
|
36547
|
-
function _registerLine() {
|
|
36548
|
-
if (_registerLine.__loaded) return;
|
|
36549
|
-
_registerLine.__loaded = !0;
|
|
36550
|
-
const legacyContext = getLegacyBindingContext();
|
|
36551
|
-
registerLineGraphic(), lineModule({
|
|
36552
|
-
bind: legacyContext.bind
|
|
36553
|
-
}), browser ? bindLineCanvasPickerContribution(legacyContext) : bindLineMathPickerContribution(legacyContext);
|
|
36554
|
-
}
|
|
36555
|
-
_registerLine.__loaded = !1;
|
|
36556
|
-
const registerLine = _registerLine;
|
|
36557
|
-
|
|
36558
|
-
class DefaultMathPathPicker extends PickerBase {
|
|
36559
|
-
constructor(canvasRenderer) {
|
|
36560
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "path", this.numberType = PATH_NUMBER_TYPE;
|
|
36561
|
-
}
|
|
36562
|
-
}
|
|
36563
|
-
|
|
36564
|
-
let loadPathPick = !1;
|
|
36565
|
-
function bindPathMathPickerContribution(container) {
|
|
36566
|
-
loadPathPick || (loadPathPick = !0, container.bind(MathPathPicker).toDynamicValue(() => new DefaultMathPathPicker(resolveContainerBinding(container, PathRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathPathPicker));
|
|
36567
|
-
}
|
|
36568
|
-
|
|
36569
|
-
function _registerPath() {
|
|
36570
|
-
if (_registerPath.__loaded) return;
|
|
36571
|
-
_registerPath.__loaded = !0;
|
|
36572
|
-
const legacyContext = getLegacyBindingContext();
|
|
36573
|
-
registerPathGraphic(), pathModule({
|
|
36574
|
-
bind: legacyContext.bind
|
|
36575
|
-
}), browser ? bindPathCanvasPickerContribution(legacyContext) : bindPathMathPickerContribution(legacyContext);
|
|
36576
|
-
}
|
|
36577
|
-
_registerPath.__loaded = !1;
|
|
36578
|
-
const registerPath = _registerPath;
|
|
36579
|
-
|
|
36580
|
-
class DefaultMathPolygonPicker extends PickerBase {
|
|
36581
|
-
constructor(canvasRenderer) {
|
|
36582
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "polygon", this.numberType = POLYGON_NUMBER_TYPE;
|
|
36583
|
-
}
|
|
36584
|
-
}
|
|
36585
|
-
|
|
36586
|
-
let loadPolygonPick = !1;
|
|
36587
|
-
function bindPolygonMathPickerContribution(container) {
|
|
36588
|
-
loadPolygonPick || (loadPolygonPick = !0, container.bind(MathPolygonPicker).toDynamicValue(() => new DefaultMathPolygonPicker(resolveContainerBinding(container, PolygonRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathPolygonPicker));
|
|
36589
|
-
}
|
|
36590
|
-
|
|
36591
|
-
function _registerPolygon() {
|
|
36592
|
-
if (_registerPolygon.__loaded) return;
|
|
36593
|
-
_registerPolygon.__loaded = !0;
|
|
36594
|
-
const legacyContext = getLegacyBindingContext();
|
|
36595
|
-
registerPolygonGraphic(), polygonModule({
|
|
36596
|
-
bind: legacyContext.bind
|
|
36597
|
-
}), browser ? bindPolygonCanvasPickerContribution(legacyContext) : bindPolygonMathPickerContribution(legacyContext);
|
|
36598
|
-
}
|
|
36599
|
-
_registerPolygon.__loaded = !1;
|
|
36600
|
-
const registerPolygon = _registerPolygon;
|
|
36601
|
-
|
|
36602
|
-
class DefaultMathRectPicker extends RectPickerBase {
|
|
36603
|
-
constructor(canvasRenderer) {
|
|
36604
|
-
super(), this.canvasRenderer = canvasRenderer;
|
|
36605
|
-
}
|
|
36606
|
-
}
|
|
36607
|
-
|
|
36608
|
-
let loadRectPick = !1;
|
|
36609
|
-
function bindRectMathPickerContribution(container) {
|
|
36610
|
-
loadRectPick || (loadRectPick = !0, container.bind(MathRectPicker).toDynamicValue(() => new DefaultMathRectPicker(resolveContainerBinding(container, RectRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathRectPicker));
|
|
36611
|
-
}
|
|
36612
|
-
|
|
36613
|
-
function _registerRect() {
|
|
36614
|
-
if (_registerRect.__loaded) return;
|
|
36615
|
-
_registerRect.__loaded = !0;
|
|
36616
|
-
const legacyContext = getLegacyBindingContext();
|
|
36617
|
-
registerRectGraphic(), rectModule({
|
|
36618
|
-
bind: legacyContext.bind
|
|
36619
|
-
}), browser ? bindRectCanvasPickerContribution(legacyContext) : bindRectMathPickerContribution(legacyContext);
|
|
36620
|
-
}
|
|
36621
|
-
_registerRect.__loaded = !1;
|
|
36622
|
-
const registerRect = _registerRect;
|
|
36623
|
-
|
|
36624
|
-
class DefaultMathRichTextPicker {
|
|
36625
|
-
constructor(canvasRenderer) {
|
|
36626
|
-
this.canvasRenderer = canvasRenderer, this.type = "richtext", this.numberType = RICHTEXT_NUMBER_TYPE;
|
|
36627
|
-
}
|
|
36628
|
-
contains(richtext, point, params) {
|
|
36629
|
-
return !!richtext.AABBBounds.containsPoint(point);
|
|
36630
|
-
}
|
|
36631
|
-
}
|
|
36632
|
-
|
|
36633
|
-
let loadRichTextPick = !1;
|
|
36634
|
-
function bindRichTextMathPickerContribution(container) {
|
|
36635
|
-
loadRichTextPick || (loadRichTextPick = !0, container.bind(MathRichTextPicker).toDynamicValue(() => new DefaultMathRichTextPicker(resolveContainerBinding(container, RichTextRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathRichTextPicker));
|
|
36636
|
-
}
|
|
36637
|
-
|
|
36638
|
-
function _registerRichtext() {
|
|
36639
|
-
if (_registerRichtext.__loaded) return;
|
|
36640
|
-
_registerRichtext.__loaded = !0;
|
|
36641
|
-
const legacyContext = getLegacyBindingContext();
|
|
36642
|
-
registerRichtextGraphic(), richtextModule({
|
|
36643
|
-
bind: legacyContext.bind
|
|
36644
|
-
}), browser ? bindRichtextCanvasPickerContribution(legacyContext) : bindRichTextMathPickerContribution(legacyContext);
|
|
36645
|
-
}
|
|
36646
|
-
_registerRichtext.__loaded = !1;
|
|
36647
|
-
const registerRichtext = _registerRichtext;
|
|
36648
|
-
|
|
36649
|
-
function _registerShadowRoot() {
|
|
36650
|
-
_registerShadowRoot.__loaded || (_registerShadowRoot.__loaded = !0, registerShadowRootGraphic());
|
|
36651
|
-
}
|
|
36652
|
-
_registerShadowRoot.__loaded = !1;
|
|
36653
|
-
const registerShadowRoot = _registerShadowRoot;
|
|
36654
|
-
|
|
36655
36785
|
function _registerStar() {
|
|
36656
36786
|
if (_registerStar.__loaded) return;
|
|
36657
36787
|
_registerStar.__loaded = !0;
|
|
@@ -36663,53 +36793,6 @@
|
|
|
36663
36793
|
_registerStar.__loaded = !1;
|
|
36664
36794
|
const registerStar = _registerStar;
|
|
36665
36795
|
|
|
36666
|
-
class DefaultMathSymbolPicker extends PickerBase {
|
|
36667
|
-
constructor(canvasRenderer) {
|
|
36668
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "symbol", this.numberType = SYMBOL_NUMBER_TYPE;
|
|
36669
|
-
}
|
|
36670
|
-
}
|
|
36671
|
-
|
|
36672
|
-
let loadSymbolPick = !1;
|
|
36673
|
-
function bindSymbolMathPickerContribution(container) {
|
|
36674
|
-
loadSymbolPick || (loadSymbolPick = !0, container.bind(MathSymbolPicker).toDynamicValue(() => new DefaultMathSymbolPicker(resolveContainerBinding(container, SymbolRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathSymbolPicker));
|
|
36675
|
-
}
|
|
36676
|
-
|
|
36677
|
-
function _registerSymbol() {
|
|
36678
|
-
if (_registerSymbol.__loaded) return;
|
|
36679
|
-
_registerSymbol.__loaded = !0;
|
|
36680
|
-
const legacyContext = getLegacyBindingContext();
|
|
36681
|
-
registerSymbolGraphic(), symbolModule({
|
|
36682
|
-
bind: legacyContext.bind
|
|
36683
|
-
}), browser ? bindSymbolCanvasPickerContribution(legacyContext) : bindSymbolMathPickerContribution(legacyContext);
|
|
36684
|
-
}
|
|
36685
|
-
_registerSymbol.__loaded = !1;
|
|
36686
|
-
const registerSymbol = _registerSymbol;
|
|
36687
|
-
|
|
36688
|
-
class DefaultMathTextPicker {
|
|
36689
|
-
constructor() {
|
|
36690
|
-
this.type = "text", this.numberType = TEXT_NUMBER_TYPE;
|
|
36691
|
-
}
|
|
36692
|
-
contains(text, point, params) {
|
|
36693
|
-
return !!text.AABBBounds.containsPoint(point);
|
|
36694
|
-
}
|
|
36695
|
-
}
|
|
36696
|
-
|
|
36697
|
-
let loadTextPick = !1;
|
|
36698
|
-
function bindTextMathPickerContribution(container) {
|
|
36699
|
-
loadTextPick || (loadTextPick = !0, container.bind(MathTextPicker).toDynamicValue(() => new DefaultMathTextPicker()).inSingletonScope(), container.bind(MathPickerContribution).toService(MathTextPicker));
|
|
36700
|
-
}
|
|
36701
|
-
|
|
36702
|
-
function _registerText() {
|
|
36703
|
-
if (_registerText.__loaded) return;
|
|
36704
|
-
_registerText.__loaded = !0;
|
|
36705
|
-
const legacyContext = getLegacyBindingContext();
|
|
36706
|
-
registerTextGraphic(), textModule({
|
|
36707
|
-
bind: legacyContext.bind
|
|
36708
|
-
}), browser ? bindTextCanvasPickerContribution(legacyContext) : bindTextMathPickerContribution(legacyContext);
|
|
36709
|
-
}
|
|
36710
|
-
_registerText.__loaded = !1;
|
|
36711
|
-
const registerText = _registerText;
|
|
36712
|
-
|
|
36713
36796
|
function _registerWrapText() {
|
|
36714
36797
|
_registerWrapText.__loaded || (_registerWrapText.__loaded = !0, registerWrapTextGraphic());
|
|
36715
36798
|
}
|