@visactor/vchart 2.1.3-alpha.3 → 2.1.3-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/es5/index.js +1 -1
- package/build/index.es.js +16 -16
- package/build/index.js +954 -884
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/chart/index.js +1 -1
- package/cjs/chart/stack.js +1 -1
- package/cjs/chart/util.js +1 -1
- package/cjs/compile/state-manager.js +2 -1
- package/cjs/component/util.js +1 -2
- package/cjs/constant/marker.js +2 -1
- package/cjs/constant/scroll-bar.js +1 -2
- package/cjs/core/factory-registry.js +1 -1
- package/cjs/core/factory.js +1 -1
- package/cjs/core/index.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/chart/index.js +1 -1
- package/esm/chart/stack.js +1 -1
- package/esm/chart/util.js +1 -1
- package/esm/compile/state-manager.js +2 -1
- package/esm/component/util.js +1 -2
- package/esm/constant/marker.js +2 -1
- package/esm/constant/scroll-bar.js +1 -2
- package/esm/core/factory-registry.js +1 -1
- package/esm/core/factory.js +1 -1
- package/esm/core/index.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) {
|
|
@@ -19046,7 +19056,6 @@
|
|
|
19046
19056
|
}
|
|
19047
19057
|
};
|
|
19048
19058
|
}
|
|
19049
|
-
const sharedGraphicFactory = new GraphicFactory();
|
|
19050
19059
|
class GraphicCreator {
|
|
19051
19060
|
constructor() {
|
|
19052
19061
|
this.store = new Map();
|
|
@@ -19061,13 +19070,25 @@
|
|
|
19061
19070
|
return this.store.has(name) ? createGraphic$1(name, attributes) : null;
|
|
19062
19071
|
}
|
|
19063
19072
|
}
|
|
19064
|
-
const
|
|
19073
|
+
const GRAPHIC_REGISTRY_SYMBOL = Symbol.for("@visactor/vrender-core/graphic-registry");
|
|
19074
|
+
function createGraphicRegistryState() {
|
|
19075
|
+
return {
|
|
19076
|
+
graphicCreator: new GraphicCreator(),
|
|
19077
|
+
graphicFactory: new GraphicFactory()
|
|
19078
|
+
};
|
|
19079
|
+
}
|
|
19080
|
+
function getGraphicRegistryState() {
|
|
19081
|
+
const scope = globalThis;
|
|
19082
|
+
return scope[GRAPHIC_REGISTRY_SYMBOL] || (scope[GRAPHIC_REGISTRY_SYMBOL] = createGraphicRegistryState()), scope[GRAPHIC_REGISTRY_SYMBOL];
|
|
19083
|
+
}
|
|
19084
|
+
const sharedGraphicRegistry = getGraphicRegistryState();
|
|
19085
|
+
const graphicCreator$1 = sharedGraphicRegistry.graphicCreator;
|
|
19065
19086
|
function registerGraphic(name, creator) {
|
|
19066
19087
|
if (!name) throw new Error("Graphic registration requires a non-empty graphic type");
|
|
19067
|
-
graphicCreator$1.registerStore(name, creator),
|
|
19088
|
+
graphicCreator$1.registerStore(name, creator), sharedGraphicRegistry.graphicFactory.register(name, createGraphicCtor(creator));
|
|
19068
19089
|
}
|
|
19069
19090
|
function createGraphic$1(name, attributes) {
|
|
19070
|
-
return
|
|
19091
|
+
return sharedGraphicRegistry.graphicFactory.create(name, attributes);
|
|
19071
19092
|
}
|
|
19072
19093
|
|
|
19073
19094
|
class Hook {
|
|
@@ -19776,6 +19797,17 @@
|
|
|
19776
19797
|
}
|
|
19777
19798
|
}
|
|
19778
19799
|
|
|
19800
|
+
const FACTORY_STATE_SYMBOL = Symbol.for("@visactor/vrender-core/factory-state");
|
|
19801
|
+
function createFactoryState() {
|
|
19802
|
+
return {
|
|
19803
|
+
pluginClasses: {}
|
|
19804
|
+
};
|
|
19805
|
+
}
|
|
19806
|
+
function getFactoryState() {
|
|
19807
|
+
const scope = globalThis;
|
|
19808
|
+
return scope[FACTORY_STATE_SYMBOL] || (scope[FACTORY_STATE_SYMBOL] = createFactoryState()), scope[FACTORY_STATE_SYMBOL];
|
|
19809
|
+
}
|
|
19810
|
+
|
|
19779
19811
|
class DefaultGlobalPickerService {
|
|
19780
19812
|
constructor() {
|
|
19781
19813
|
this.global = application.global, this.global.hooks.onSetEnv.tap("global-picker-service", (lastEnv, env, global) => {
|
|
@@ -21637,7 +21669,7 @@
|
|
|
21637
21669
|
return Factory._pluginClasses[pluginKey];
|
|
21638
21670
|
}
|
|
21639
21671
|
};
|
|
21640
|
-
Factory$1._pluginClasses =
|
|
21672
|
+
Factory$1._pluginClasses = getFactoryState().pluginClasses;
|
|
21641
21673
|
|
|
21642
21674
|
function defaultLayerHandlerFactory(layerMode) {
|
|
21643
21675
|
const handlerFactory = application.layerHandlerFactory;
|
|
@@ -21717,6 +21749,17 @@
|
|
|
21717
21749
|
const DynamicLayerHandlerContribution = Symbol.for("DynamicLayerHandlerContribution");
|
|
21718
21750
|
const VirtualLayerHandlerContribution = Symbol.for("VirtualLayerHandlerContribution");
|
|
21719
21751
|
|
|
21752
|
+
const CONTRIBUTION_STORE_STATE_SYMBOL = Symbol.for("@visactor/vrender-core/contribution-store-state");
|
|
21753
|
+
function createContributionStoreState() {
|
|
21754
|
+
return {
|
|
21755
|
+
store: new Map()
|
|
21756
|
+
};
|
|
21757
|
+
}
|
|
21758
|
+
function getContributionStoreState() {
|
|
21759
|
+
const scope = globalThis;
|
|
21760
|
+
return scope[CONTRIBUTION_STORE_STATE_SYMBOL] || (scope[CONTRIBUTION_STORE_STATE_SYMBOL] = createContributionStoreState()), scope[CONTRIBUTION_STORE_STATE_SYMBOL];
|
|
21761
|
+
}
|
|
21762
|
+
|
|
21720
21763
|
const ContributionProvider = Symbol("ContributionProvider");
|
|
21721
21764
|
class ContributionProviderCache {
|
|
21722
21765
|
constructor(serviceIdentifier, container) {
|
|
@@ -21759,7 +21802,7 @@
|
|
|
21759
21802
|
});
|
|
21760
21803
|
}
|
|
21761
21804
|
}
|
|
21762
|
-
ContributionStore.store =
|
|
21805
|
+
ContributionStore.store = getContributionStoreState().store;
|
|
21763
21806
|
|
|
21764
21807
|
class ATextMeasure {
|
|
21765
21808
|
constructor() {
|
|
@@ -24076,13 +24119,26 @@
|
|
|
24076
24119
|
return new LegacyBindingContext();
|
|
24077
24120
|
}
|
|
24078
24121
|
|
|
24079
|
-
const
|
|
24122
|
+
const LEGACY_BOOTSTRAP_STATE_SYMBOL = Symbol.for("@visactor/vrender-core/legacy-bootstrap-state");
|
|
24123
|
+
function createLegacyBootstrapState() {
|
|
24124
|
+
return {
|
|
24125
|
+
legacyBindingContext: createLegacyBindingContext(),
|
|
24126
|
+
preloaded: !1
|
|
24127
|
+
};
|
|
24128
|
+
}
|
|
24129
|
+
function getLegacyBootstrapState() {
|
|
24130
|
+
const scope = globalThis;
|
|
24131
|
+
return scope[LEGACY_BOOTSTRAP_STATE_SYMBOL] || (scope[LEGACY_BOOTSTRAP_STATE_SYMBOL] = createLegacyBootstrapState()), scope[LEGACY_BOOTSTRAP_STATE_SYMBOL];
|
|
24132
|
+
}
|
|
24133
|
+
|
|
24134
|
+
const legacyBootstrapState = getLegacyBootstrapState(),
|
|
24135
|
+
legacyBindingContext = legacyBootstrapState.legacyBindingContext;
|
|
24080
24136
|
function getLegacyTarget(resolver) {
|
|
24081
24137
|
let target;
|
|
24082
24138
|
return () => (void 0 === target && (target = resolver()), target);
|
|
24083
24139
|
}
|
|
24084
24140
|
function preLoadAllModule() {
|
|
24085
|
-
|
|
24141
|
+
legacyBootstrapState.preloaded || (legacyBootstrapState.preloaded = !0, bindCoreModules({
|
|
24086
24142
|
bind: legacyBindingContext.bind
|
|
24087
24143
|
}), bindGraphicModules({
|
|
24088
24144
|
bind: legacyBindingContext.bind
|
|
@@ -24095,7 +24151,6 @@
|
|
|
24095
24151
|
bind: legacyBindingContext.bind
|
|
24096
24152
|
}), load$1(legacyBindingContext), load(legacyBindingContext));
|
|
24097
24153
|
}
|
|
24098
|
-
preLoadAllModule.__loaded = !1;
|
|
24099
24154
|
function getLegacyBindingContext() {
|
|
24100
24155
|
return legacyBindingContext;
|
|
24101
24156
|
}
|
|
@@ -28357,126 +28412,7 @@
|
|
|
28357
28412
|
}
|
|
28358
28413
|
const textModule = bindTextRenderModule;
|
|
28359
28414
|
|
|
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
|
-
};
|
|
28415
|
+
const browser = isBrowserEnv();
|
|
28480
28416
|
|
|
28481
28417
|
function resolveContainerBinding(container, serviceIdentifier) {
|
|
28482
28418
|
const [instance] = container.getAll(serviceIdentifier);
|
|
@@ -28684,6 +28620,94 @@
|
|
|
28684
28620
|
}
|
|
28685
28621
|
}
|
|
28686
28622
|
|
|
28623
|
+
class DirectionalLight {
|
|
28624
|
+
constructor(dir, color, ambient = .8) {
|
|
28625
|
+
this.dir = dir, this.color = color, this.colorRgb = ColorStore.Get(color, ColorType.Color1), this.ambient = ambient;
|
|
28626
|
+
const length = sqrt$3(dir[0] * dir[0] + dir[1] * dir[1] + dir[2] * dir[2]);
|
|
28627
|
+
this.formatedDir = [dir[0] / length, dir[1] / length, dir[2] / length];
|
|
28628
|
+
}
|
|
28629
|
+
computeColor(normal, color) {
|
|
28630
|
+
const lightDir = this.formatedDir,
|
|
28631
|
+
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);
|
|
28632
|
+
let colorArray;
|
|
28633
|
+
colorArray = isString$1(color) ? ColorStore.Get(color, ColorType.Color1) : color;
|
|
28634
|
+
const lightColorArray = this.colorRgb;
|
|
28635
|
+
return `rgb(${lightColorArray[0] * colorArray[0] * brightness}, ${lightColorArray[1] * colorArray[1] * brightness}, ${lightColorArray[2] * colorArray[2] * brightness})`;
|
|
28636
|
+
}
|
|
28637
|
+
}
|
|
28638
|
+
const registerDirectionalLight = () => {
|
|
28639
|
+
Factory$1.registerPlugin("DirectionalLight", DirectionalLight);
|
|
28640
|
+
};
|
|
28641
|
+
|
|
28642
|
+
class OrthoCamera {
|
|
28643
|
+
set params(params) {
|
|
28644
|
+
this._params = Object.assign({}, params), this._projectionMatrixCached = this.forceGetProjectionMatrix(), this._viewMatrixCached = this.forceGetViewMatrix();
|
|
28645
|
+
}
|
|
28646
|
+
get params() {
|
|
28647
|
+
return Object.assign({}, this._params);
|
|
28648
|
+
}
|
|
28649
|
+
constructor(params) {
|
|
28650
|
+
this.params = params;
|
|
28651
|
+
}
|
|
28652
|
+
getViewMatrix() {
|
|
28653
|
+
return this._viewMatrixCached || (this._viewMatrixCached = mat4Allocate.allocate()), this._viewMatrixCached;
|
|
28654
|
+
}
|
|
28655
|
+
forceGetViewMatrix() {
|
|
28656
|
+
this._viewMatrixCached || (this._viewMatrixCached = mat4Allocate.allocate());
|
|
28657
|
+
const {
|
|
28658
|
+
pos: pos,
|
|
28659
|
+
center: center,
|
|
28660
|
+
up: up
|
|
28661
|
+
} = this.params.viewParams;
|
|
28662
|
+
return lookAt(this._viewMatrixCached, pos, center, up), this._vp || (this._vp = mat4Allocate.allocate()), this._vp = multiplyMat4Mat4(this._vp, this.getProjectionMatrix(), this.getViewMatrix()), this._viewMatrixCached;
|
|
28663
|
+
}
|
|
28664
|
+
getProjectionMatrix() {
|
|
28665
|
+
return this._projectionMatrixCached || (this._projectionMatrixCached = mat4Allocate.allocate()), this._projectionMatrixCached;
|
|
28666
|
+
}
|
|
28667
|
+
forceGetProjectionMatrix() {
|
|
28668
|
+
this._projectionMatrixCached || (this._projectionMatrixCached = mat4Allocate.allocate());
|
|
28669
|
+
const {
|
|
28670
|
+
left: left,
|
|
28671
|
+
top: top,
|
|
28672
|
+
right: right,
|
|
28673
|
+
bottom: bottom
|
|
28674
|
+
} = this._params;
|
|
28675
|
+
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;
|
|
28676
|
+
}
|
|
28677
|
+
getField() {
|
|
28678
|
+
const {
|
|
28679
|
+
fieldRatio = .8,
|
|
28680
|
+
fieldDepth: fieldDepth,
|
|
28681
|
+
left: left,
|
|
28682
|
+
right: right
|
|
28683
|
+
} = this._params;
|
|
28684
|
+
return (null != fieldDepth ? fieldDepth : right - left) * fieldRatio;
|
|
28685
|
+
}
|
|
28686
|
+
getProjectionScale(z) {
|
|
28687
|
+
const field = this.getField();
|
|
28688
|
+
return field / (field + z);
|
|
28689
|
+
}
|
|
28690
|
+
view(x, y, z) {
|
|
28691
|
+
const outP = [0, 0, 0];
|
|
28692
|
+
return transformMat4(outP, [x, y, z], this._viewMatrixCached), outP;
|
|
28693
|
+
}
|
|
28694
|
+
vp(x, y, z) {
|
|
28695
|
+
const outP = [0, 0, 0],
|
|
28696
|
+
{
|
|
28697
|
+
pos: pos
|
|
28698
|
+
} = this._params.viewParams;
|
|
28699
|
+
transformMat4(outP, [x, y, z], this._viewMatrixCached), x = outP[0], y = outP[1], z = outP[2];
|
|
28700
|
+
const sizeProjection = this.getProjectionScale(z);
|
|
28701
|
+
return {
|
|
28702
|
+
x: x * sizeProjection + pos[0],
|
|
28703
|
+
y: y * sizeProjection + pos[1]
|
|
28704
|
+
};
|
|
28705
|
+
}
|
|
28706
|
+
}
|
|
28707
|
+
const registerOrthoCamera = () => {
|
|
28708
|
+
Factory$1.registerPlugin("OrthoCamera", OrthoCamera);
|
|
28709
|
+
};
|
|
28710
|
+
|
|
28687
28711
|
const EMPTY_PICK_ITEM_INTERCEPTOR_PROVIDER = {
|
|
28688
28712
|
getContributions: () => []
|
|
28689
28713
|
},
|
|
@@ -28986,18 +29010,32 @@
|
|
|
28986
29010
|
}
|
|
28987
29011
|
}
|
|
28988
29012
|
|
|
28989
|
-
const
|
|
28990
|
-
|
|
28991
|
-
|
|
28992
|
-
|
|
29013
|
+
const RUNTIME_INSTALLER_STATE_SYMBOL = Symbol.for("@visactor/vrender-core/runtime-installer-state");
|
|
29014
|
+
function createRuntimeInstallerState() {
|
|
29015
|
+
return {
|
|
29016
|
+
runtimeInstallerContext: createLegacyBindingContext(),
|
|
29017
|
+
preloaded: !1,
|
|
29018
|
+
runtimeEntryKeys: new WeakMap(),
|
|
29019
|
+
runtimeDrawContributions: new WeakMap(),
|
|
29020
|
+
loadedRuntimeContributionModules: new WeakMap()
|
|
29021
|
+
};
|
|
29022
|
+
}
|
|
29023
|
+
function getRuntimeInstallerState() {
|
|
29024
|
+
const scope = globalThis;
|
|
29025
|
+
return scope[RUNTIME_INSTALLER_STATE_SYMBOL] || (scope[RUNTIME_INSTALLER_STATE_SYMBOL] = createRuntimeInstallerState()), scope[RUNTIME_INSTALLER_STATE_SYMBOL];
|
|
29026
|
+
}
|
|
29027
|
+
|
|
29028
|
+
const runtimeInstallerState = getRuntimeInstallerState(),
|
|
29029
|
+
runtimeInstallerContext = runtimeInstallerState.runtimeInstallerContext,
|
|
29030
|
+
RUNTIME_RENDERER_NAMESPACE = "vrender:runtime-renderer",
|
|
28993
29031
|
RUNTIME_PICKER_NAMESPACE = "vrender:runtime-picker",
|
|
28994
|
-
runtimeEntryKeys =
|
|
28995
|
-
runtimeDrawContributions =
|
|
28996
|
-
loadedRuntimeContributionModules =
|
|
29032
|
+
runtimeEntryKeys = runtimeInstallerState.runtimeEntryKeys,
|
|
29033
|
+
runtimeDrawContributions = runtimeInstallerState.runtimeDrawContributions,
|
|
29034
|
+
loadedRuntimeContributionModules = runtimeInstallerState.loadedRuntimeContributionModules,
|
|
28997
29035
|
DEFAULT_RUNTIME_CONTRIBUTION_TARGETS = ["graphic-renderer"],
|
|
28998
29036
|
noopUnbindRuntimeContributionService = () => {};
|
|
28999
29037
|
function ensureRuntimeInstallerPreloaded() {
|
|
29000
|
-
|
|
29038
|
+
runtimeInstallerState.preloaded || (runtimeInstallerState.preloaded = !0, bindCoreModules({
|
|
29001
29039
|
bind: runtimeInstallerContext.bind
|
|
29002
29040
|
}), bindGraphicModules({
|
|
29003
29041
|
bind: runtimeInstallerContext.bind
|
|
@@ -29042,7 +29080,8 @@
|
|
|
29042
29080
|
ContributionStore.refreshAllContributions();
|
|
29043
29081
|
}
|
|
29044
29082
|
function getRuntimeInstallerGlobal() {
|
|
29045
|
-
|
|
29083
|
+
var _a;
|
|
29084
|
+
return ensureRuntimeInstallerPreloaded(), null !== (_a = runtimeInstallerState.runtimeGlobal) && void 0 !== _a || (runtimeInstallerState.runtimeGlobal = new DefaultGlobal(createContributionProvider$1(EnvContribution, runtimeInstallerContext))), runtimeInstallerState.runtimeGlobal;
|
|
29046
29085
|
}
|
|
29047
29086
|
function configureRuntimeApplicationForApp(app) {
|
|
29048
29087
|
const bindingContext = getRuntimeInstallerBindingContext(),
|
|
@@ -29649,24 +29688,57 @@
|
|
|
29649
29688
|
return res;
|
|
29650
29689
|
};
|
|
29651
29690
|
|
|
29652
|
-
|
|
29653
|
-
class FlexLayoutPlugin {
|
|
29691
|
+
class ViewTransform3dPlugin {
|
|
29654
29692
|
constructor() {
|
|
29655
|
-
this.name = "
|
|
29656
|
-
|
|
29657
|
-
|
|
29658
|
-
|
|
29659
|
-
|
|
29660
|
-
|
|
29661
|
-
|
|
29662
|
-
|
|
29663
|
-
|
|
29664
|
-
|
|
29665
|
-
|
|
29666
|
-
|
|
29667
|
-
|
|
29668
|
-
|
|
29669
|
-
|
|
29693
|
+
this.name = "ViewTransform3dPlugin", this.activeEvent = "onRegister", this._uid = Generator.GenAutoIncrementId(), this.key = this.name + this._uid, this.onMouseDown = e => {
|
|
29694
|
+
this.option3d || (this.option3d = this.pluginService.stage.option3d), this.option3d && (this.mousedown = !0, this.pageX = e.page.x, this.pageY = e.page.y);
|
|
29695
|
+
}, this.onMouseUp = e => {
|
|
29696
|
+
this.option3d || (this.option3d = this.pluginService.stage.option3d), this.option3d && (this.mousedown = !1);
|
|
29697
|
+
}, this.onMouseMove = e => {
|
|
29698
|
+
var _a, _b;
|
|
29699
|
+
const stage = this.pluginService.stage;
|
|
29700
|
+
if (this.option3d || (this.option3d = stage.option3d), this.option3d && this.mousedown) if (this.pageX && this.pageY) {
|
|
29701
|
+
const deltaX = e.page.x - this.pageX,
|
|
29702
|
+
deltaY = e.page.y - this.pageY;
|
|
29703
|
+
this.pageX = e.page.x, this.pageY = e.page.y;
|
|
29704
|
+
const angle1 = deltaX / 100,
|
|
29705
|
+
angle2 = deltaY / 100;
|
|
29706
|
+
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();
|
|
29707
|
+
} else this.pageX = e.page.x, this.pageY = e.page.y;
|
|
29708
|
+
};
|
|
29709
|
+
}
|
|
29710
|
+
activate(context) {
|
|
29711
|
+
this.pluginService = context;
|
|
29712
|
+
const stage = context.stage;
|
|
29713
|
+
this.option3d = stage.option3d, stage.addEventListener("mousedown", this.onMouseDown), stage.addEventListener("mouseup", this.onMouseUp), stage.addEventListener("mousemove", this.onMouseMove);
|
|
29714
|
+
}
|
|
29715
|
+
deactivate(context) {
|
|
29716
|
+
const stage = context.stage;
|
|
29717
|
+
stage.removeEventListener("mousedown", this.onMouseDown), stage.removeEventListener("mouseup", this.onMouseUp), stage.removeEventListener("mousemove", this.onMouseMove);
|
|
29718
|
+
}
|
|
29719
|
+
}
|
|
29720
|
+
const registerViewTransform3dPlugin = () => {
|
|
29721
|
+
Factory$1.registerPlugin("ViewTransform3dPlugin", ViewTransform3dPlugin);
|
|
29722
|
+
};
|
|
29723
|
+
|
|
29724
|
+
const _tempBounds = new AABBBounds();
|
|
29725
|
+
class FlexLayoutPlugin {
|
|
29726
|
+
constructor() {
|
|
29727
|
+
this.name = "FlexLayoutPlugin", this.activeEvent = "onRegister", this.id = Generator.GenAutoIncrementId(), this.key = this.name + this.id, this.tempBounds = new AABBBounds();
|
|
29728
|
+
}
|
|
29729
|
+
pauseLayout(p) {
|
|
29730
|
+
this.pause = p;
|
|
29731
|
+
}
|
|
29732
|
+
tryLayoutChildren(graphic) {
|
|
29733
|
+
graphic.firstChild && this.tryLayout(graphic.firstChild);
|
|
29734
|
+
}
|
|
29735
|
+
tryLayout(graphic, force = !0) {
|
|
29736
|
+
if (this.pause) return;
|
|
29737
|
+
const p = graphic.parent;
|
|
29738
|
+
if (!(force || p && graphic.needUpdateLayout())) return;
|
|
29739
|
+
const theme = getTheme$1(p).group,
|
|
29740
|
+
{
|
|
29741
|
+
display = theme.display
|
|
29670
29742
|
} = p.attribute;
|
|
29671
29743
|
if ("flex" !== display) return;
|
|
29672
29744
|
const {
|
|
@@ -29918,6 +29990,70 @@
|
|
|
29918
29990
|
Factory$1.registerPlugin("FlexLayoutPlugin", FlexLayoutPlugin);
|
|
29919
29991
|
};
|
|
29920
29992
|
|
|
29993
|
+
class PickerBase {
|
|
29994
|
+
contains(graphic, point, params) {
|
|
29995
|
+
if (!graphic.AABBBounds.containsPoint(point)) return !1;
|
|
29996
|
+
if ("imprecise" === graphic.attribute.pickMode) return !0;
|
|
29997
|
+
if (!this.canvasRenderer) return !0;
|
|
29998
|
+
const {
|
|
29999
|
+
pickContext: pickContext
|
|
30000
|
+
} = null != params ? params : {};
|
|
30001
|
+
if (!pickContext) return !1;
|
|
30002
|
+
const attribute = graphic.getGraphicTheme();
|
|
30003
|
+
pickContext.highPerformanceSave();
|
|
30004
|
+
let {
|
|
30005
|
+
x = attribute.x,
|
|
30006
|
+
y = attribute.y
|
|
30007
|
+
} = graphic.attribute;
|
|
30008
|
+
if (graphic.transMatrix.onlyTranslate()) {
|
|
30009
|
+
const point = graphic.getOffsetXY(attribute);
|
|
30010
|
+
x += point.x, y += point.y, pickContext.setTransformForCurrent();
|
|
30011
|
+
} else x = 0, y = 0, pickContext.transformFromMatrix(graphic.transMatrix, !0);
|
|
30012
|
+
let picked = !1,
|
|
30013
|
+
_final = !1;
|
|
30014
|
+
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) => {
|
|
30015
|
+
if (picked || _final) return !0;
|
|
30016
|
+
const lineWidth = arcAttribute.lineWidth || themeAttribute.lineWidth,
|
|
30017
|
+
pickStrokeBuffer = arcAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
|
|
30018
|
+
keepStrokeScale = arcAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
|
|
30019
|
+
return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), _final = final || _final, picked;
|
|
30020
|
+
}), pickContext.highPerformanceRestore(), picked;
|
|
30021
|
+
}
|
|
30022
|
+
}
|
|
30023
|
+
|
|
30024
|
+
class DefaultCanvasArcPicker extends PickerBase {
|
|
30025
|
+
constructor(canvasRenderer) {
|
|
30026
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "arc", this.numberType = ARC_NUMBER_TYPE;
|
|
30027
|
+
}
|
|
30028
|
+
}
|
|
30029
|
+
|
|
30030
|
+
let loadArcPick$1 = !1;
|
|
30031
|
+
function bindArcCanvasPickerContribution(container) {
|
|
30032
|
+
loadArcPick$1 || (loadArcPick$1 = !0, container.bind(CanvasArcPicker).toDynamicValue(() => new DefaultCanvasArcPicker(resolveContainerBinding(container, ArcRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasArcPicker));
|
|
30033
|
+
}
|
|
30034
|
+
|
|
30035
|
+
class DefaultMathArcPicker extends PickerBase {
|
|
30036
|
+
constructor(canvasRenderer) {
|
|
30037
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "arc", this.numberType = ARC_NUMBER_TYPE;
|
|
30038
|
+
}
|
|
30039
|
+
}
|
|
30040
|
+
|
|
30041
|
+
let loadArcPick = !1;
|
|
30042
|
+
function bindArcMathPickerContribution(container) {
|
|
30043
|
+
loadArcPick || (loadArcPick = !0, container.bind(MathArcPicker).toDynamicValue(() => new DefaultMathArcPicker(resolveContainerBinding(container, ArcRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathArcPicker));
|
|
30044
|
+
}
|
|
30045
|
+
|
|
30046
|
+
function _registerArc() {
|
|
30047
|
+
if (_registerArc.__loaded) return;
|
|
30048
|
+
_registerArc.__loaded = !0;
|
|
30049
|
+
const legacyContext = getLegacyBindingContext();
|
|
30050
|
+
registerArcGraphic(), arcModule({
|
|
30051
|
+
bind: legacyContext.bind
|
|
30052
|
+
}), browser ? bindArcCanvasPickerContribution(legacyContext) : bindArcMathPickerContribution(legacyContext);
|
|
30053
|
+
}
|
|
30054
|
+
_registerArc.__loaded = !1;
|
|
30055
|
+
const registerArc = _registerArc;
|
|
30056
|
+
|
|
29921
30057
|
class Base3dPicker extends BaseRender {
|
|
29922
30058
|
contains(graphic, point, params) {
|
|
29923
30059
|
const {
|
|
@@ -29968,95 +30104,637 @@
|
|
|
29968
30104
|
_registerArc3d.__loaded = !1;
|
|
29969
30105
|
const registerArc3d = _registerArc3d;
|
|
29970
30106
|
|
|
29971
|
-
class
|
|
30107
|
+
class DefaultCanvasAreaPicker extends PickerBase {
|
|
29972
30108
|
constructor(canvasRenderer) {
|
|
29973
|
-
super(), this.canvasRenderer = canvasRenderer, this.type = "
|
|
30109
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "area", this.numberType = AREA_NUMBER_TYPE;
|
|
29974
30110
|
}
|
|
29975
30111
|
}
|
|
29976
30112
|
|
|
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));
|
|
30113
|
+
let loadAreaPick$1 = !1;
|
|
30114
|
+
function bindAreaCanvasPickerContribution(container) {
|
|
30115
|
+
loadAreaPick$1 || (loadAreaPick$1 = !0, container.bind(CanvasAreaPicker).toDynamicValue(() => new DefaultCanvasAreaPicker(resolveContainerBinding(container, AreaRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasAreaPicker));
|
|
29981
30116
|
}
|
|
29982
30117
|
|
|
29983
|
-
|
|
29984
|
-
|
|
29985
|
-
|
|
30118
|
+
class DefaultMathAreaPicker extends PickerBase {
|
|
30119
|
+
constructor(canvasRenderer) {
|
|
30120
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "area", this.numberType = AREA_NUMBER_TYPE;
|
|
30121
|
+
}
|
|
30122
|
+
}
|
|
30123
|
+
|
|
30124
|
+
let loadAreaPick = !1;
|
|
30125
|
+
function bindAreaMathPickerContribution(container) {
|
|
30126
|
+
loadAreaPick || (loadAreaPick = !0, container.bind(MathAreaPicker).toDynamicValue(() => new DefaultMathAreaPicker(resolveContainerBinding(container, AreaRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathAreaPicker));
|
|
30127
|
+
}
|
|
30128
|
+
|
|
30129
|
+
function _registerArea() {
|
|
30130
|
+
if (_registerArea.__loaded) return;
|
|
30131
|
+
_registerArea.__loaded = !0;
|
|
29986
30132
|
const legacyContext = getLegacyBindingContext();
|
|
29987
|
-
|
|
30133
|
+
registerAreaGraphic(), areaModule({
|
|
29988
30134
|
bind: legacyContext.bind
|
|
29989
|
-
}),
|
|
30135
|
+
}), browser ? bindAreaCanvasPickerContribution(legacyContext) : bindAreaMathPickerContribution(legacyContext);
|
|
29990
30136
|
}
|
|
29991
|
-
|
|
29992
|
-
const
|
|
30137
|
+
_registerArea.__loaded = !1;
|
|
30138
|
+
const registerArea = _registerArea;
|
|
29993
30139
|
|
|
29994
|
-
class
|
|
30140
|
+
class GlyphPickerBase {
|
|
30141
|
+
constructor() {
|
|
30142
|
+
this.type = "glyph", this.numberType = GLYPH_NUMBER_TYPE;
|
|
30143
|
+
}
|
|
30144
|
+
contains(glyph, point, params) {
|
|
30145
|
+
if (!glyph.AABBBounds.containsPoint(point)) return !1;
|
|
30146
|
+
if ("imprecise" === glyph.attribute.pickMode) return !0;
|
|
30147
|
+
const {
|
|
30148
|
+
pickContext: pickContext
|
|
30149
|
+
} = null != params ? params : {};
|
|
30150
|
+
if (!pickContext) return !1;
|
|
30151
|
+
const pickerService = null == params ? void 0 : params.pickerService;
|
|
30152
|
+
if (pickerService) {
|
|
30153
|
+
let picked = !1;
|
|
30154
|
+
return glyph.getSubGraphic().forEach(g => {
|
|
30155
|
+
if (picked) return;
|
|
30156
|
+
const data = pickerService.pickItem(g, point, null, params);
|
|
30157
|
+
picked = !(!data || !data.graphic);
|
|
30158
|
+
}), picked;
|
|
30159
|
+
}
|
|
30160
|
+
return !1;
|
|
30161
|
+
}
|
|
30162
|
+
}
|
|
30163
|
+
|
|
30164
|
+
class DefaultCanvasGlyphPicker extends GlyphPickerBase {
|
|
29995
30165
|
constructor(canvasRenderer) {
|
|
29996
|
-
super(), this.canvasRenderer = canvasRenderer
|
|
30166
|
+
super(), this.canvasRenderer = canvasRenderer;
|
|
29997
30167
|
}
|
|
29998
30168
|
}
|
|
29999
30169
|
|
|
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));
|
|
30170
|
+
let loadGlyphPick$1 = !1;
|
|
30171
|
+
function bindGlyphCanvasPickerContribution(container) {
|
|
30172
|
+
loadGlyphPick$1 || (loadGlyphPick$1 = !0, container.bind(CanvasGlyphPicker).toDynamicValue(() => new DefaultCanvasGlyphPicker(resolveContainerBinding(container, GlyphRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasGlyphPicker));
|
|
30004
30173
|
}
|
|
30005
30174
|
|
|
30006
|
-
|
|
30007
|
-
|
|
30008
|
-
|
|
30175
|
+
class DefaultMathGlyphPicker extends GlyphPickerBase {
|
|
30176
|
+
constructor(canvasRenderer) {
|
|
30177
|
+
super(), this.canvasRenderer = canvasRenderer;
|
|
30178
|
+
}
|
|
30179
|
+
}
|
|
30180
|
+
|
|
30181
|
+
let loadGlyphPick = !1;
|
|
30182
|
+
function bindGlyphMathPickerContribution(container) {
|
|
30183
|
+
loadGlyphPick || (loadGlyphPick = !0, container.bind(MathGlyphPicker).toDynamicValue(() => new DefaultMathGlyphPicker(resolveContainerBinding(container, GlyphRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathGlyphPicker));
|
|
30184
|
+
}
|
|
30185
|
+
|
|
30186
|
+
function _registerGlyph() {
|
|
30187
|
+
if (_registerGlyph.__loaded) return;
|
|
30188
|
+
_registerGlyph.__loaded = !0;
|
|
30009
30189
|
const legacyContext = getLegacyBindingContext();
|
|
30010
|
-
|
|
30190
|
+
registerGlyphGraphic(), glyphModule({
|
|
30011
30191
|
bind: legacyContext.bind
|
|
30012
|
-
}),
|
|
30192
|
+
}), browser ? bindGlyphCanvasPickerContribution(legacyContext) : bindGlyphMathPickerContribution(legacyContext);
|
|
30013
30193
|
}
|
|
30014
|
-
|
|
30015
|
-
const
|
|
30194
|
+
_registerGlyph.__loaded = !1;
|
|
30195
|
+
const registerGlyph = _registerGlyph;
|
|
30016
30196
|
|
|
30017
|
-
|
|
30018
|
-
|
|
30019
|
-
|
|
30020
|
-
|
|
30021
|
-
const
|
|
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
|
-
});
|
|
30197
|
+
function _registerGroup() {
|
|
30198
|
+
_registerGroup.__loaded || (_registerGroup.__loaded = !0, registerGroupGraphic());
|
|
30199
|
+
}
|
|
30200
|
+
_registerGroup.__loaded = !1;
|
|
30201
|
+
const registerGroup = _registerGroup;
|
|
30055
30202
|
|
|
30056
|
-
|
|
30057
|
-
|
|
30058
|
-
|
|
30059
|
-
|
|
30203
|
+
class DefaultCanvasImagePicker extends PickerBase {
|
|
30204
|
+
constructor(canvasRenderer) {
|
|
30205
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "image", this.numberType = IMAGE_NUMBER_TYPE;
|
|
30206
|
+
}
|
|
30207
|
+
}
|
|
30208
|
+
|
|
30209
|
+
let loadImagePick$1 = !1;
|
|
30210
|
+
function bindImageCanvasPickerContribution(container) {
|
|
30211
|
+
loadImagePick$1 || (loadImagePick$1 = !0, container.bind(CanvasImagePicker).toDynamicValue(() => new DefaultCanvasImagePicker(resolveContainerBinding(container, ImageRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasImagePicker));
|
|
30212
|
+
}
|
|
30213
|
+
|
|
30214
|
+
class DefaultMathImagePicker {
|
|
30215
|
+
constructor() {
|
|
30216
|
+
this.type = "image", this.numberType = IMAGE_NUMBER_TYPE;
|
|
30217
|
+
}
|
|
30218
|
+
contains(image, point, params) {
|
|
30219
|
+
const {
|
|
30220
|
+
pickContext: pickContext
|
|
30221
|
+
} = null != params ? params : {};
|
|
30222
|
+
return !!pickContext && !!image.AABBBounds.containsPoint(point);
|
|
30223
|
+
}
|
|
30224
|
+
}
|
|
30225
|
+
|
|
30226
|
+
let loadImagePick = !1;
|
|
30227
|
+
function bindImageMathPickerContribution(container) {
|
|
30228
|
+
loadImagePick || (loadImagePick = !0, container.bind(MathImagePicker).toDynamicValue(() => new DefaultMathImagePicker()).inSingletonScope(), container.bind(MathPickerContribution).toService(MathImagePicker));
|
|
30229
|
+
}
|
|
30230
|
+
|
|
30231
|
+
function _registerImage() {
|
|
30232
|
+
if (_registerImage.__loaded) return;
|
|
30233
|
+
_registerImage.__loaded = !0;
|
|
30234
|
+
const legacyContext = getLegacyBindingContext();
|
|
30235
|
+
registerImageGraphic(), imageModule({
|
|
30236
|
+
bind: legacyContext.bind
|
|
30237
|
+
}), browser ? bindImageCanvasPickerContribution(legacyContext) : bindImageMathPickerContribution(legacyContext);
|
|
30238
|
+
}
|
|
30239
|
+
_registerImage.__loaded = !1;
|
|
30240
|
+
const registerImage = _registerImage;
|
|
30241
|
+
|
|
30242
|
+
class BaseLinePicker extends BaseRender {
|
|
30243
|
+
contains(graphic, point, params) {
|
|
30244
|
+
if (!graphic.AABBBounds.containsPoint(point)) return !1;
|
|
30245
|
+
if ("imprecise" === graphic.attribute.pickMode) return !0;
|
|
30246
|
+
const {
|
|
30247
|
+
pickContext: pickContext
|
|
30248
|
+
} = null != params ? params : {};
|
|
30249
|
+
if (!pickContext) return !1;
|
|
30250
|
+
pickContext.highPerformanceSave();
|
|
30251
|
+
const lineAttribute = graphic.getGraphicTheme(),
|
|
30252
|
+
data = this.transform(graphic, lineAttribute, pickContext),
|
|
30253
|
+
{
|
|
30254
|
+
x: x,
|
|
30255
|
+
y: y,
|
|
30256
|
+
z: z,
|
|
30257
|
+
lastModelMatrix: lastModelMatrix
|
|
30258
|
+
} = data;
|
|
30259
|
+
let pickPoint = point;
|
|
30260
|
+
if (pickContext.camera) {
|
|
30261
|
+
pickPoint = point.clone();
|
|
30262
|
+
const globalMatrix = graphic.parent.globalTransMatrix;
|
|
30263
|
+
pickPoint.x = globalMatrix.a * point.x + globalMatrix.c * point.y + globalMatrix.e, pickPoint.y = globalMatrix.b * point.x + globalMatrix.d * point.y + globalMatrix.f;
|
|
30264
|
+
}
|
|
30265
|
+
this.canvasRenderer.z = z;
|
|
30266
|
+
let picked = !1;
|
|
30267
|
+
return this.canvasRenderer.drawShape(graphic, pickContext, x, y, {}, null, context => !!picked || (picked = context.isPointInPath(pickPoint.x, pickPoint.y), picked), (context, lineAttribute, themeAttribute) => {
|
|
30268
|
+
if (picked) return !0;
|
|
30269
|
+
const lineWidth = lineAttribute.lineWidth || themeAttribute.lineWidth,
|
|
30270
|
+
pickStrokeBuffer = lineAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
|
|
30271
|
+
keepStrokeScale = lineAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
|
|
30272
|
+
return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(pickPoint.x, pickPoint.y), picked;
|
|
30273
|
+
}), this.canvasRenderer.z = 0, pickContext.modelMatrix !== lastModelMatrix && mat4Allocate.free(pickContext.modelMatrix), pickContext.modelMatrix = lastModelMatrix, pickContext.highPerformanceRestore(), picked;
|
|
30274
|
+
}
|
|
30275
|
+
}
|
|
30276
|
+
|
|
30277
|
+
class DefaultCanvasLinePicker extends BaseLinePicker {
|
|
30278
|
+
constructor(canvasRenderer) {
|
|
30279
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "line", this.numberType = LINE_NUMBER_TYPE;
|
|
30280
|
+
}
|
|
30281
|
+
}
|
|
30282
|
+
|
|
30283
|
+
let loadLinePick$1 = !1;
|
|
30284
|
+
function bindLineCanvasPickerContribution(container) {
|
|
30285
|
+
loadLinePick$1 || (loadLinePick$1 = !0, container.bind(CanvasLinePicker).toDynamicValue(() => new DefaultCanvasLinePicker(resolveContainerBinding(container, LineRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasLinePicker));
|
|
30286
|
+
}
|
|
30287
|
+
|
|
30288
|
+
class DefaultMathLinePicker extends PickerBase {
|
|
30289
|
+
constructor(canvasRenderer) {
|
|
30290
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "line", this.numberType = LINE_NUMBER_TYPE;
|
|
30291
|
+
}
|
|
30292
|
+
}
|
|
30293
|
+
|
|
30294
|
+
let loadLinePick = !1;
|
|
30295
|
+
function bindLineMathPickerContribution(container) {
|
|
30296
|
+
loadLinePick || (loadLinePick = !0, container.bind(MathLinePicker).toDynamicValue(() => new DefaultMathLinePicker(resolveContainerBinding(container, LineRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathLinePicker));
|
|
30297
|
+
}
|
|
30298
|
+
|
|
30299
|
+
function _registerLine() {
|
|
30300
|
+
if (_registerLine.__loaded) return;
|
|
30301
|
+
_registerLine.__loaded = !0;
|
|
30302
|
+
const legacyContext = getLegacyBindingContext();
|
|
30303
|
+
registerLineGraphic(), lineModule({
|
|
30304
|
+
bind: legacyContext.bind
|
|
30305
|
+
}), browser ? bindLineCanvasPickerContribution(legacyContext) : bindLineMathPickerContribution(legacyContext);
|
|
30306
|
+
}
|
|
30307
|
+
_registerLine.__loaded = !1;
|
|
30308
|
+
const registerLine = _registerLine;
|
|
30309
|
+
|
|
30310
|
+
class DefaultCanvasPathPicker extends BaseLinePicker {
|
|
30311
|
+
constructor(canvasRenderer) {
|
|
30312
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "path", this.numberType = PATH_NUMBER_TYPE;
|
|
30313
|
+
}
|
|
30314
|
+
}
|
|
30315
|
+
|
|
30316
|
+
let loadPathPick$1 = !1;
|
|
30317
|
+
function bindPathCanvasPickerContribution(container) {
|
|
30318
|
+
loadPathPick$1 || (loadPathPick$1 = !0, container.bind(CanvasPathPicker).toDynamicValue(() => new DefaultCanvasPathPicker(resolveContainerBinding(container, PathRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasPathPicker));
|
|
30319
|
+
}
|
|
30320
|
+
|
|
30321
|
+
class DefaultMathPathPicker extends PickerBase {
|
|
30322
|
+
constructor(canvasRenderer) {
|
|
30323
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "path", this.numberType = PATH_NUMBER_TYPE;
|
|
30324
|
+
}
|
|
30325
|
+
}
|
|
30326
|
+
|
|
30327
|
+
let loadPathPick = !1;
|
|
30328
|
+
function bindPathMathPickerContribution(container) {
|
|
30329
|
+
loadPathPick || (loadPathPick = !0, container.bind(MathPathPicker).toDynamicValue(() => new DefaultMathPathPicker(resolveContainerBinding(container, PathRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathPathPicker));
|
|
30330
|
+
}
|
|
30331
|
+
|
|
30332
|
+
function _registerPath() {
|
|
30333
|
+
if (_registerPath.__loaded) return;
|
|
30334
|
+
_registerPath.__loaded = !0;
|
|
30335
|
+
const legacyContext = getLegacyBindingContext();
|
|
30336
|
+
registerPathGraphic(), pathModule({
|
|
30337
|
+
bind: legacyContext.bind
|
|
30338
|
+
}), browser ? bindPathCanvasPickerContribution(legacyContext) : bindPathMathPickerContribution(legacyContext);
|
|
30339
|
+
}
|
|
30340
|
+
_registerPath.__loaded = !1;
|
|
30341
|
+
const registerPath = _registerPath;
|
|
30342
|
+
|
|
30343
|
+
class DefaultCanvasPolygonPicker extends PickerBase {
|
|
30344
|
+
constructor(canvasRenderer) {
|
|
30345
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "polygon", this.numberType = POLYGON_NUMBER_TYPE;
|
|
30346
|
+
}
|
|
30347
|
+
}
|
|
30348
|
+
|
|
30349
|
+
let loadPolygonPick$1 = !1;
|
|
30350
|
+
function bindPolygonCanvasPickerContribution(container) {
|
|
30351
|
+
loadPolygonPick$1 || (loadPolygonPick$1 = !0, container.bind(CanvasPolygonPicker).toDynamicValue(() => new DefaultCanvasPolygonPicker(resolveContainerBinding(container, PolygonRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasPolygonPicker));
|
|
30352
|
+
}
|
|
30353
|
+
|
|
30354
|
+
class DefaultMathPolygonPicker extends PickerBase {
|
|
30355
|
+
constructor(canvasRenderer) {
|
|
30356
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "polygon", this.numberType = POLYGON_NUMBER_TYPE;
|
|
30357
|
+
}
|
|
30358
|
+
}
|
|
30359
|
+
|
|
30360
|
+
let loadPolygonPick = !1;
|
|
30361
|
+
function bindPolygonMathPickerContribution(container) {
|
|
30362
|
+
loadPolygonPick || (loadPolygonPick = !0, container.bind(MathPolygonPicker).toDynamicValue(() => new DefaultMathPolygonPicker(resolveContainerBinding(container, PolygonRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathPolygonPicker));
|
|
30363
|
+
}
|
|
30364
|
+
|
|
30365
|
+
function _registerPolygon() {
|
|
30366
|
+
if (_registerPolygon.__loaded) return;
|
|
30367
|
+
_registerPolygon.__loaded = !0;
|
|
30368
|
+
const legacyContext = getLegacyBindingContext();
|
|
30369
|
+
registerPolygonGraphic(), polygonModule({
|
|
30370
|
+
bind: legacyContext.bind
|
|
30371
|
+
}), browser ? bindPolygonCanvasPickerContribution(legacyContext) : bindPolygonMathPickerContribution(legacyContext);
|
|
30372
|
+
}
|
|
30373
|
+
_registerPolygon.__loaded = !1;
|
|
30374
|
+
const registerPolygon = _registerPolygon;
|
|
30375
|
+
|
|
30376
|
+
class DefaultCanvasPyramid3dPicker extends Base3dPicker {
|
|
30377
|
+
constructor(canvasRenderer) {
|
|
30378
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "pyramid3d", this.numberType = PYRAMID3D_NUMBER_TYPE, this.themeType = "polygon";
|
|
30379
|
+
}
|
|
30380
|
+
}
|
|
30381
|
+
|
|
30382
|
+
let loadPyramid3dPick = !1;
|
|
30383
|
+
function bindPyramid3dCanvasPickerContribution(container) {
|
|
30384
|
+
var _a;
|
|
30385
|
+
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));
|
|
30386
|
+
}
|
|
30387
|
+
|
|
30388
|
+
function _registerPyramid3d() {
|
|
30389
|
+
if (_registerPyramid3d.__loaded) return;
|
|
30390
|
+
_registerPyramid3d.__loaded = !0;
|
|
30391
|
+
const legacyContext = getLegacyBindingContext();
|
|
30392
|
+
registerPyramid3dGraphic(), registerDirectionalLight(), registerOrthoCamera(), pyramid3dModule({
|
|
30393
|
+
bind: legacyContext.bind
|
|
30394
|
+
}), bindPyramid3dCanvasPickerContribution(legacyContext);
|
|
30395
|
+
}
|
|
30396
|
+
_registerPyramid3d.__loaded = !1;
|
|
30397
|
+
const registerPyramid3d = _registerPyramid3d;
|
|
30398
|
+
|
|
30399
|
+
const _bounds = new AABBBounds();
|
|
30400
|
+
class RectPickerBase {
|
|
30401
|
+
constructor() {
|
|
30402
|
+
this.type = "rect", this.numberType = RECT_NUMBER_TYPE;
|
|
30403
|
+
}
|
|
30404
|
+
contains(rect, point, params) {
|
|
30405
|
+
if (!rect.AABBBounds.containsPoint(point)) return !1;
|
|
30406
|
+
if ("imprecise" === rect.attribute.pickMode) return !0;
|
|
30407
|
+
const {
|
|
30408
|
+
pickContext: pickContext
|
|
30409
|
+
} = null != params ? params : {};
|
|
30410
|
+
if (!pickContext) return !1;
|
|
30411
|
+
const rectAttribute = rect.getGraphicTheme(),
|
|
30412
|
+
{
|
|
30413
|
+
cornerRadius = rectAttribute.cornerRadius
|
|
30414
|
+
} = rect.attribute;
|
|
30415
|
+
let {
|
|
30416
|
+
x = rectAttribute.x,
|
|
30417
|
+
y = rectAttribute.y
|
|
30418
|
+
} = rect.attribute;
|
|
30419
|
+
pickContext.highPerformanceSave();
|
|
30420
|
+
let onlyTranslate = !0;
|
|
30421
|
+
if (rect.transMatrix.onlyTranslate()) {
|
|
30422
|
+
const point = rect.getOffsetXY(rectAttribute);
|
|
30423
|
+
x += point.x, y += point.y, pickContext.setTransformForCurrent();
|
|
30424
|
+
} else x = 0, y = 0, onlyTranslate = !1, pickContext.transformFromMatrix(rect.transMatrix, !0);
|
|
30425
|
+
let picked = !0;
|
|
30426
|
+
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) => {
|
|
30427
|
+
if (picked) return !0;
|
|
30428
|
+
const lineWidth = rectAttribute.lineWidth || themeAttribute.lineWidth,
|
|
30429
|
+
pickStrokeBuffer = rectAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
|
|
30430
|
+
keepStrokeScale = rectAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
|
|
30431
|
+
return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), picked;
|
|
30432
|
+
});else {
|
|
30433
|
+
const {
|
|
30434
|
+
fill = rectAttribute.fill,
|
|
30435
|
+
stroke = rectAttribute.stroke,
|
|
30436
|
+
lineWidth = rectAttribute.lineWidth
|
|
30437
|
+
} = rect.attribute;
|
|
30438
|
+
if (fill) picked = !0;else if (stroke) {
|
|
30439
|
+
const bounds = rect.AABBBounds;
|
|
30440
|
+
_bounds.setValue(bounds.x1, bounds.y1, bounds.x2, bounds.y2), _bounds.expand(-lineWidth / 2), picked = !_bounds.containsPoint(point);
|
|
30441
|
+
}
|
|
30442
|
+
}
|
|
30443
|
+
return pickContext.highPerformanceRestore(), picked;
|
|
30444
|
+
}
|
|
30445
|
+
}
|
|
30446
|
+
|
|
30447
|
+
class DefaultCanvasRectPicker extends RectPickerBase {
|
|
30448
|
+
constructor(canvasRenderer) {
|
|
30449
|
+
super(), this.canvasRenderer = canvasRenderer;
|
|
30450
|
+
}
|
|
30451
|
+
}
|
|
30452
|
+
|
|
30453
|
+
let loadRectPick$1 = !1;
|
|
30454
|
+
function bindRectCanvasPickerContribution(container) {
|
|
30455
|
+
loadRectPick$1 || (loadRectPick$1 = !0, container.bind(CanvasRectPicker).toDynamicValue(() => new DefaultCanvasRectPicker(resolveContainerBinding(container, RectRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasRectPicker));
|
|
30456
|
+
}
|
|
30457
|
+
|
|
30458
|
+
class DefaultMathRectPicker extends RectPickerBase {
|
|
30459
|
+
constructor(canvasRenderer) {
|
|
30460
|
+
super(), this.canvasRenderer = canvasRenderer;
|
|
30461
|
+
}
|
|
30462
|
+
}
|
|
30463
|
+
|
|
30464
|
+
let loadRectPick = !1;
|
|
30465
|
+
function bindRectMathPickerContribution(container) {
|
|
30466
|
+
loadRectPick || (loadRectPick = !0, container.bind(MathRectPicker).toDynamicValue(() => new DefaultMathRectPicker(resolveContainerBinding(container, RectRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathRectPicker));
|
|
30467
|
+
}
|
|
30468
|
+
|
|
30469
|
+
function _registerRect() {
|
|
30470
|
+
if (_registerRect.__loaded) return;
|
|
30471
|
+
_registerRect.__loaded = !0;
|
|
30472
|
+
const legacyContext = getLegacyBindingContext();
|
|
30473
|
+
registerRectGraphic(), rectModule({
|
|
30474
|
+
bind: legacyContext.bind
|
|
30475
|
+
}), browser ? bindRectCanvasPickerContribution(legacyContext) : bindRectMathPickerContribution(legacyContext);
|
|
30476
|
+
}
|
|
30477
|
+
_registerRect.__loaded = !1;
|
|
30478
|
+
const registerRect = _registerRect;
|
|
30479
|
+
|
|
30480
|
+
class DefaultCanvasRect3dPicker extends Base3dPicker {
|
|
30481
|
+
constructor(canvasRenderer) {
|
|
30482
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "rect3d", this.numberType = RECT3D_NUMBER_TYPE, this.themeType = "rect";
|
|
30483
|
+
}
|
|
30484
|
+
}
|
|
30485
|
+
|
|
30486
|
+
let loadRect3dPick = !1;
|
|
30487
|
+
function bindRect3dCanvasPickerContribution(container) {
|
|
30488
|
+
var _a;
|
|
30489
|
+
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));
|
|
30490
|
+
}
|
|
30491
|
+
|
|
30492
|
+
function _registerRect3d() {
|
|
30493
|
+
if (_registerRect3d.__loaded) return;
|
|
30494
|
+
_registerRect3d.__loaded = !0;
|
|
30495
|
+
const legacyContext = getLegacyBindingContext();
|
|
30496
|
+
registerRect3dGraphic(), rect3dModule({
|
|
30497
|
+
bind: legacyContext.bind
|
|
30498
|
+
}), bindRect3dCanvasPickerContribution(legacyContext);
|
|
30499
|
+
}
|
|
30500
|
+
_registerRect3d.__loaded = !1;
|
|
30501
|
+
const registerRect3d = _registerRect3d;
|
|
30502
|
+
|
|
30503
|
+
class DefaultCanvasRichTextPicker {
|
|
30504
|
+
constructor(canvasRenderer) {
|
|
30505
|
+
this.canvasRenderer = canvasRenderer, this.type = "richtext", this.numberType = RICHTEXT_NUMBER_TYPE;
|
|
30506
|
+
}
|
|
30507
|
+
contains(richtext, point, params) {
|
|
30508
|
+
return !!richtext.AABBBounds.containsPoint(point);
|
|
30509
|
+
}
|
|
30510
|
+
}
|
|
30511
|
+
|
|
30512
|
+
let loadRichtextPick = !1;
|
|
30513
|
+
function bindRichtextCanvasPickerContribution(container) {
|
|
30514
|
+
loadRichtextPick || (loadRichtextPick = !0, container.bind(CanvasRichTextPicker).toDynamicValue(() => new DefaultCanvasRichTextPicker(resolveContainerBinding(container, RichTextRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasRichTextPicker));
|
|
30515
|
+
}
|
|
30516
|
+
|
|
30517
|
+
class DefaultMathRichTextPicker {
|
|
30518
|
+
constructor(canvasRenderer) {
|
|
30519
|
+
this.canvasRenderer = canvasRenderer, this.type = "richtext", this.numberType = RICHTEXT_NUMBER_TYPE;
|
|
30520
|
+
}
|
|
30521
|
+
contains(richtext, point, params) {
|
|
30522
|
+
return !!richtext.AABBBounds.containsPoint(point);
|
|
30523
|
+
}
|
|
30524
|
+
}
|
|
30525
|
+
|
|
30526
|
+
let loadRichTextPick = !1;
|
|
30527
|
+
function bindRichTextMathPickerContribution(container) {
|
|
30528
|
+
loadRichTextPick || (loadRichTextPick = !0, container.bind(MathRichTextPicker).toDynamicValue(() => new DefaultMathRichTextPicker(resolveContainerBinding(container, RichTextRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathRichTextPicker));
|
|
30529
|
+
}
|
|
30530
|
+
|
|
30531
|
+
function _registerRichtext() {
|
|
30532
|
+
if (_registerRichtext.__loaded) return;
|
|
30533
|
+
_registerRichtext.__loaded = !0;
|
|
30534
|
+
const legacyContext = getLegacyBindingContext();
|
|
30535
|
+
registerRichtextGraphic(), richtextModule({
|
|
30536
|
+
bind: legacyContext.bind
|
|
30537
|
+
}), browser ? bindRichtextCanvasPickerContribution(legacyContext) : bindRichTextMathPickerContribution(legacyContext);
|
|
30538
|
+
}
|
|
30539
|
+
_registerRichtext.__loaded = !1;
|
|
30540
|
+
const registerRichtext = _registerRichtext;
|
|
30541
|
+
|
|
30542
|
+
function _registerShadowRoot() {
|
|
30543
|
+
_registerShadowRoot.__loaded || (_registerShadowRoot.__loaded = !0, registerShadowRootGraphic());
|
|
30544
|
+
}
|
|
30545
|
+
_registerShadowRoot.__loaded = !1;
|
|
30546
|
+
const registerShadowRoot = _registerShadowRoot;
|
|
30547
|
+
|
|
30548
|
+
class DefaultCanvasSymbolPicker extends Base3dPicker {
|
|
30549
|
+
constructor(canvasRenderer) {
|
|
30550
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "symbol", this.numberType = SYMBOL_NUMBER_TYPE;
|
|
30551
|
+
}
|
|
30552
|
+
contains(symbol, point, params) {
|
|
30553
|
+
const {
|
|
30554
|
+
pickContext: pickContext
|
|
30555
|
+
} = null != params ? params : {};
|
|
30556
|
+
if (!pickContext) return !1;
|
|
30557
|
+
const parsedPath = symbol.getParsedPath();
|
|
30558
|
+
if (!pickContext.camera) {
|
|
30559
|
+
if (!symbol.AABBBounds.containsPoint(point)) return !1;
|
|
30560
|
+
if (parsedPath.isSvg || "imprecise" === symbol.attribute.pickMode) return !0;
|
|
30561
|
+
}
|
|
30562
|
+
pickContext.highPerformanceSave();
|
|
30563
|
+
const symbolAttribute = symbol.getGraphicTheme(),
|
|
30564
|
+
data = this.transform(symbol, symbolAttribute, pickContext),
|
|
30565
|
+
{
|
|
30566
|
+
x: x,
|
|
30567
|
+
y: y,
|
|
30568
|
+
z: z,
|
|
30569
|
+
lastModelMatrix: lastModelMatrix
|
|
30570
|
+
} = data;
|
|
30571
|
+
let pickPoint = point;
|
|
30572
|
+
if (pickContext.camera) {
|
|
30573
|
+
pickPoint = point.clone();
|
|
30574
|
+
const globalMatrix = symbol.parent.globalTransMatrix;
|
|
30575
|
+
pickPoint.x = globalMatrix.a * point.x + globalMatrix.c * point.y + globalMatrix.e, pickPoint.y = globalMatrix.b * point.x + globalMatrix.d * point.y + globalMatrix.f;
|
|
30576
|
+
}
|
|
30577
|
+
this.canvasRenderer.z = z;
|
|
30578
|
+
let picked = !1;
|
|
30579
|
+
return this.canvasRenderer.drawShape(symbol, pickContext, x, y, {}, null, (context, symbolAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(pickPoint.x, pickPoint.y), picked), (context, symbolAttribute, themeAttribute) => {
|
|
30580
|
+
if (picked) return !0;
|
|
30581
|
+
const lineWidth = symbolAttribute.lineWidth || themeAttribute.lineWidth,
|
|
30582
|
+
pickStrokeBuffer = symbolAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
|
|
30583
|
+
keepStrokeScale = symbolAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
|
|
30584
|
+
return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(pickPoint.x, pickPoint.y), picked;
|
|
30585
|
+
}), this.canvasRenderer.z = 0, pickContext.modelMatrix !== lastModelMatrix && mat4Allocate.free(pickContext.modelMatrix), pickContext.modelMatrix = lastModelMatrix, pickContext.highPerformanceRestore(), picked;
|
|
30586
|
+
}
|
|
30587
|
+
}
|
|
30588
|
+
|
|
30589
|
+
let loadSymbolPick$1 = !1;
|
|
30590
|
+
function bindSymbolCanvasPickerContribution(container) {
|
|
30591
|
+
loadSymbolPick$1 || (loadSymbolPick$1 = !0, container.bind(CanvasSymbolPicker).toDynamicValue(() => new DefaultCanvasSymbolPicker(resolveContainerBinding(container, SymbolRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasSymbolPicker));
|
|
30592
|
+
}
|
|
30593
|
+
|
|
30594
|
+
class DefaultMathSymbolPicker extends PickerBase {
|
|
30595
|
+
constructor(canvasRenderer) {
|
|
30596
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "symbol", this.numberType = SYMBOL_NUMBER_TYPE;
|
|
30597
|
+
}
|
|
30598
|
+
}
|
|
30599
|
+
|
|
30600
|
+
let loadSymbolPick = !1;
|
|
30601
|
+
function bindSymbolMathPickerContribution(container) {
|
|
30602
|
+
loadSymbolPick || (loadSymbolPick = !0, container.bind(MathSymbolPicker).toDynamicValue(() => new DefaultMathSymbolPicker(resolveContainerBinding(container, SymbolRender))).inSingletonScope(), container.bind(MathPickerContribution).toService(MathSymbolPicker));
|
|
30603
|
+
}
|
|
30604
|
+
|
|
30605
|
+
function _registerSymbol() {
|
|
30606
|
+
if (_registerSymbol.__loaded) return;
|
|
30607
|
+
_registerSymbol.__loaded = !0;
|
|
30608
|
+
const legacyContext = getLegacyBindingContext();
|
|
30609
|
+
registerSymbolGraphic(), symbolModule({
|
|
30610
|
+
bind: legacyContext.bind
|
|
30611
|
+
}), browser ? bindSymbolCanvasPickerContribution(legacyContext) : bindSymbolMathPickerContribution(legacyContext);
|
|
30612
|
+
}
|
|
30613
|
+
_registerSymbol.__loaded = !1;
|
|
30614
|
+
const registerSymbol = _registerSymbol;
|
|
30615
|
+
|
|
30616
|
+
class DefaultCanvasTextPicker extends Base3dPicker {
|
|
30617
|
+
constructor(canvasRenderer) {
|
|
30618
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "text", this.numberType = TEXT_NUMBER_TYPE;
|
|
30619
|
+
}
|
|
30620
|
+
contains(text, point, params) {
|
|
30621
|
+
const {
|
|
30622
|
+
pickContext: pickContext
|
|
30623
|
+
} = null != params ? params : {};
|
|
30624
|
+
if (!pickContext) return !1;
|
|
30625
|
+
const bounds = text.AABBBounds;
|
|
30626
|
+
if (!pickContext.camera) return !!bounds.containsPoint(point);
|
|
30627
|
+
pickContext.highPerformanceSave();
|
|
30628
|
+
const textAttribute = text.getGraphicTheme(),
|
|
30629
|
+
{
|
|
30630
|
+
keepDirIn3d = textAttribute.keepDirIn3d
|
|
30631
|
+
} = text.attribute,
|
|
30632
|
+
computed3dMatrix = !keepDirIn3d,
|
|
30633
|
+
data = this.transform(text, textAttribute, pickContext, computed3dMatrix),
|
|
30634
|
+
{
|
|
30635
|
+
x: x,
|
|
30636
|
+
y: y,
|
|
30637
|
+
z: z,
|
|
30638
|
+
lastModelMatrix: lastModelMatrix
|
|
30639
|
+
} = data;
|
|
30640
|
+
this.canvasRenderer.z = z;
|
|
30641
|
+
let pickPoint = point;
|
|
30642
|
+
if (pickContext.camera) {
|
|
30643
|
+
pickPoint = point.clone();
|
|
30644
|
+
const globalMatrix = text.parent.globalTransMatrix;
|
|
30645
|
+
pickPoint.x = globalMatrix.a * point.x + globalMatrix.c * point.y + globalMatrix.e, pickPoint.y = globalMatrix.b * point.x + globalMatrix.d * point.y + globalMatrix.f;
|
|
30646
|
+
}
|
|
30647
|
+
let picked = !1;
|
|
30648
|
+
return this.canvasRenderer.drawShape(text, pickContext, x, y, {}, null, (context, symbolAttribute, themeAttribute) => {
|
|
30649
|
+
if (picked) return !0;
|
|
30650
|
+
const {
|
|
30651
|
+
fontSize = textAttribute.fontSize,
|
|
30652
|
+
textBaseline = textAttribute.textBaseline,
|
|
30653
|
+
textAlign = textAttribute.textAlign
|
|
30654
|
+
} = text.attribute,
|
|
30655
|
+
bounds = text.AABBBounds,
|
|
30656
|
+
height = bounds.height(),
|
|
30657
|
+
width = bounds.width(),
|
|
30658
|
+
offsetY = textLayoutOffsetY(textBaseline, height, fontSize),
|
|
30659
|
+
offsetX = textDrawOffsetX(textAlign, width);
|
|
30660
|
+
return context.rect(offsetX + x, offsetY + y, width, height, z), picked = context.isPointInPath(pickPoint.x, pickPoint.y), picked;
|
|
30661
|
+
}, (context, symbolAttribute, themeAttribute) => picked), this.canvasRenderer.z = 0, pickContext.modelMatrix !== lastModelMatrix && mat4Allocate.free(pickContext.modelMatrix), pickContext.modelMatrix = lastModelMatrix, pickContext.highPerformanceRestore(), picked;
|
|
30662
|
+
}
|
|
30663
|
+
}
|
|
30664
|
+
|
|
30665
|
+
let loadTextPick$1 = !1;
|
|
30666
|
+
function bindTextCanvasPickerContribution(container) {
|
|
30667
|
+
loadTextPick$1 || (loadTextPick$1 = !0, container.bind(CanvasTextPicker).toDynamicValue(() => new DefaultCanvasTextPicker(resolveContainerBinding(container, TextRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasTextPicker));
|
|
30668
|
+
}
|
|
30669
|
+
|
|
30670
|
+
class DefaultMathTextPicker {
|
|
30671
|
+
constructor() {
|
|
30672
|
+
this.type = "text", this.numberType = TEXT_NUMBER_TYPE;
|
|
30673
|
+
}
|
|
30674
|
+
contains(text, point, params) {
|
|
30675
|
+
return !!text.AABBBounds.containsPoint(point);
|
|
30676
|
+
}
|
|
30677
|
+
}
|
|
30678
|
+
|
|
30679
|
+
let loadTextPick = !1;
|
|
30680
|
+
function bindTextMathPickerContribution(container) {
|
|
30681
|
+
loadTextPick || (loadTextPick = !0, container.bind(MathTextPicker).toDynamicValue(() => new DefaultMathTextPicker()).inSingletonScope(), container.bind(MathPickerContribution).toService(MathTextPicker));
|
|
30682
|
+
}
|
|
30683
|
+
|
|
30684
|
+
function _registerText() {
|
|
30685
|
+
if (_registerText.__loaded) return;
|
|
30686
|
+
_registerText.__loaded = !0;
|
|
30687
|
+
const legacyContext = getLegacyBindingContext();
|
|
30688
|
+
registerTextGraphic(), textModule({
|
|
30689
|
+
bind: legacyContext.bind
|
|
30690
|
+
}), browser ? bindTextCanvasPickerContribution(legacyContext) : bindTextMathPickerContribution(legacyContext);
|
|
30691
|
+
}
|
|
30692
|
+
_registerText.__loaded = !1;
|
|
30693
|
+
const registerText = _registerText;
|
|
30694
|
+
|
|
30695
|
+
const createArc3d = (attributes) => {
|
|
30696
|
+
registerArc3d();
|
|
30697
|
+
return createGraphic$1('arc3d', attributes);
|
|
30698
|
+
};
|
|
30699
|
+
const createPyramid3d = (attributes) => {
|
|
30700
|
+
registerPyramid3d();
|
|
30701
|
+
return createGraphic$1('pyramid3d', attributes);
|
|
30702
|
+
};
|
|
30703
|
+
const createRect3d = (attributes) => {
|
|
30704
|
+
registerRect3d();
|
|
30705
|
+
return createGraphic$1('rect3d', attributes);
|
|
30706
|
+
};
|
|
30707
|
+
const waitForAllSubLayers = (stage) => new Promise(resolve => {
|
|
30708
|
+
vglobal.getRequestAnimationFrame()(() => {
|
|
30709
|
+
resolve(null);
|
|
30710
|
+
});
|
|
30711
|
+
}).then(() => {
|
|
30712
|
+
const promiseList = [];
|
|
30713
|
+
const layers = stage.getChildren();
|
|
30714
|
+
layers.forEach((layer) => {
|
|
30715
|
+
var _a;
|
|
30716
|
+
if (!((_a = layer.subLayers) === null || _a === void 0 ? void 0 : _a.size)) {
|
|
30717
|
+
return;
|
|
30718
|
+
}
|
|
30719
|
+
layer.subLayers.forEach((subLayer) => {
|
|
30720
|
+
const drawContribution = subLayer.drawContribution;
|
|
30721
|
+
if ((drawContribution === null || drawContribution === void 0 ? void 0 : drawContribution.hooks) && drawContribution.rendering) {
|
|
30722
|
+
promiseList.push(new Promise(resolve => {
|
|
30723
|
+
drawContribution.hooks.completeDraw.tap('outWait', () => {
|
|
30724
|
+
drawContribution.hooks.completeDraw.taps = drawContribution.hooks.completeDraw.taps.filter((item) => item.name !== 'outWait');
|
|
30725
|
+
resolve(null);
|
|
30726
|
+
});
|
|
30727
|
+
}));
|
|
30728
|
+
}
|
|
30729
|
+
});
|
|
30730
|
+
});
|
|
30731
|
+
return Promise.all(promiseList);
|
|
30732
|
+
});
|
|
30733
|
+
|
|
30734
|
+
function combineDomains(domains) {
|
|
30735
|
+
const result = [];
|
|
30736
|
+
for (let index = 0; index < domains.length; index++) {
|
|
30737
|
+
const domain = domains[index];
|
|
30060
30738
|
if (index === 0 || domain[0] !== result[result.length - 1]) {
|
|
30061
30739
|
result.push(domain[0]);
|
|
30062
30740
|
}
|
|
@@ -35680,285 +36358,45 @@
|
|
|
35680
36358
|
current = element.offsetParent;
|
|
35681
36359
|
for (; null !== current;) actualTop += current.offsetTop, actualLeft += current.offsetLeft, current = current.offsetParent;
|
|
35682
36360
|
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;
|
|
36361
|
+
top: actualTop,
|
|
36362
|
+
left: actualLeft
|
|
36363
|
+
};
|
|
35883
36364
|
}
|
|
35884
|
-
|
|
35885
|
-
|
|
35886
|
-
|
|
35887
|
-
|
|
35888
|
-
|
|
35889
|
-
|
|
35890
|
-
|
|
35891
|
-
|
|
35892
|
-
|
|
35893
|
-
|
|
35894
|
-
|
|
36365
|
+
loadFont(font, source, descriptors) {
|
|
36366
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
36367
|
+
return new FontFace(font, isString$1(source) ? `url(${source})` : source, descriptors).load().then(function (loadedFont) {
|
|
36368
|
+
return document.fonts.add(loadedFont), {
|
|
36369
|
+
loadState: "success"
|
|
36370
|
+
};
|
|
36371
|
+
}).catch(function (error) {
|
|
36372
|
+
return console.error("Failed to load font:", error), {
|
|
36373
|
+
loadState: "fail"
|
|
36374
|
+
};
|
|
36375
|
+
});
|
|
36376
|
+
});
|
|
35895
36377
|
}
|
|
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
|
-
}
|
|
36378
|
+
isMacOS() {
|
|
36379
|
+
if (void 0 === this._isMacOS) try {
|
|
36380
|
+
this._isMacOS = navigator.platform.toUpperCase().indexOf("MAC") >= 0;
|
|
36381
|
+
} catch (err) {
|
|
36382
|
+
this._isMacOS = !1;
|
|
35934
36383
|
}
|
|
35935
|
-
return
|
|
36384
|
+
return this._isMacOS;
|
|
35936
36385
|
}
|
|
35937
|
-
|
|
35938
|
-
|
|
35939
|
-
class DefaultCanvasRectPicker extends RectPickerBase {
|
|
35940
|
-
constructor(canvasRenderer) {
|
|
35941
|
-
super(), this.canvasRenderer = canvasRenderer;
|
|
36386
|
+
copyToClipBoard(text) {
|
|
36387
|
+
return navigator.clipboard.writeText(text).then(() => {}).catch(err => {});
|
|
35942
36388
|
}
|
|
35943
36389
|
}
|
|
35944
36390
|
|
|
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 {
|
|
36391
|
+
class DefaultCanvasCirclePicker extends PickerBase {
|
|
35951
36392
|
constructor(canvasRenderer) {
|
|
35952
|
-
this.canvasRenderer = canvasRenderer, this.type = "
|
|
35953
|
-
}
|
|
35954
|
-
contains(richtext, point, params) {
|
|
35955
|
-
return !!richtext.AABBBounds.containsPoint(point);
|
|
36393
|
+
super(), this.canvasRenderer = canvasRenderer, this.type = "circle", this.numberType = CIRCLE_NUMBER_TYPE;
|
|
35956
36394
|
}
|
|
35957
36395
|
}
|
|
35958
36396
|
|
|
35959
|
-
let
|
|
35960
|
-
function
|
|
35961
|
-
|
|
36397
|
+
let loadCirclePick$1 = !1;
|
|
36398
|
+
function bindCircleCanvasPickerContribution(container) {
|
|
36399
|
+
loadCirclePick$1 || (loadCirclePick$1 = !0, container.bind(CanvasCirclePicker).toDynamicValue(() => new DefaultCanvasCirclePicker(resolveContainerBinding(container, CircleRender))).inSingletonScope(), container.bind(CanvasPickerContribution).toService(CanvasCirclePicker));
|
|
35962
36400
|
}
|
|
35963
36401
|
|
|
35964
36402
|
class DefaultCanvasStarPicker extends PickerBase {
|
|
@@ -35973,106 +36411,6 @@
|
|
|
35973
36411
|
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
36412
|
}
|
|
35975
36413
|
|
|
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
36414
|
class DefaultCanvasPickerService extends DefaultPickService {
|
|
36077
36415
|
constructor(contributions, drawContribution, pickItemInterceptorContributions, pickServiceInterceptorContributions) {
|
|
36078
36416
|
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 +36720,32 @@
|
|
|
36382
36720
|
register: registerShadowRootGraphic
|
|
36383
36721
|
}, {
|
|
36384
36722
|
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));
|
|
36723
|
+
bindModule: starModule
|
|
36724
|
+
}, {
|
|
36725
|
+
register: registerSymbolGraphic,
|
|
36726
|
+
bindModule: symbolModule
|
|
36727
|
+
}, {
|
|
36728
|
+
register: registerTextGraphic,
|
|
36729
|
+
bindModule: textModule
|
|
36730
|
+
}, {
|
|
36731
|
+
register: registerWrapTextGraphic
|
|
36732
|
+
}];
|
|
36733
|
+
let standardGraphicsInstalled = !1;
|
|
36734
|
+
function ensureStandardGraphicsInstalled() {
|
|
36735
|
+
if (standardGraphicsInstalled) return;
|
|
36736
|
+
const bindingContext = getRuntimeInstallerBindingContext();
|
|
36737
|
+
standardGraphicsInstalled = !0, standardGraphicInstallSteps.forEach(({
|
|
36738
|
+
register: register,
|
|
36739
|
+
bindModule: bindModule
|
|
36740
|
+
}) => {
|
|
36741
|
+
register(), null == bindModule || bindModule({
|
|
36742
|
+
bind: bindingContext.bind
|
|
36743
|
+
});
|
|
36744
|
+
}), refreshRuntimeInstallerContributions();
|
|
36445
36745
|
}
|
|
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);
|
|
36746
|
+
function installStandardGraphicsToApp(app) {
|
|
36747
|
+
configureRuntimeApplicationForApp(app), ensureStandardGraphicsInstalled(), installRuntimeDrawContributionsToApp(app), installRuntimeGraphicRenderersToApp(app);
|
|
36454
36748
|
}
|
|
36455
|
-
_registerArea.__loaded = !1;
|
|
36456
|
-
const registerArea = _registerArea;
|
|
36457
36749
|
|
|
36458
36750
|
class DefaultMathCirclePicker extends PickerBase {
|
|
36459
36751
|
constructor(canvasRenderer) {
|
|
@@ -36477,181 +36769,6 @@
|
|
|
36477
36769
|
_registerCircle.__loaded = !1;
|
|
36478
36770
|
const registerCircle = _registerCircle;
|
|
36479
36771
|
|
|
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
36772
|
function _registerStar() {
|
|
36656
36773
|
if (_registerStar.__loaded) return;
|
|
36657
36774
|
_registerStar.__loaded = !0;
|
|
@@ -36663,53 +36780,6 @@
|
|
|
36663
36780
|
_registerStar.__loaded = !1;
|
|
36664
36781
|
const registerStar = _registerStar;
|
|
36665
36782
|
|
|
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
36783
|
function _registerWrapText() {
|
|
36714
36784
|
_registerWrapText.__loaded || (_registerWrapText.__loaded = !0, registerWrapTextGraphic());
|
|
36715
36785
|
}
|