@visactor/vrender-core 0.22.0-vstory.1 → 0.22.0-vstory.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/core/global.d.ts +0 -3
- package/cjs/core/global.js +1 -7
- package/cjs/core/global.js.map +1 -1
- package/cjs/graphic/config.js +1 -0
- package/cjs/graphic/config.js.map +1 -1
- package/cjs/graphic/graphic.d.ts +1 -1
- package/cjs/graphic/graphic.js +5 -5
- package/cjs/graphic/graphic.js.map +1 -1
- package/cjs/graphic/richtext/line.js +1 -1
- package/cjs/graphic/richtext/line.js.map +1 -1
- package/cjs/graphic/richtext/paragraph.d.ts +1 -1
- package/cjs/graphic/richtext/paragraph.js +32 -7
- package/cjs/graphic/richtext/paragraph.js.map +1 -1
- package/cjs/graphic/richtext.js +4 -1
- package/cjs/graphic/richtext.js.map +1 -1
- package/cjs/interface/global.d.ts +0 -1
- package/cjs/interface/global.js.map +1 -1
- package/cjs/interface/graphic/richText.d.ts +10 -0
- package/cjs/interface/graphic/richText.js.map +1 -1
- package/cjs/interface/graphic.d.ts +1 -1
- package/cjs/interface/graphic.js.map +1 -1
- package/cjs/plugins/builtin-plugin/edit-module.d.ts +2 -1
- package/cjs/plugins/builtin-plugin/edit-module.js +18 -13
- package/cjs/plugins/builtin-plugin/edit-module.js.map +1 -1
- package/cjs/plugins/builtin-plugin/richtext-edit-plugin.d.ts +30 -6
- package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js +248 -74
- package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -1
- package/cjs/render/contributions/render/contributions/image-contribution-render.d.ts +1 -1
- package/cjs/render/contributions/render/contributions/image-contribution-render.js +2 -2
- package/cjs/render/contributions/render/contributions/image-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/draw-contribution.js +2 -1
- package/cjs/render/contributions/render/draw-contribution.js.map +1 -1
- package/cjs/render/contributions/render/image-render.js.map +1 -1
- package/cjs/resource-loader/loader.js +1 -1
- package/cjs/resource-loader/loader.js.map +1 -1
- package/dist/index.es.js +376 -82
- package/es/core/global.d.ts +0 -3
- package/es/core/global.js +1 -8
- package/es/core/global.js.map +1 -1
- package/es/graphic/config.js +1 -0
- package/es/graphic/config.js.map +1 -1
- package/es/graphic/graphic.d.ts +1 -1
- package/es/graphic/graphic.js +5 -5
- package/es/graphic/graphic.js.map +1 -1
- package/es/graphic/richtext/line.js +1 -1
- package/es/graphic/richtext/line.js.map +1 -1
- package/es/graphic/richtext/paragraph.d.ts +1 -1
- package/es/graphic/richtext/paragraph.js +32 -7
- package/es/graphic/richtext/paragraph.js.map +1 -1
- package/es/graphic/richtext.js +4 -1
- package/es/graphic/richtext.js.map +1 -1
- package/es/interface/global.d.ts +0 -1
- package/es/interface/global.js.map +1 -1
- package/es/interface/graphic/richText.d.ts +10 -0
- package/es/interface/graphic/richText.js.map +1 -1
- package/es/interface/graphic.d.ts +1 -1
- package/es/interface/graphic.js.map +1 -1
- package/es/plugins/builtin-plugin/edit-module.d.ts +2 -1
- package/es/plugins/builtin-plugin/edit-module.js +15 -11
- package/es/plugins/builtin-plugin/edit-module.js.map +1 -1
- package/es/plugins/builtin-plugin/richtext-edit-plugin.d.ts +30 -6
- package/es/plugins/builtin-plugin/richtext-edit-plugin.js +248 -73
- package/es/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -1
- package/es/render/contributions/render/contributions/image-contribution-render.d.ts +1 -1
- package/es/render/contributions/render/contributions/image-contribution-render.js +2 -2
- package/es/render/contributions/render/contributions/image-contribution-render.js.map +1 -1
- package/es/render/contributions/render/draw-contribution.js +1 -1
- package/es/render/contributions/render/draw-contribution.js.map +1 -1
- package/es/render/contributions/render/image-render.js.map +1 -1
- package/es/resource-loader/loader.js +1 -1
- package/es/resource-loader/loader.js.map +1 -1
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -855,12 +855,6 @@ let DefaultGlobal = class DefaultGlobal {
|
|
|
855
855
|
get env() {
|
|
856
856
|
return this._env;
|
|
857
857
|
}
|
|
858
|
-
get isImageAnonymous() {
|
|
859
|
-
return this._isImageAnonymous;
|
|
860
|
-
}
|
|
861
|
-
set isImageAnonymous(isImageAnonymous) {
|
|
862
|
-
this._isImageAnonymous = isImageAnonymous;
|
|
863
|
-
}
|
|
864
858
|
get devicePixelRatio() {
|
|
865
859
|
if (!this._env) {
|
|
866
860
|
this.setEnv(defaultEnv);
|
|
@@ -929,7 +923,6 @@ let DefaultGlobal = class DefaultGlobal {
|
|
|
929
923
|
}
|
|
930
924
|
constructor(contributions) {
|
|
931
925
|
this.contributions = contributions;
|
|
932
|
-
this._isImageAnonymous = true;
|
|
933
926
|
this.id = Generator.GenAutoIncrementId();
|
|
934
927
|
this.hooks = {
|
|
935
928
|
onSetEnv: new SyncHook(['lastEnv', 'env', 'global'])
|
|
@@ -3314,7 +3307,7 @@ const DefaultRectAttribute = Object.assign(Object.assign({}, DefaultAttribute),
|
|
|
3314
3307
|
const DefaultRect3dAttribute = Object.assign(Object.assign({}, DefaultAttribute), { width: 0, height: 0, x1: 0, y1: 0, cornerRadius: 0, length: 0, cornerType: 'round' });
|
|
3315
3308
|
const DefaultSymbolAttribute = Object.assign(Object.assign({}, DefaultAttribute), { symbolType: 'circle', size: 10, keepDirIn3d: true, clipRange: 1 });
|
|
3316
3309
|
const DefaultTextAttribute = Object.assign(Object.assign(Object.assign({}, DefaultAttribute), DefaultTextStyle), { strokeBoundsBuffer: 0, keepDirIn3d: true });
|
|
3317
|
-
const DefaultRichTextAttribute = Object.assign(Object.assign(Object.assign({}, DefaultAttribute), DefaultTextStyle), { editable: false, width: 300, height: 300, ellipsis: true, wordBreak: 'break-word', verticalDirection: 'top', textAlign: 'left', textBaseline: 'top', layoutDirection: 'horizontal', textConfig: [], disableAutoWrapLine: false, maxHeight: undefined, maxWidth: undefined, singleLine: false });
|
|
3310
|
+
const DefaultRichTextAttribute = Object.assign(Object.assign(Object.assign({}, DefaultAttribute), DefaultTextStyle), { editable: false, editOptions: null, width: 300, height: 300, ellipsis: true, wordBreak: 'break-word', verticalDirection: 'top', textAlign: 'left', textBaseline: 'top', layoutDirection: 'horizontal', textConfig: [], disableAutoWrapLine: false, maxHeight: undefined, maxWidth: undefined, singleLine: false });
|
|
3318
3311
|
const DefaultImageAttribute = Object.assign(Object.assign({ repeatX: 'no-repeat', repeatY: 'no-repeat', image: '', width: 0, height: 0 }, DefaultAttribute), { fill: true, cornerRadius: 0, cornerType: 'round' });
|
|
3319
3312
|
const DefaultRichTextIconAttribute = Object.assign(Object.assign({}, DefaultImageAttribute), { backgroundShowMode: 'never', backgroundWidth: 0, backgroundHeight: 0, textAlign: 'left', textBaseline: 'middle', direction: 'horizontal', margin: 0, id: '', width: 20, height: 20, backgroundFill: 'rgba(101, 117, 168, 0.1)', backgroundFillOpacity: 1, backgroundStroke: false, backgroundStrokeOpacity: 1, backgroundRadius: 4, opacity: 1 });
|
|
3320
3313
|
|
|
@@ -11737,10 +11730,10 @@ class ResourceLoader {
|
|
|
11737
11730
|
static GetFile(url, type) {
|
|
11738
11731
|
let data = ResourceLoader.cache.get(url);
|
|
11739
11732
|
if (data) {
|
|
11740
|
-
if (data.loadState === 'fail') {
|
|
11733
|
+
if (data.loadState === 'init' || data.loadState === 'fail') {
|
|
11741
11734
|
return Promise.reject();
|
|
11742
11735
|
}
|
|
11743
|
-
else if (data.loadState === '
|
|
11736
|
+
else if (data.loadState === 'loading') {
|
|
11744
11737
|
return data.dataPromise.then(data => data.data);
|
|
11745
11738
|
}
|
|
11746
11739
|
return Promise.resolve(data.data);
|
|
@@ -11909,7 +11902,7 @@ class Graphic extends Node {
|
|
|
11909
11902
|
}
|
|
11910
11903
|
}
|
|
11911
11904
|
get AABBBounds() {
|
|
11912
|
-
return this.tryUpdateAABBBounds(
|
|
11905
|
+
return this.tryUpdateAABBBounds();
|
|
11913
11906
|
}
|
|
11914
11907
|
get OBBBounds() {
|
|
11915
11908
|
return this.tryUpdateOBBBounds();
|
|
@@ -11964,7 +11957,8 @@ class Graphic extends Node {
|
|
|
11964
11957
|
onAnimateBind(animate) {
|
|
11965
11958
|
this._emitCustomEvent('animate-bind', animate);
|
|
11966
11959
|
}
|
|
11967
|
-
tryUpdateAABBBounds(
|
|
11960
|
+
tryUpdateAABBBounds() {
|
|
11961
|
+
const full = this.attribute.boundsMode === 'imprecise';
|
|
11968
11962
|
if (!this.shouldUpdateAABBBounds()) {
|
|
11969
11963
|
return this._AABBBounds;
|
|
11970
11964
|
}
|
|
@@ -11975,6 +11969,9 @@ class Graphic extends Node {
|
|
|
11975
11969
|
application.graphicService.beforeUpdateAABBBounds(this, this.stage, true, this._AABBBounds);
|
|
11976
11970
|
const bounds = this.doUpdateAABBBounds(full);
|
|
11977
11971
|
application.graphicService.afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, true);
|
|
11972
|
+
if (this.attribute.boundsMode === 'empty') {
|
|
11973
|
+
bounds.clear();
|
|
11974
|
+
}
|
|
11978
11975
|
return bounds;
|
|
11979
11976
|
}
|
|
11980
11977
|
tryUpdateOBBBounds() {
|
|
@@ -12402,11 +12399,11 @@ class Graphic extends Node {
|
|
|
12402
12399
|
}
|
|
12403
12400
|
update(d) {
|
|
12404
12401
|
if (d) {
|
|
12405
|
-
d.bounds && this.tryUpdateAABBBounds(
|
|
12402
|
+
d.bounds && this.tryUpdateAABBBounds();
|
|
12406
12403
|
d.trans && this.tryUpdateLocalTransMatrix();
|
|
12407
12404
|
}
|
|
12408
12405
|
else {
|
|
12409
|
-
this.tryUpdateAABBBounds(
|
|
12406
|
+
this.tryUpdateAABBBounds();
|
|
12410
12407
|
this.tryUpdateLocalTransMatrix();
|
|
12411
12408
|
}
|
|
12412
12409
|
}
|
|
@@ -17839,6 +17836,22 @@ class Frame {
|
|
|
17839
17836
|
}
|
|
17840
17837
|
}
|
|
17841
17838
|
|
|
17839
|
+
function getFixedLRTB(left, right, top, bottom) {
|
|
17840
|
+
const leftInt = Math.round(left);
|
|
17841
|
+
const topInt = Math.round(top);
|
|
17842
|
+
const rightInt = Math.round(right);
|
|
17843
|
+
const bottomInt = Math.round(bottom);
|
|
17844
|
+
const _left = left > leftInt ? leftInt : leftInt - 0.5;
|
|
17845
|
+
const _top = top > topInt ? topInt : topInt - 0.5;
|
|
17846
|
+
const _right = rightInt > right ? rightInt : rightInt + 0.5;
|
|
17847
|
+
const _bottom = bottomInt > bottom ? bottomInt : bottomInt + 0.5;
|
|
17848
|
+
return {
|
|
17849
|
+
left: _left,
|
|
17850
|
+
top: _top,
|
|
17851
|
+
right: _right,
|
|
17852
|
+
bottom: _bottom
|
|
17853
|
+
};
|
|
17854
|
+
}
|
|
17842
17855
|
class Paragraph {
|
|
17843
17856
|
constructor(text, newLine, character) {
|
|
17844
17857
|
this.fontSize = character.fontSize || 16;
|
|
@@ -17905,7 +17918,7 @@ class Paragraph {
|
|
|
17905
17918
|
this.height = this.widthOrigin;
|
|
17906
17919
|
}
|
|
17907
17920
|
}
|
|
17908
|
-
draw(ctx, top, ascent, deltaLeft, isLineFirst, textAlign) {
|
|
17921
|
+
draw(ctx, top, ascent, deltaLeft, isLineFirst, textAlign, lineHeight) {
|
|
17909
17922
|
let baseline = top + ascent;
|
|
17910
17923
|
let text = this.text;
|
|
17911
17924
|
let left = this.left + deltaLeft;
|
|
@@ -17961,7 +17974,10 @@ class Paragraph {
|
|
|
17961
17974
|
if (this.character.backgroundOpacity !== void 0) {
|
|
17962
17975
|
ctx.globalAlpha = this.character.backgroundOpacity;
|
|
17963
17976
|
}
|
|
17964
|
-
|
|
17977
|
+
const right = left + (this.widthOrigin || this.width);
|
|
17978
|
+
const bottom = top + lineHeight;
|
|
17979
|
+
const lrtb = getFixedLRTB(left, right, top, bottom);
|
|
17980
|
+
ctx.fillRect(lrtb.left, lrtb.top, lrtb.right - lrtb.left, lrtb.bottom - lrtb.top);
|
|
17965
17981
|
ctx.fillStyle = fillStyle;
|
|
17966
17982
|
ctx.globalAlpha = globalAlpha;
|
|
17967
17983
|
}
|
|
@@ -17974,19 +17990,35 @@ class Paragraph {
|
|
|
17974
17990
|
ctx.fillText(text, left, baseline);
|
|
17975
17991
|
}
|
|
17976
17992
|
if (this.character.fill) {
|
|
17977
|
-
if (
|
|
17993
|
+
if (this.character.lineThrough || this.character.underline) {
|
|
17978
17994
|
if (this.character.underline) {
|
|
17979
|
-
|
|
17995
|
+
const top = 1 + baseline;
|
|
17996
|
+
const right = left + (this.widthOrigin || this.width);
|
|
17997
|
+
const bottom = top + (this.character.fontSize ? Math.max(1, Math.floor(this.character.fontSize / 10)) : 1);
|
|
17998
|
+
const lrtb = getFixedLRTB(left, right, top, bottom);
|
|
17999
|
+
ctx.fillRect(lrtb.left, lrtb.top, lrtb.right - lrtb.left, lrtb.bottom - lrtb.top);
|
|
17980
18000
|
}
|
|
17981
18001
|
if (this.character.lineThrough) {
|
|
17982
|
-
|
|
18002
|
+
const top = 1 + baseline - this.ascent / 2;
|
|
18003
|
+
const right = left + (this.widthOrigin || this.width);
|
|
18004
|
+
const bottom = top + (this.character.fontSize ? Math.max(1, Math.floor(this.character.fontSize / 10)) : 1);
|
|
18005
|
+
const lrtb = getFixedLRTB(left, right, top, bottom);
|
|
18006
|
+
ctx.fillRect(lrtb.left, lrtb.top, lrtb.right - lrtb.left, lrtb.bottom - lrtb.top);
|
|
17983
18007
|
}
|
|
17984
18008
|
}
|
|
17985
18009
|
else if (this.character.textDecoration === 'underline') {
|
|
17986
|
-
|
|
18010
|
+
const top = 1 + baseline;
|
|
18011
|
+
const right = left + (this.widthOrigin || this.width);
|
|
18012
|
+
const bottom = top + (this.character.fontSize ? Math.max(1, Math.floor(this.character.fontSize / 10)) : 1);
|
|
18013
|
+
const lrtb = getFixedLRTB(left, right, top, bottom);
|
|
18014
|
+
ctx.fillRect(lrtb.left, lrtb.top, lrtb.right - lrtb.left, lrtb.bottom - lrtb.top);
|
|
17987
18015
|
}
|
|
17988
18016
|
else if (this.character.textDecoration === 'line-through') {
|
|
17989
|
-
|
|
18017
|
+
const top = 1 + baseline - this.ascent / 2;
|
|
18018
|
+
const right = left + (this.widthOrigin || this.width);
|
|
18019
|
+
const bottom = top + (this.character.fontSize ? Math.max(1, Math.floor(this.character.fontSize / 10)) : 1);
|
|
18020
|
+
const lrtb = getFixedLRTB(left, right, top, bottom);
|
|
18021
|
+
ctx.fillRect(lrtb.left, lrtb.top, lrtb.right - lrtb.left, lrtb.bottom - lrtb.top);
|
|
17990
18022
|
}
|
|
17991
18023
|
}
|
|
17992
18024
|
if (direction === 'vertical') {
|
|
@@ -18342,7 +18374,7 @@ class Line {
|
|
|
18342
18374
|
};
|
|
18343
18375
|
applyStrokeStyle(ctx, paragraph.character);
|
|
18344
18376
|
applyFillStyle(ctx, paragraph.character, b);
|
|
18345
|
-
paragraph.draw(ctx, y, this.ascent, x, index === 0, this.textAlign);
|
|
18377
|
+
paragraph.draw(ctx, y, this.ascent, x, index === 0, this.textAlign, this.height);
|
|
18346
18378
|
});
|
|
18347
18379
|
}
|
|
18348
18380
|
getWidthWithEllips(ellipsis) {
|
|
@@ -18692,7 +18724,8 @@ class RichText extends Graphic {
|
|
|
18692
18724
|
return tc;
|
|
18693
18725
|
}
|
|
18694
18726
|
updateAABBBounds(attribute, richtextTheme, aabbBounds) {
|
|
18695
|
-
|
|
18727
|
+
var _a, _b;
|
|
18728
|
+
const { width = richtextTheme.width, height = richtextTheme.height, maxWidth = richtextTheme.maxWidth, maxHeight = richtextTheme.maxHeight, textAlign = richtextTheme.textAlign, textBaseline = richtextTheme.textBaseline, editOptions } = attribute;
|
|
18696
18729
|
if (width > 0 && height > 0) {
|
|
18697
18730
|
aabbBounds.set(0, 0, width, height);
|
|
18698
18731
|
}
|
|
@@ -18705,6 +18738,10 @@ class RichText extends Graphic {
|
|
|
18705
18738
|
contentWidth = typeof maxWidth === 'number' && contentWidth > maxWidth ? maxWidth : contentWidth || 0;
|
|
18706
18739
|
aabbBounds.set(0, 0, contentWidth, contentHeight);
|
|
18707
18740
|
}
|
|
18741
|
+
if (editOptions && editOptions.keepHeightWhileEmpty && !aabbBounds.height() && !((_a = attribute.textConfig) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
18742
|
+
aabbBounds.y2 = aabbBounds.y1 + ((_b = attribute.fontSize) !== null && _b !== void 0 ? _b : 12);
|
|
18743
|
+
aabbBounds.x2 = aabbBounds.x1 + 2;
|
|
18744
|
+
}
|
|
18708
18745
|
let deltaY = 0;
|
|
18709
18746
|
switch (textBaseline) {
|
|
18710
18747
|
case 'top':
|
|
@@ -20726,8 +20763,8 @@ class DefaultImageRenderContribution extends DefaultRectRenderContribution {
|
|
|
20726
20763
|
this.useStyle = true;
|
|
20727
20764
|
this.order = 0;
|
|
20728
20765
|
}
|
|
20729
|
-
drawShape(
|
|
20730
|
-
return super.drawShape(
|
|
20766
|
+
drawShape(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb) {
|
|
20767
|
+
return super.drawShape(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb);
|
|
20731
20768
|
}
|
|
20732
20769
|
}
|
|
20733
20770
|
const defaultImageRenderContribution = new DefaultImageRenderContribution();
|
|
@@ -24445,7 +24482,9 @@ let DefaultDrawContribution = class DefaultDrawContribution {
|
|
|
24445
24482
|
tempBounds = this.dirtyBounds.clone().transformWithMatrix(this.scrollMatrix);
|
|
24446
24483
|
}
|
|
24447
24484
|
if (this.useDirtyBounds &&
|
|
24448
|
-
!(graphic.isContainer ||
|
|
24485
|
+
!(graphic.isContainer ||
|
|
24486
|
+
graphic.attribute.boundsMode === 'empty' ||
|
|
24487
|
+
isRectIntersect(graphic.AABBBounds, tempBounds !== null && tempBounds !== void 0 ? tempBounds : this.dirtyBounds, false))) {
|
|
24449
24488
|
if (retrans && graphic.parent) {
|
|
24450
24489
|
const { scrollX = 0, scrollY = 0 } = graphic.parent.attribute;
|
|
24451
24490
|
this.scrollMatrix && this.scrollMatrix.translate(scrollX, scrollY);
|
|
@@ -26935,6 +26974,20 @@ function flatten_simplify(points, tolerance, highestQuality) {
|
|
|
26935
26974
|
return points;
|
|
26936
26975
|
}
|
|
26937
26976
|
|
|
26977
|
+
function getDefaultCharacterConfig(attribute) {
|
|
26978
|
+
const { fill = 'black', stroke = false, fontWeight = 'normal', fontFamily = 'Arial' } = attribute;
|
|
26979
|
+
let { fontSize = 12 } = attribute;
|
|
26980
|
+
if (!isFinite(fontSize)) {
|
|
26981
|
+
fontSize = 12;
|
|
26982
|
+
}
|
|
26983
|
+
return {
|
|
26984
|
+
fill,
|
|
26985
|
+
stroke,
|
|
26986
|
+
fontSize,
|
|
26987
|
+
fontWeight,
|
|
26988
|
+
fontFamily
|
|
26989
|
+
};
|
|
26990
|
+
}
|
|
26938
26991
|
function findConfigIndexByCursorIdx(textConfig, cursorIndex) {
|
|
26939
26992
|
if (cursorIndex < 0) {
|
|
26940
26993
|
return 0;
|
|
@@ -27016,7 +27069,7 @@ class EditModule {
|
|
|
27016
27069
|
this.composingConfigIdx = this.cursorIndex < 0 ? 0 : findConfigIndexByCursorIdx(textConfig, this.cursorIndex);
|
|
27017
27070
|
if (this.cursorIndex < 0) {
|
|
27018
27071
|
const config = textConfig[0];
|
|
27019
|
-
textConfig.unshift(Object.assign(Object.assign({
|
|
27072
|
+
textConfig.unshift(Object.assign(Object.assign(Object.assign({}, getDefaultCharacterConfig(this.currRt.attribute)), config), { text: '' }));
|
|
27020
27073
|
}
|
|
27021
27074
|
else {
|
|
27022
27075
|
const configIdx = this.composingConfigIdx;
|
|
@@ -27033,14 +27086,13 @@ class EditModule {
|
|
|
27033
27086
|
});
|
|
27034
27087
|
};
|
|
27035
27088
|
this.handleInput = (ev) => {
|
|
27036
|
-
var _a, _b, _c, _d;
|
|
27037
27089
|
if (!this.currRt) {
|
|
27038
27090
|
return;
|
|
27039
27091
|
}
|
|
27040
27092
|
if (ev.inputType === 'historyUndo') {
|
|
27041
27093
|
return;
|
|
27042
27094
|
}
|
|
27043
|
-
const
|
|
27095
|
+
const _a = this.currRt.attribute, { textConfig = [] } = _a, rest = __rest(_a, ["textConfig"]);
|
|
27044
27096
|
if (ev.type === 'Backspace' && !textConfig.length) {
|
|
27045
27097
|
return;
|
|
27046
27098
|
}
|
|
@@ -27056,12 +27108,7 @@ class EditModule {
|
|
|
27056
27108
|
const lastConfigIdx = this.isComposing ? this.composingConfigIdx : Math.max(startIdx - 1, 0);
|
|
27057
27109
|
let lastConfig = textConfig[lastConfigIdx];
|
|
27058
27110
|
if (!lastConfig) {
|
|
27059
|
-
lastConfig =
|
|
27060
|
-
fill: (_a = rest.fill) !== null && _a !== void 0 ? _a : 'black',
|
|
27061
|
-
stroke: (_b = rest.stroke) !== null && _b !== void 0 ? _b : false,
|
|
27062
|
-
fontSize: (_c = rest.fontSize) !== null && _c !== void 0 ? _c : 12,
|
|
27063
|
-
fontWeight: (_d = rest.fontWeight) !== null && _d !== void 0 ? _d : 'normal'
|
|
27064
|
-
};
|
|
27111
|
+
lastConfig = getDefaultCharacterConfig(rest);
|
|
27065
27112
|
}
|
|
27066
27113
|
let nextConfig = lastConfig;
|
|
27067
27114
|
if (startIdx !== endIdx) {
|
|
@@ -27219,6 +27266,9 @@ class Selection {
|
|
|
27219
27266
|
}
|
|
27220
27267
|
let idx = Math.round(cursorIdx);
|
|
27221
27268
|
const config = this.rt.attribute.textConfig;
|
|
27269
|
+
if (!config.length) {
|
|
27270
|
+
return null;
|
|
27271
|
+
}
|
|
27222
27272
|
for (let i = 0; i < config.length; i++) {
|
|
27223
27273
|
if (config[i].text !== '\n') {
|
|
27224
27274
|
idx--;
|
|
@@ -27247,6 +27297,7 @@ class Selection {
|
|
|
27247
27297
|
}
|
|
27248
27298
|
}
|
|
27249
27299
|
const FORMAT_TEXT_COMMAND = 'FORMAT_TEXT_COMMAND';
|
|
27300
|
+
const FORMAT_ALL_TEXT_COMMAND = 'FORMAT_ALL_TEXT_COMMAND';
|
|
27250
27301
|
const FORMAT_ELEMENT_COMMAND = 'FORMAT_ELEMENT_COMMAND';
|
|
27251
27302
|
class RichTextEditPlugin {
|
|
27252
27303
|
static tryUpdateRichtext(richtext) {
|
|
@@ -27270,7 +27321,33 @@ class RichTextEditPlugin {
|
|
|
27270
27321
|
this._uid = Generator.GenAutoIncrementId();
|
|
27271
27322
|
this.key = this.name + this._uid;
|
|
27272
27323
|
this.editing = false;
|
|
27324
|
+
this.focusing = false;
|
|
27273
27325
|
this.pointerDown = false;
|
|
27326
|
+
this.formatTextCommandCb = (payload, p) => {
|
|
27327
|
+
const rt = p.currRt;
|
|
27328
|
+
if (!rt) {
|
|
27329
|
+
return;
|
|
27330
|
+
}
|
|
27331
|
+
const selectionData = p.getSelection();
|
|
27332
|
+
if (!selectionData) {
|
|
27333
|
+
return;
|
|
27334
|
+
}
|
|
27335
|
+
const { selectionStartCursorIdx, curCursorIdx } = selectionData;
|
|
27336
|
+
const minCursorIdx = Math.min(selectionStartCursorIdx, curCursorIdx);
|
|
27337
|
+
const maxCursorIdx = Math.max(selectionStartCursorIdx, curCursorIdx);
|
|
27338
|
+
const minConfigIdx = findConfigIndexByCursorIdx(rt.attribute.textConfig, minCursorIdx);
|
|
27339
|
+
const maxConfigIdx = findConfigIndexByCursorIdx(rt.attribute.textConfig, maxCursorIdx);
|
|
27340
|
+
const config = rt.attribute.textConfig.slice(minConfigIdx, maxConfigIdx);
|
|
27341
|
+
this._formatTextCommand(payload, config, rt);
|
|
27342
|
+
};
|
|
27343
|
+
this.formatAllTextCommandCb = (payload, p) => {
|
|
27344
|
+
const rt = p.currRt;
|
|
27345
|
+
if (!rt) {
|
|
27346
|
+
return;
|
|
27347
|
+
}
|
|
27348
|
+
const config = rt.attribute.textConfig;
|
|
27349
|
+
this._formatTextCommand(payload, config, rt);
|
|
27350
|
+
};
|
|
27274
27351
|
this.handleKeyDown = (e) => {
|
|
27275
27352
|
if (!(this.currRt && this.editing)) {
|
|
27276
27353
|
return;
|
|
@@ -27286,10 +27363,20 @@ class RichTextEditPlugin {
|
|
|
27286
27363
|
}
|
|
27287
27364
|
};
|
|
27288
27365
|
this.handleInput = (text, isComposing, cursorIdx, rt) => {
|
|
27366
|
+
if (!this.currRt) {
|
|
27367
|
+
return;
|
|
27368
|
+
}
|
|
27369
|
+
this.tryShowShadowPlaceholder();
|
|
27370
|
+
this.tryShowInputBounds();
|
|
27289
27371
|
this.hideSelection();
|
|
27290
27372
|
this.updateCbs.forEach(cb => cb('input', this));
|
|
27291
27373
|
};
|
|
27292
27374
|
this.handleChange = (text, isComposing, cursorIdx, rt) => {
|
|
27375
|
+
if (!this.currRt) {
|
|
27376
|
+
return;
|
|
27377
|
+
}
|
|
27378
|
+
this.tryShowShadowPlaceholder();
|
|
27379
|
+
this.tryShowInputBounds();
|
|
27293
27380
|
this.curCursorIdx = cursorIdx;
|
|
27294
27381
|
this.selectionStartCursorIdx = cursorIdx;
|
|
27295
27382
|
const p = this.computedCursorPosByCursorIdx(cursorIdx, rt);
|
|
@@ -27298,13 +27385,10 @@ class RichTextEditPlugin {
|
|
|
27298
27385
|
this.updateCbs.forEach(cb => cb('change', this));
|
|
27299
27386
|
};
|
|
27300
27387
|
this.handleFocusIn = () => {
|
|
27388
|
+
throw new Error('不会走到这里 handleFocusIn');
|
|
27301
27389
|
};
|
|
27302
27390
|
this.handleFocusOut = () => {
|
|
27303
|
-
|
|
27304
|
-
this.deFocus();
|
|
27305
|
-
this.pointerDown = false;
|
|
27306
|
-
this.triggerRender();
|
|
27307
|
-
this.updateCbs.forEach(cb => cb('defocus', this));
|
|
27391
|
+
throw new Error('不会走到这里 handleFocusOut');
|
|
27308
27392
|
};
|
|
27309
27393
|
this.handleMove = (e) => {
|
|
27310
27394
|
if (!this.isRichtext(e)) {
|
|
@@ -27328,7 +27412,7 @@ class RichTextEditPlugin {
|
|
|
27328
27412
|
this.onFocus(e);
|
|
27329
27413
|
}
|
|
27330
27414
|
else {
|
|
27331
|
-
this.deFocus();
|
|
27415
|
+
this.deFocus(true);
|
|
27332
27416
|
}
|
|
27333
27417
|
this.triggerRender();
|
|
27334
27418
|
this.pointerDown = true;
|
|
@@ -27345,27 +27429,14 @@ class RichTextEditPlugin {
|
|
|
27345
27429
|
};
|
|
27346
27430
|
this.commandCbs = new Map();
|
|
27347
27431
|
this.commandCbs.set(FORMAT_TEXT_COMMAND, [this.formatTextCommandCb]);
|
|
27432
|
+
this.commandCbs.set(FORMAT_ALL_TEXT_COMMAND, [this.formatAllTextCommandCb]);
|
|
27348
27433
|
this.updateCbs = [];
|
|
27349
27434
|
this.timeline = new DefaultTimeline();
|
|
27350
27435
|
this.ticker = new DefaultTicker([this.timeline]);
|
|
27351
27436
|
this.deltaX = 0;
|
|
27352
27437
|
this.deltaY = 0;
|
|
27353
27438
|
}
|
|
27354
|
-
|
|
27355
|
-
const rt = p.currRt;
|
|
27356
|
-
if (!rt) {
|
|
27357
|
-
return;
|
|
27358
|
-
}
|
|
27359
|
-
const selectionData = p.getSelection();
|
|
27360
|
-
if (!selectionData) {
|
|
27361
|
-
return;
|
|
27362
|
-
}
|
|
27363
|
-
const { selectionStartCursorIdx, curCursorIdx } = selectionData;
|
|
27364
|
-
const minCursorIdx = Math.min(selectionStartCursorIdx, curCursorIdx);
|
|
27365
|
-
const maxCursorIdx = Math.max(selectionStartCursorIdx, curCursorIdx);
|
|
27366
|
-
const minConfigIdx = findConfigIndexByCursorIdx(rt.attribute.textConfig, minCursorIdx);
|
|
27367
|
-
const maxConfigIdx = findConfigIndexByCursorIdx(rt.attribute.textConfig, maxCursorIdx);
|
|
27368
|
-
const config = rt.attribute.textConfig.slice(minConfigIdx, maxConfigIdx);
|
|
27439
|
+
_formatTextCommand(payload, config, rt) {
|
|
27369
27440
|
if (payload === 'bold') {
|
|
27370
27441
|
config.forEach((item) => (item.fontWeight = 'bold'));
|
|
27371
27442
|
}
|
|
@@ -27382,6 +27453,12 @@ class RichTextEditPlugin {
|
|
|
27382
27453
|
config.forEach((item) => merge(item, payload));
|
|
27383
27454
|
}
|
|
27384
27455
|
rt.setAttributes(rt.attribute);
|
|
27456
|
+
const cache = rt.getFrameCache();
|
|
27457
|
+
if (!cache) {
|
|
27458
|
+
return;
|
|
27459
|
+
}
|
|
27460
|
+
this.selectionRangeByCursorIdx(this.selectionStartCursorIdx, this.curCursorIdx, cache);
|
|
27461
|
+
this.tryShowInputBounds();
|
|
27385
27462
|
}
|
|
27386
27463
|
dispatchCommand(command, payload) {
|
|
27387
27464
|
const cbs = this.commandCbs.get(command);
|
|
@@ -27392,10 +27469,24 @@ class RichTextEditPlugin {
|
|
|
27392
27469
|
const cbs = this.commandCbs.get(command) || [];
|
|
27393
27470
|
cbs.push(cb);
|
|
27394
27471
|
}
|
|
27472
|
+
removeCommand(command, cb) {
|
|
27473
|
+
const cbs = this.commandCbs.get(command) || [];
|
|
27474
|
+
const idx = cbs.indexOf(cb);
|
|
27475
|
+
if (idx > -1) {
|
|
27476
|
+
cbs.splice(idx, 1);
|
|
27477
|
+
}
|
|
27478
|
+
}
|
|
27395
27479
|
registerUpdateListener(cb) {
|
|
27396
27480
|
const cbs = this.updateCbs || [];
|
|
27397
27481
|
cbs.push(cb);
|
|
27398
27482
|
}
|
|
27483
|
+
removeUpdateListener(cb) {
|
|
27484
|
+
const cbs = this.updateCbs || [];
|
|
27485
|
+
const idx = cbs.indexOf(cb);
|
|
27486
|
+
if (idx > -1) {
|
|
27487
|
+
cbs.splice(idx, 1);
|
|
27488
|
+
}
|
|
27489
|
+
}
|
|
27399
27490
|
activate(context) {
|
|
27400
27491
|
this.pluginService = context;
|
|
27401
27492
|
this.editModule = new EditModule();
|
|
@@ -27436,8 +27527,11 @@ class RichTextEditPlugin {
|
|
|
27436
27527
|
}
|
|
27437
27528
|
startIdx = Math.min(Math.max(startIdx, -0.1), totalCursorCount + 0.1);
|
|
27438
27529
|
endIdx = Math.min(Math.max(endIdx, -0.1), totalCursorCount + 0.1);
|
|
27439
|
-
this.
|
|
27440
|
-
|
|
27530
|
+
this.selectionRangeByCursorIdx(startIdx, endIdx, cache);
|
|
27531
|
+
}
|
|
27532
|
+
selectionRangeByCursorIdx(startCursorIdx, endCursorIdx, cache) {
|
|
27533
|
+
this.curCursorIdx = endCursorIdx;
|
|
27534
|
+
this.selectionStartCursorIdx = startCursorIdx;
|
|
27441
27535
|
const { x, y1, y2 } = this.computedCursorPosByCursorIdx(this.selectionStartCursorIdx, this.currRt);
|
|
27442
27536
|
this.startCursorPos = { x, y: (y1 + y2) / 2 };
|
|
27443
27537
|
const pos = this.computedCursorPosByCursorIdx(this.curCursorIdx, this.currRt);
|
|
@@ -27552,6 +27646,79 @@ class RichTextEditPlugin {
|
|
|
27552
27646
|
}
|
|
27553
27647
|
return true;
|
|
27554
27648
|
}
|
|
27649
|
+
tryShowShadowPlaceholder() {
|
|
27650
|
+
if (!this.currRt) {
|
|
27651
|
+
return;
|
|
27652
|
+
}
|
|
27653
|
+
const shadowRoot = this.currRt.shadowRoot;
|
|
27654
|
+
if (shadowRoot) {
|
|
27655
|
+
const placeholder = shadowRoot.getElementsByType('richtext')[0];
|
|
27656
|
+
placeholder && shadowRoot.removeChild(placeholder);
|
|
27657
|
+
}
|
|
27658
|
+
const { textConfig, editOptions } = this.currRt.attribute;
|
|
27659
|
+
if (textConfig && textConfig.length) {
|
|
27660
|
+
return;
|
|
27661
|
+
}
|
|
27662
|
+
if (!(editOptions && editOptions.placeholder)) {
|
|
27663
|
+
return;
|
|
27664
|
+
}
|
|
27665
|
+
const { placeholder, placeholderColor = 'rgba(0, 0, 0, 0.6)', placeholderFontFamily, placeholderFontSize } = editOptions;
|
|
27666
|
+
const shadow = this.currRt.shadowRoot || this.currRt.attachShadow();
|
|
27667
|
+
this.shadowPlaceHolder = createRichText(Object.assign(Object.assign({}, this.currRt.attribute), { x: 0, y: 0, angle: 0, _debug_bounds: false, textConfig: [
|
|
27668
|
+
{ text: placeholder, fill: placeholderColor, fontFamily: placeholderFontFamily, fontSize: placeholderFontSize }
|
|
27669
|
+
] }));
|
|
27670
|
+
shadow.add(this.shadowPlaceHolder);
|
|
27671
|
+
}
|
|
27672
|
+
tryShowInputBounds() {
|
|
27673
|
+
if (!(this.currRt && this.focusing)) {
|
|
27674
|
+
return;
|
|
27675
|
+
}
|
|
27676
|
+
const { editOptions = {} } = this.currRt.attribute;
|
|
27677
|
+
const { boundsStrokeWhenInput } = editOptions;
|
|
27678
|
+
if (!editOptions || !boundsStrokeWhenInput) {
|
|
27679
|
+
return;
|
|
27680
|
+
}
|
|
27681
|
+
const { attribute } = this.currRt;
|
|
27682
|
+
const b = this.currRt.AABBBounds;
|
|
27683
|
+
let h = b.height();
|
|
27684
|
+
if (!attribute.textConfig.length && this.editLine) {
|
|
27685
|
+
const { points } = this.editLine.attribute;
|
|
27686
|
+
h = points[1].y - points[0].y;
|
|
27687
|
+
}
|
|
27688
|
+
this.shadowBounds = this.shadowBounds || createRect({});
|
|
27689
|
+
this.shadowBounds.setAttributes({
|
|
27690
|
+
x: 0,
|
|
27691
|
+
y: 0,
|
|
27692
|
+
width: b.width(),
|
|
27693
|
+
height: h,
|
|
27694
|
+
fill: false,
|
|
27695
|
+
stroke: boundsStrokeWhenInput,
|
|
27696
|
+
lineWidth: 1,
|
|
27697
|
+
boundsMode: 'empty',
|
|
27698
|
+
zIndex: -1
|
|
27699
|
+
});
|
|
27700
|
+
const shadow = this.currRt.shadowRoot || this.currRt.attachShadow();
|
|
27701
|
+
shadow.add(this.shadowBounds);
|
|
27702
|
+
this.offsetLineBgAndShadowBounds();
|
|
27703
|
+
}
|
|
27704
|
+
trySyncPlaceholderToTextConfig() {
|
|
27705
|
+
if (!this.currRt) {
|
|
27706
|
+
return;
|
|
27707
|
+
}
|
|
27708
|
+
const { textConfig, editOptions } = this.currRt.attribute;
|
|
27709
|
+
if (textConfig && textConfig.length) {
|
|
27710
|
+
return;
|
|
27711
|
+
}
|
|
27712
|
+
if (!(editOptions && editOptions.placeholder)) {
|
|
27713
|
+
return;
|
|
27714
|
+
}
|
|
27715
|
+
const { placeholder } = editOptions;
|
|
27716
|
+
this.currRt.setAttributes({
|
|
27717
|
+
textConfig: [
|
|
27718
|
+
Object.assign({ text: placeholder }, getDefaultCharacterConfig(this.currRt.attribute))
|
|
27719
|
+
]
|
|
27720
|
+
});
|
|
27721
|
+
}
|
|
27555
27722
|
deactivate(context) {
|
|
27556
27723
|
context.stage.off('pointermove', this.handleMove);
|
|
27557
27724
|
context.stage.off('pointerdown', this.handlePointerDown);
|
|
@@ -27560,12 +27727,16 @@ class RichTextEditPlugin {
|
|
|
27560
27727
|
context.stage.off('dblclick', this.handleDBLClick);
|
|
27561
27728
|
application.global.addEventListener('keydown', this.handleKeyDown);
|
|
27562
27729
|
}
|
|
27563
|
-
onFocus(e) {
|
|
27564
|
-
this.deFocus();
|
|
27565
|
-
this.
|
|
27730
|
+
onFocus(e, data) {
|
|
27731
|
+
this.deFocus(false);
|
|
27732
|
+
this.focusing = true;
|
|
27566
27733
|
const target = e.target;
|
|
27734
|
+
if (!(target && target.type === 'richtext')) {
|
|
27735
|
+
return;
|
|
27736
|
+
}
|
|
27737
|
+
this.currRt = target;
|
|
27567
27738
|
RichTextEditPlugin.tryUpdateRichtext(target);
|
|
27568
|
-
const shadowRoot = target.attachShadow();
|
|
27739
|
+
const shadowRoot = target.shadowRoot || target.attachShadow();
|
|
27569
27740
|
const cache = target.getFrameCache();
|
|
27570
27741
|
if (!cache) {
|
|
27571
27742
|
return;
|
|
@@ -27573,16 +27744,16 @@ class RichTextEditPlugin {
|
|
|
27573
27744
|
this.computeGlobalDelta(cache);
|
|
27574
27745
|
shadowRoot.setAttributes({ shadowRootIdx: 1, pickable: false, x: this.deltaX, y: this.deltaY });
|
|
27575
27746
|
if (!this.editLine) {
|
|
27576
|
-
const line = createLine({ x: 0, y: 0, lineWidth: 1, stroke: 'black' });
|
|
27747
|
+
const line = createLine({ x: 0, y: 0, lineWidth: 1, stroke: 'black', boundsMode: 'empty' });
|
|
27577
27748
|
this.addAnimateToLine(line);
|
|
27578
27749
|
this.editLine = line;
|
|
27579
27750
|
this.ticker.start(true);
|
|
27580
|
-
const g = createGroup({ x: 0, y: 0, width: 0, height: 0 });
|
|
27751
|
+
const g = createGroup({ x: 0, y: 0, width: 0, height: 0, boundsMode: 'empty' });
|
|
27581
27752
|
this.editBg = g;
|
|
27582
27753
|
shadowRoot.add(this.editLine);
|
|
27583
27754
|
shadowRoot.add(this.editBg);
|
|
27584
27755
|
}
|
|
27585
|
-
|
|
27756
|
+
data = data || this.computedCursorPosByEvent(e, cache);
|
|
27586
27757
|
if (data) {
|
|
27587
27758
|
const { x, y1, y2, cursorIndex } = data;
|
|
27588
27759
|
this.startCursorPos = { x, y: (y1 + y2) / 2 };
|
|
@@ -27590,22 +27761,84 @@ class RichTextEditPlugin {
|
|
|
27590
27761
|
this.selectionStartCursorIdx = cursorIndex;
|
|
27591
27762
|
this.setCursorAndTextArea(x, y1, y2, target);
|
|
27592
27763
|
}
|
|
27764
|
+
else {
|
|
27765
|
+
const x = 0;
|
|
27766
|
+
const y1 = 0;
|
|
27767
|
+
const y2 = getRichTextBounds(Object.assign(Object.assign({}, target.attribute), { textConfig: [{ text: 'a' }] })).height();
|
|
27768
|
+
this.startCursorPos = { x, y: (y1 + y2) / 2 };
|
|
27769
|
+
this.curCursorIdx = -0.1;
|
|
27770
|
+
this.selectionStartCursorIdx = -0.1;
|
|
27771
|
+
this.setCursorAndTextArea(x, y1, y2, target);
|
|
27772
|
+
}
|
|
27773
|
+
this.tryShowShadowPlaceholder();
|
|
27774
|
+
this.tryShowInputBounds();
|
|
27775
|
+
this.currRt.addUpdateBoundTag();
|
|
27776
|
+
}
|
|
27777
|
+
offsetLineBgAndShadowBounds() {
|
|
27778
|
+
const rt = this.currRt;
|
|
27779
|
+
const { textBaseline } = rt.attribute;
|
|
27780
|
+
let dy = 0;
|
|
27781
|
+
let attr = rt.attribute;
|
|
27782
|
+
let b;
|
|
27783
|
+
if (textBaseline === 'middle' || textBaseline === 'bottom') {
|
|
27784
|
+
if (!attr.textConfig.length) {
|
|
27785
|
+
attr = Object.assign(Object.assign({}, attr), { textConfig: [{ text: 'a' }] });
|
|
27786
|
+
}
|
|
27787
|
+
b = getRichTextBounds(attr);
|
|
27788
|
+
}
|
|
27789
|
+
if (textBaseline === 'middle') {
|
|
27790
|
+
dy = -b.height() / 2;
|
|
27791
|
+
}
|
|
27792
|
+
else if (textBaseline === 'bottom') {
|
|
27793
|
+
dy = -b.height();
|
|
27794
|
+
}
|
|
27795
|
+
this.editLine && this.editLine.setAttributes({ dy });
|
|
27796
|
+
this.editBg && this.editBg.setAttributes({ dy });
|
|
27797
|
+
if (this.shadowBounds) {
|
|
27798
|
+
this.shadowBounds.setAttributes({ dy });
|
|
27799
|
+
}
|
|
27593
27800
|
}
|
|
27594
|
-
deFocus() {
|
|
27801
|
+
deFocus(trulyDeFocus = false) {
|
|
27595
27802
|
const target = this.currRt;
|
|
27596
27803
|
if (!target) {
|
|
27597
27804
|
return;
|
|
27598
27805
|
}
|
|
27599
|
-
|
|
27806
|
+
if (trulyDeFocus) {
|
|
27807
|
+
this.trySyncPlaceholderToTextConfig();
|
|
27808
|
+
target.detachShadow();
|
|
27809
|
+
}
|
|
27810
|
+
const currRt = this.currRt;
|
|
27600
27811
|
this.currRt = null;
|
|
27601
27812
|
if (this.editLine) {
|
|
27602
|
-
this.editLine.parent.removeChild(this.editLine);
|
|
27813
|
+
this.editLine.parent && this.editLine.parent.removeChild(this.editLine);
|
|
27603
27814
|
this.editLine.release();
|
|
27604
27815
|
this.editLine = null;
|
|
27605
|
-
this.editBg.parent.removeChild(this.editBg);
|
|
27816
|
+
this.editBg.parent && this.editBg.parent.removeChild(this.editBg);
|
|
27606
27817
|
this.editBg.release();
|
|
27607
27818
|
this.editBg = null;
|
|
27608
27819
|
}
|
|
27820
|
+
if (trulyDeFocus) {
|
|
27821
|
+
if (this.shadowBounds) {
|
|
27822
|
+
this.shadowBounds.parent && this.shadowBounds.parent.removeChild(this.shadowBounds);
|
|
27823
|
+
this.shadowBounds.release();
|
|
27824
|
+
this.shadowBounds = null;
|
|
27825
|
+
}
|
|
27826
|
+
if (this.shadowPlaceHolder) {
|
|
27827
|
+
this.shadowPlaceHolder.parent && this.shadowPlaceHolder.parent.removeChild(this.shadowPlaceHolder);
|
|
27828
|
+
this.shadowPlaceHolder.release();
|
|
27829
|
+
this.shadowPlaceHolder = null;
|
|
27830
|
+
}
|
|
27831
|
+
}
|
|
27832
|
+
this.focusing = false;
|
|
27833
|
+
const textConfig = currRt.attribute.textConfig;
|
|
27834
|
+
let lastConfig = textConfig[textConfig.length - 1];
|
|
27835
|
+
let cleared = false;
|
|
27836
|
+
while (lastConfig && lastConfig.text === '\n') {
|
|
27837
|
+
textConfig.pop();
|
|
27838
|
+
lastConfig = textConfig[textConfig.length - 1];
|
|
27839
|
+
cleared = true;
|
|
27840
|
+
}
|
|
27841
|
+
cleared && currRt.setAttributes({ textConfig });
|
|
27609
27842
|
}
|
|
27610
27843
|
addAnimateToLine(line) {
|
|
27611
27844
|
line.animates &&
|
|
@@ -27613,8 +27846,9 @@ class RichTextEditPlugin {
|
|
|
27613
27846
|
animate.stop();
|
|
27614
27847
|
animate.release();
|
|
27615
27848
|
});
|
|
27616
|
-
const animate = line.animate(
|
|
27617
|
-
|
|
27849
|
+
const animate = line.animate({
|
|
27850
|
+
timeline: this.timeline
|
|
27851
|
+
});
|
|
27618
27852
|
animate.to({ opacity: 1 }, 10, 'linear').wait(700).to({ opacity: 0 }, 10, 'linear').wait(700).loop(Infinity);
|
|
27619
27853
|
}
|
|
27620
27854
|
tryShowSelection(e, dblclick) {
|
|
@@ -27725,7 +27959,7 @@ class RichTextEditPlugin {
|
|
|
27725
27959
|
y += line.height;
|
|
27726
27960
|
}
|
|
27727
27961
|
}
|
|
27728
|
-
this.setCursorAndTextArea(currCursorData.x, currCursorData.y1
|
|
27962
|
+
this.setCursorAndTextArea(currCursorData.x, currCursorData.y1, currCursorData.y2, this.currRt);
|
|
27729
27963
|
this.triggerRender();
|
|
27730
27964
|
this.updateCbs.forEach(cb => cb('selection', this));
|
|
27731
27965
|
}
|
|
@@ -27823,6 +28057,18 @@ class RichTextEditPlugin {
|
|
|
27823
28057
|
e.target.globalTransMatrix.transformPoint(p, p1);
|
|
27824
28058
|
p1.x -= this.deltaX;
|
|
27825
28059
|
p1.y -= this.deltaY;
|
|
28060
|
+
const rt = this.currRt;
|
|
28061
|
+
const { textBaseline } = rt.attribute;
|
|
28062
|
+
let dy = 0;
|
|
28063
|
+
if (textBaseline === 'middle') {
|
|
28064
|
+
const b = getRichTextBounds(rt.attribute);
|
|
28065
|
+
dy = b.height() / 2;
|
|
28066
|
+
}
|
|
28067
|
+
else if (textBaseline === 'bottom') {
|
|
28068
|
+
const b = getRichTextBounds(rt.attribute);
|
|
28069
|
+
dy = b.height();
|
|
28070
|
+
}
|
|
28071
|
+
p1.y += dy;
|
|
27826
28072
|
return p1;
|
|
27827
28073
|
}
|
|
27828
28074
|
setCursorAndTextArea(x, y1, y2, rt) {
|
|
@@ -27838,6 +28084,7 @@ class RichTextEditPlugin {
|
|
|
27838
28084
|
const { left, top } = this.pluginService.stage.window.getBoundingClientRect();
|
|
27839
28085
|
out.x += left;
|
|
27840
28086
|
out.y += top;
|
|
28087
|
+
this.offsetLineBgAndShadowBounds();
|
|
27841
28088
|
this.editModule.moveTo(out.x, out.y, rt, this.curCursorIdx, this.selectionStartCursorIdx);
|
|
27842
28089
|
}
|
|
27843
28090
|
computedCursorPosByEvent(e, cache) {
|
|
@@ -27850,10 +28097,8 @@ class RichTextEditPlugin {
|
|
|
27850
28097
|
if (!columnInfo) {
|
|
27851
28098
|
return;
|
|
27852
28099
|
}
|
|
27853
|
-
|
|
27854
|
-
|
|
27855
|
-
y1 += 2;
|
|
27856
|
-
y2 -= 2;
|
|
28100
|
+
const y1 = lineInfo.top;
|
|
28101
|
+
const y2 = lineInfo.top + lineInfo.height;
|
|
27857
28102
|
let cursorIndex = this.getColumnIndex(cache, columnInfo);
|
|
27858
28103
|
cursorIndex += delta;
|
|
27859
28104
|
const x = columnInfo.left + (delta > 0 ? columnInfo.width : 0);
|
|
@@ -27874,6 +28119,14 @@ class RichTextEditPlugin {
|
|
|
27874
28119
|
const column = this.getColumnByIndex(cache, idx);
|
|
27875
28120
|
const height = (_a = rt.attribute.fontSize) !== null && _a !== void 0 ? _a : (_c = (_b = rt.attribute.textConfig) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.fontSize;
|
|
27876
28121
|
if (!column) {
|
|
28122
|
+
if (!cache.lines.length) {
|
|
28123
|
+
const b = getRichTextBounds(Object.assign(Object.assign({}, rt.attribute), { textConfig: [{ text: 'a' }] }));
|
|
28124
|
+
return {
|
|
28125
|
+
x: 0,
|
|
28126
|
+
y1: 0,
|
|
28127
|
+
y2: b.height()
|
|
28128
|
+
};
|
|
28129
|
+
}
|
|
27877
28130
|
return {
|
|
27878
28131
|
x: 0,
|
|
27879
28132
|
y1: 0,
|
|
@@ -27881,12 +28134,10 @@ class RichTextEditPlugin {
|
|
|
27881
28134
|
};
|
|
27882
28135
|
}
|
|
27883
28136
|
const { lineInfo, columnInfo } = column;
|
|
27884
|
-
|
|
27885
|
-
|
|
28137
|
+
const y1 = lineInfo.top;
|
|
28138
|
+
const y2 = lineInfo.top + lineInfo.height;
|
|
27886
28139
|
const x = columnInfo.left + (leftRight < 0 ? 0 : columnInfo.width);
|
|
27887
|
-
y1
|
|
27888
|
-
y2 -= 2;
|
|
27889
|
-
return { x, y1, y2 };
|
|
28140
|
+
return { x, y1, y2, lineInfo, columnInfo };
|
|
27890
28141
|
}
|
|
27891
28142
|
getColumnByIndex(cache, index) {
|
|
27892
28143
|
for (let i = 0, inputIndex = 0; i < cache.lines.length; i++) {
|
|
@@ -27921,6 +28172,49 @@ class RichTextEditPlugin {
|
|
|
27921
28172
|
}
|
|
27922
28173
|
return null;
|
|
27923
28174
|
}
|
|
28175
|
+
forceFocus(params) {
|
|
28176
|
+
const { target, e, cursorIndex } = params;
|
|
28177
|
+
if (!target) {
|
|
28178
|
+
return;
|
|
28179
|
+
}
|
|
28180
|
+
this.currRt = target;
|
|
28181
|
+
if (e) {
|
|
28182
|
+
this._forceFocusByEvent(e);
|
|
28183
|
+
}
|
|
28184
|
+
else {
|
|
28185
|
+
this._forceFocusByCursorIndex(cursorIndex !== null && cursorIndex !== void 0 ? cursorIndex : -0.1);
|
|
28186
|
+
}
|
|
28187
|
+
}
|
|
28188
|
+
_forceFocusByEvent(e) {
|
|
28189
|
+
this.handleEnter(e);
|
|
28190
|
+
this.handlePointerDown(e);
|
|
28191
|
+
this.handlePointerUp(e);
|
|
28192
|
+
}
|
|
28193
|
+
_forceFocusByCursorIndex(cursorIndex) {
|
|
28194
|
+
const richtext = this.currRt;
|
|
28195
|
+
if (!richtext) {
|
|
28196
|
+
return;
|
|
28197
|
+
}
|
|
28198
|
+
let x = 0;
|
|
28199
|
+
let y1 = 0;
|
|
28200
|
+
let y2 = 2;
|
|
28201
|
+
let lineInfo = null;
|
|
28202
|
+
let columnInfo = null;
|
|
28203
|
+
const data = this.computedCursorPosByCursorIdx(cursorIndex, richtext);
|
|
28204
|
+
x = data.x;
|
|
28205
|
+
y1 = data.y1;
|
|
28206
|
+
y2 = data.y2;
|
|
28207
|
+
lineInfo = data.lineInfo;
|
|
28208
|
+
columnInfo = data.columnInfo;
|
|
28209
|
+
this.onFocus({ target: this.currRt }, {
|
|
28210
|
+
x,
|
|
28211
|
+
y1,
|
|
28212
|
+
y2,
|
|
28213
|
+
cursorIndex,
|
|
28214
|
+
lineInfo,
|
|
28215
|
+
columnInfo
|
|
28216
|
+
});
|
|
28217
|
+
}
|
|
27924
28218
|
}
|
|
27925
28219
|
|
|
27926
28220
|
class DefaultGraphicAllocate {
|
|
@@ -29696,4 +29990,4 @@ function generatorPathEasingFunc(path) {
|
|
|
29696
29990
|
};
|
|
29697
29991
|
}
|
|
29698
29992
|
|
|
29699
|
-
export { ACustomAnimate, ARC3D_NUMBER_TYPE, ARC_NUMBER_TYPE, AREA_NUMBER_TYPE, AbstractGraphicRender, Animate, AnimateGroup, AnimateGroup1, AnimateMode, AnimateStatus, AnimateStepType, Application, Arc, Arc3d, Arc3dRender, ArcRender, ArcRenderContribution, Area, AreaRender, AreaRenderContribution, AttributeAnimate, AttributeUpdateType, AutoEnablePlugins, BaseCanvas, BaseEnvContribution, BaseRender, BaseRenderContributionTime, BaseWindowHandlerContribution, Basis, BeforeRenderConstribution, BoundsContext, BoundsPicker, CIRCLE_NUMBER_TYPE, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasFactory, CanvasTextLayout, CbAnimate, Circle, CircleRender, CircleRenderContribution, ClipAngleAnimate, ClipDirectionAnimate, ClipGraphicAnimate, ClipRadiusAnimate, ColorInterpolate, ColorStore, ColorType, CommonDrawItemInterceptorContribution, CommonRenderContribution, Container, ContainerModule, Context2dFactory, ContributionProvider, CurveContext, CurveTypeEnum, CustomEvent, CustomPath2D, CustomSymbolClass, DEFAULT_TEXT_FONT_FAMILY, DebugDrawItemInterceptorContribution, DefaultArcAllocate, DefaultArcAttribute, DefaultArcRenderContribution, DefaultAreaAllocate, DefaultAreaAttribute, DefaultAreaTextureRenderContribution, DefaultAttribute, DefaultBaseBackgroundRenderContribution, DefaultBaseInteractiveRenderContribution, DefaultBaseTextureRenderContribution, DefaultCanvasAllocate, DefaultCanvasArcRender, DefaultCanvasAreaRender, DefaultCanvasCircleRender, DefaultCanvasGroupRender, DefaultCanvasImageRender, DefaultCanvasLineRender, DefaultCanvasPathRender, DefaultCanvasPolygonRender, DefaultCanvasRectRender, DefaultCanvasSymbolRender, DefaultCanvasTextRender, DefaultCircleAllocate, DefaultCircleAttribute, DefaultCircleRenderContribution, DefaultConnectAttribute, DefaultDebugAttribute, DefaultFillStyle, DefaultGlobal, DefaultGlobalPickerService, DefaultGlyphAttribute, DefaultGraphicAllocate, DefaultGraphicMemoryManager, DefaultGraphicService, DefaultGraphicUtil, DefaultGroupAttribute, DefaultGroupBackgroundRenderContribution, DefaultImageAttribute, DefaultImageRenderContribution, DefaultLayerService, DefaultLayout, DefaultLineAllocate, DefaultLineAttribute, DefaultMat4Allocate, DefaultMatrixAllocate, DefaultMorphingAnimateConfig, DefaultPathAllocate, DefaultPathAttribute, DefaultPickService, DefaultPickStyle, DefaultPolygonAttribute, DefaultRect3dAttribute, DefaultRectAllocate, DefaultRectAttribute, DefaultRectRenderContribution, DefaultRenderService, DefaultRichTextAttribute, DefaultRichTextIconAttribute, DefaultStateAnimateConfig, DefaultStrokeStyle, DefaultStyle, DefaultSymbolAllocate, DefaultSymbolAttribute, DefaultSymbolClipRangeStrokeRenderContribution, DefaultSymbolRenderContribution, DefaultTextAllocate, DefaultTextAttribute, DefaultTextMeasureContribution, DefaultTextStyle, DefaultTicker, DefaultTimeline, DefaultTransform, DefaultTransformUtil, DefaultWindow, Direction$1 as Direction, DirectionalLight, DrawContribution, DrawItemInterceptor, DynamicLayerHandlerContribution, Easing, Edge, EditModule, EmptyContext2d, EnvContribution, EventManager, EventSystem, EventTarget, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, Factory, FadeInPlus, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, FlexLayoutPlugin, GLYPH_NUMBER_TYPE, GRAPHIC_UPDATE_TAG_KEY, GROUP_NUMBER_TYPE, Generator, GlobalPickerService, Glyph, GlyphRender, Graphic, GraphicAnimate, GraphicCreator$1 as GraphicCreator, GraphicPicker, GraphicRender, GraphicService, GraphicUtil, Group, GroupFadeIn, GroupFadeOut, GroupRender, GroupRenderContribution, GroupUpdateAABBBoundsMode, HtmlAttributePlugin, IContainPointMode, IMAGE_NUMBER_TYPE, Image, ImageRender, ImageRenderContribution, IncreaseCount, IncrementalDrawContribution, InputText, InteractiveDrawItemInterceptorContribution, InteractivePickItemInterceptorContribution, InteractiveSubRenderContribution, LINE_NUMBER_TYPE, Layer, LayerService, Line$1 as Line, LineRender, Linear, LinearClosed, ManualTickHandler, ManualTicker, Mat4Allocate, MatrixAllocate, MeasureModeEnum, Meteor, MonotoneX, MonotoneY, MorphingPath, MotionPath, MultiToOneMorphingPath, NOWORK_ANIMATE_ATTR, Node, OrthoCamera, PATH_NUMBER_TYPE, POLYGON_NUMBER_TYPE, PURE_STYLE_KEY, PYRAMID3D_NUMBER_TYPE, Path, PathRender, PathRenderContribution, PickItemInterceptor, PickServiceInterceptor, PickerService, PluginService, Polygon, PolygonRender, PolygonRenderContribution, Pyramid3d, Pyramid3dRender, RAFTickHandler, RECT3D_NUMBER_TYPE, RECT_NUMBER_TYPE, RICHTEXT_NUMBER_TYPE, RafBasedSTO, ReactAttributePlugin, Rect, Rect3DRender, Rect3d, RectRender, RectRenderContribution, ReflectSegContext, RenderSelector, RenderService, ResourceLoader, RichText, RichTextEditPlugin, RichTextRender, RotateBySphereAnimate, SVG_ATTRIBUTE_MAP, SVG_ATTRIBUTE_MAP_KEYS, SVG_PARSE_ATTRIBUTE_MAP, SVG_PARSE_ATTRIBUTE_MAP_KEYS, SYMBOL_NUMBER_TYPE, SegContext, ShadowPickServiceInterceptorContribution, ShadowRoot, ShadowRootDrawItemInterceptorContribution, ShadowRootPickItemInterceptorContribution, SplitRectAfterRenderContribution, SplitRectBeforeRenderContribution, Stage, StaticLayerHandlerContribution, Step$1 as Step, StreamLight, SubAnimate, Symbol$1 as Symbol, SymbolRender, SymbolRenderContribution, TEXT_NUMBER_TYPE, TagPointsUpdate, Text, TextDirection, TextMeasureContribution, TextRender, TextRenderContribution, Theme, TimeOutTickHandler, TransformUtil, UpdateTag, VGlobal, VWindow, ViewTransform3dPlugin, VirtualLayerHandlerContribution, WILDCARD, WindowHandlerContribution, WrapText, XMLParser, _calculateLineHeight, _interpolateColor, addArcToBezierPath, addAttributeToPrototype, alignBezierCurves, alignSubpath, application, applyTransformOnBezierCurves, arc3dModule, arcModule, areaModule, bezier, bezierCurversToPath, binarySplitPolygon, bindContributionProvider, bindContributionProviderNoSingletonScope, boundStroke, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache, calculateArcCornerRadius, calculateLineHeight, canvasAllocate, centroidOfSubpath, circleBounds, circleModule, clock, cloneGraphic, colorEqual, colorStringInterpolationToStr, container, cornerTangents, createArc, createArc3d, createArea, createCircle, createColor, createConicalGradient, createGlyph, createGroup, createImage, createLine, createMat4, createPath, createPolygon, createPyramid3d, createRect, createRect3d, createRectPath, createRichText, createShadowRoot, createStage, createSymbol, createText, createWrapText, cubicCalc, cubicLength, cubicPointAt, cubicSubdivide, defaultArcAllocate, defaultArcBackgroundRenderContribution, defaultArcRenderContribution, defaultArcTextureRenderContribution, defaultAreaAllocate, defaultBaseBackgroundRenderContribution, defaultBaseTextureRenderContribution, defaultCircleAllocate, defaultCircleBackgroundRenderContribution, defaultCircleRenderContribution, defaultCircleTextureRenderContribution, defaultGraphicMemoryManager, defaultGroupBackgroundRenderContribution, defaultImageBackgroundRenderContribution, defaultImageRenderContribution, defaultLineAllocate, defaultPathAllocate, defaultRectAllocate, defaultRectBackgroundRenderContribution, defaultRectRenderContribution, defaultRectTextureRenderContribution, defaultSymbolAllocate, defaultSymbolBackgroundRenderContribution, defaultSymbolClipRangeStrokeRenderContribution, defaultSymbolRenderContribution, defaultSymbolTextureRenderContribution, defaultTextAllocate, defaultTicker, defaultTimeline, drawArc, drawArcPath$1 as drawArcPath, drawAreaSegments, drawIncrementalAreaSegments, drawIncrementalSegments, drawSegments, enumCommandMap, fillVisible, findBestMorphingRotation, findConfigIndexByCursorIdx, findCursorIdxByConfigIndex, findNextGraphic, flatten_simplify, foreach, foreachAsync, genBasisSegments, genBasisTypeSegments, genLinearClosedSegments, genLinearClosedTypeSegments, genLinearSegments, genLinearTypeSegments, genMonotoneXSegments, genMonotoneXTypeSegments, genMonotoneYSegments, genMonotoneYTypeSegments, genNumberType, genStepSegments, genStepTypeSegments, generatorPathEasingFunc, getAttributeFromDefaultAttrList, getConicGradientAt, getCurrentEnv, getExtraModelMatrix, getModelMatrix, getRichTextBounds, getScaledStroke, getTextBounds, getTheme, getThemeFromGroup, globalTheme, glyphModule, graphicCreator, graphicService, graphicUtil, identityMat4, imageModule, incrementalAddTo, inject, injectable, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, intersect, isBrowserEnv, isNodeEnv, isSvg, isTransformKey, isXML, layerService, lineModule, lookAt, mat3Tomat4, mat4Allocate, matrixAllocate, morphPath, multiInject, multiToOneMorph, multiplyMat4Mat3, multiplyMat4Mat4, named, newThemeObj, oneToMultiMorph, ortho, parsePadding, parseStroke, parseSvgPath, pathModule, pathToBezierCurves, point$3 as point, pointEqual, pointInterpolation, pointInterpolationHighPerformance, pointsEqual, pointsInterpolation, polygonModule, preLoadAllModule, pyramid3dModule, quadCalc, quadLength, quadPointAt, rafBasedSto, rect3dModule, rectFillVisible, rectModule, rectStrokeVisible, recursiveCallBinarySplit, registerArc3dGraphic, registerArcGraphic, registerAreaGraphic, registerCircleGraphic, registerDirectionalLight, registerFlexLayoutPlugin, registerGlyphGraphic, registerGroupGraphic, registerHtmlAttributePlugin, registerImageGraphic, registerLineGraphic, registerOrthoCamera, registerPathGraphic, registerPolygonGraphic, registerPyramid3dGraphic, registerReactAttributePlugin, registerRect3dGraphic, registerRectGraphic, registerRichtextGraphic, registerShadowRootGraphic, registerSymbolGraphic, registerTextGraphic, registerViewTransform3dPlugin, registerWrapTextGraphic, renderCommandList, rewriteProto, richtextModule, rotateX, rotateY, rotateZ, runFill, runStroke, scaleMat4, segments, shouldUseMat4, snapLength, splitArc, splitArea, splitCircle, splitGraphic, splitLine, splitPath, splitPolygon, splitRect, splitToGrids, strCommandMap, strokeVisible, symbolModule, textAttributesToStyle, textDrawOffsetX, textDrawOffsetY, textLayoutOffsetY, textModule, transformKeys, transformMat4, transformUtil, translate, verticalLayout, vglobal, waitForAllSubLayers, wrapCanvas, wrapContext, xul };
|
|
29993
|
+
export { ACustomAnimate, ARC3D_NUMBER_TYPE, ARC_NUMBER_TYPE, AREA_NUMBER_TYPE, AbstractGraphicRender, Animate, AnimateGroup, AnimateGroup1, AnimateMode, AnimateStatus, AnimateStepType, Application, Arc, Arc3d, Arc3dRender, ArcRender, ArcRenderContribution, Area, AreaRender, AreaRenderContribution, AttributeAnimate, AttributeUpdateType, AutoEnablePlugins, BaseCanvas, BaseEnvContribution, BaseRender, BaseRenderContributionTime, BaseWindowHandlerContribution, Basis, BeforeRenderConstribution, BoundsContext, BoundsPicker, CIRCLE_NUMBER_TYPE, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasFactory, CanvasTextLayout, CbAnimate, Circle, CircleRender, CircleRenderContribution, ClipAngleAnimate, ClipDirectionAnimate, ClipGraphicAnimate, ClipRadiusAnimate, ColorInterpolate, ColorStore, ColorType, CommonDrawItemInterceptorContribution, CommonRenderContribution, Container, ContainerModule, Context2dFactory, ContributionProvider, CurveContext, CurveTypeEnum, CustomEvent, CustomPath2D, CustomSymbolClass, DEFAULT_TEXT_FONT_FAMILY, DebugDrawItemInterceptorContribution, DefaultArcAllocate, DefaultArcAttribute, DefaultArcRenderContribution, DefaultAreaAllocate, DefaultAreaAttribute, DefaultAreaTextureRenderContribution, DefaultAttribute, DefaultBaseBackgroundRenderContribution, DefaultBaseInteractiveRenderContribution, DefaultBaseTextureRenderContribution, DefaultCanvasAllocate, DefaultCanvasArcRender, DefaultCanvasAreaRender, DefaultCanvasCircleRender, DefaultCanvasGroupRender, DefaultCanvasImageRender, DefaultCanvasLineRender, DefaultCanvasPathRender, DefaultCanvasPolygonRender, DefaultCanvasRectRender, DefaultCanvasSymbolRender, DefaultCanvasTextRender, DefaultCircleAllocate, DefaultCircleAttribute, DefaultCircleRenderContribution, DefaultConnectAttribute, DefaultDebugAttribute, DefaultFillStyle, DefaultGlobal, DefaultGlobalPickerService, DefaultGlyphAttribute, DefaultGraphicAllocate, DefaultGraphicMemoryManager, DefaultGraphicService, DefaultGraphicUtil, DefaultGroupAttribute, DefaultGroupBackgroundRenderContribution, DefaultImageAttribute, DefaultImageRenderContribution, DefaultLayerService, DefaultLayout, DefaultLineAllocate, DefaultLineAttribute, DefaultMat4Allocate, DefaultMatrixAllocate, DefaultMorphingAnimateConfig, DefaultPathAllocate, DefaultPathAttribute, DefaultPickService, DefaultPickStyle, DefaultPolygonAttribute, DefaultRect3dAttribute, DefaultRectAllocate, DefaultRectAttribute, DefaultRectRenderContribution, DefaultRenderService, DefaultRichTextAttribute, DefaultRichTextIconAttribute, DefaultStateAnimateConfig, DefaultStrokeStyle, DefaultStyle, DefaultSymbolAllocate, DefaultSymbolAttribute, DefaultSymbolClipRangeStrokeRenderContribution, DefaultSymbolRenderContribution, DefaultTextAllocate, DefaultTextAttribute, DefaultTextMeasureContribution, DefaultTextStyle, DefaultTicker, DefaultTimeline, DefaultTransform, DefaultTransformUtil, DefaultWindow, Direction$1 as Direction, DirectionalLight, DrawContribution, DrawItemInterceptor, DynamicLayerHandlerContribution, Easing, Edge, EditModule, EmptyContext2d, EnvContribution, EventManager, EventSystem, EventTarget, FORMAT_ALL_TEXT_COMMAND, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, Factory, FadeInPlus, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, FlexLayoutPlugin, GLYPH_NUMBER_TYPE, GRAPHIC_UPDATE_TAG_KEY, GROUP_NUMBER_TYPE, Generator, GlobalPickerService, Glyph, GlyphRender, Graphic, GraphicAnimate, GraphicCreator$1 as GraphicCreator, GraphicPicker, GraphicRender, GraphicService, GraphicUtil, Group, GroupFadeIn, GroupFadeOut, GroupRender, GroupRenderContribution, GroupUpdateAABBBoundsMode, HtmlAttributePlugin, IContainPointMode, IMAGE_NUMBER_TYPE, Image, ImageRender, ImageRenderContribution, IncreaseCount, IncrementalDrawContribution, InputText, InteractiveDrawItemInterceptorContribution, InteractivePickItemInterceptorContribution, InteractiveSubRenderContribution, LINE_NUMBER_TYPE, Layer, LayerService, Line$1 as Line, LineRender, Linear, LinearClosed, ManualTickHandler, ManualTicker, Mat4Allocate, MatrixAllocate, MeasureModeEnum, Meteor, MonotoneX, MonotoneY, MorphingPath, MotionPath, MultiToOneMorphingPath, NOWORK_ANIMATE_ATTR, Node, OrthoCamera, PATH_NUMBER_TYPE, POLYGON_NUMBER_TYPE, PURE_STYLE_KEY, PYRAMID3D_NUMBER_TYPE, Path, PathRender, PathRenderContribution, PickItemInterceptor, PickServiceInterceptor, PickerService, PluginService, Polygon, PolygonRender, PolygonRenderContribution, Pyramid3d, Pyramid3dRender, RAFTickHandler, RECT3D_NUMBER_TYPE, RECT_NUMBER_TYPE, RICHTEXT_NUMBER_TYPE, RafBasedSTO, ReactAttributePlugin, Rect, Rect3DRender, Rect3d, RectRender, RectRenderContribution, ReflectSegContext, RenderSelector, RenderService, ResourceLoader, RichText, RichTextEditPlugin, RichTextRender, RotateBySphereAnimate, SVG_ATTRIBUTE_MAP, SVG_ATTRIBUTE_MAP_KEYS, SVG_PARSE_ATTRIBUTE_MAP, SVG_PARSE_ATTRIBUTE_MAP_KEYS, SYMBOL_NUMBER_TYPE, SegContext, ShadowPickServiceInterceptorContribution, ShadowRoot, ShadowRootDrawItemInterceptorContribution, ShadowRootPickItemInterceptorContribution, SplitRectAfterRenderContribution, SplitRectBeforeRenderContribution, Stage, StaticLayerHandlerContribution, Step$1 as Step, StreamLight, SubAnimate, Symbol$1 as Symbol, SymbolRender, SymbolRenderContribution, TEXT_NUMBER_TYPE, TagPointsUpdate, Text, TextDirection, TextMeasureContribution, TextRender, TextRenderContribution, Theme, TimeOutTickHandler, TransformUtil, UpdateTag, VGlobal, VWindow, ViewTransform3dPlugin, VirtualLayerHandlerContribution, WILDCARD, WindowHandlerContribution, WrapText, XMLParser, _calculateLineHeight, _interpolateColor, addArcToBezierPath, addAttributeToPrototype, alignBezierCurves, alignSubpath, application, applyTransformOnBezierCurves, arc3dModule, arcModule, areaModule, bezier, bezierCurversToPath, binarySplitPolygon, bindContributionProvider, bindContributionProviderNoSingletonScope, boundStroke, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache, calculateArcCornerRadius, calculateLineHeight, canvasAllocate, centroidOfSubpath, circleBounds, circleModule, clock, cloneGraphic, colorEqual, colorStringInterpolationToStr, container, cornerTangents, createArc, createArc3d, createArea, createCircle, createColor, createConicalGradient, createGlyph, createGroup, createImage, createLine, createMat4, createPath, createPolygon, createPyramid3d, createRect, createRect3d, createRectPath, createRichText, createShadowRoot, createStage, createSymbol, createText, createWrapText, cubicCalc, cubicLength, cubicPointAt, cubicSubdivide, defaultArcAllocate, defaultArcBackgroundRenderContribution, defaultArcRenderContribution, defaultArcTextureRenderContribution, defaultAreaAllocate, defaultBaseBackgroundRenderContribution, defaultBaseTextureRenderContribution, defaultCircleAllocate, defaultCircleBackgroundRenderContribution, defaultCircleRenderContribution, defaultCircleTextureRenderContribution, defaultGraphicMemoryManager, defaultGroupBackgroundRenderContribution, defaultImageBackgroundRenderContribution, defaultImageRenderContribution, defaultLineAllocate, defaultPathAllocate, defaultRectAllocate, defaultRectBackgroundRenderContribution, defaultRectRenderContribution, defaultRectTextureRenderContribution, defaultSymbolAllocate, defaultSymbolBackgroundRenderContribution, defaultSymbolClipRangeStrokeRenderContribution, defaultSymbolRenderContribution, defaultSymbolTextureRenderContribution, defaultTextAllocate, defaultTicker, defaultTimeline, drawArc, drawArcPath$1 as drawArcPath, drawAreaSegments, drawIncrementalAreaSegments, drawIncrementalSegments, drawSegments, enumCommandMap, fillVisible, findBestMorphingRotation, findConfigIndexByCursorIdx, findCursorIdxByConfigIndex, findNextGraphic, flatten_simplify, foreach, foreachAsync, genBasisSegments, genBasisTypeSegments, genLinearClosedSegments, genLinearClosedTypeSegments, genLinearSegments, genLinearTypeSegments, genMonotoneXSegments, genMonotoneXTypeSegments, genMonotoneYSegments, genMonotoneYTypeSegments, genNumberType, genStepSegments, genStepTypeSegments, generatorPathEasingFunc, getAttributeFromDefaultAttrList, getConicGradientAt, getCurrentEnv, getDefaultCharacterConfig, getExtraModelMatrix, getModelMatrix, getRichTextBounds, getScaledStroke, getTextBounds, getTheme, getThemeFromGroup, globalTheme, glyphModule, graphicCreator, graphicService, graphicUtil, identityMat4, imageModule, incrementalAddTo, inject, injectable, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, intersect, isBrowserEnv, isNodeEnv, isSvg, isTransformKey, isXML, layerService, lineModule, lookAt, mat3Tomat4, mat4Allocate, matrixAllocate, morphPath, multiInject, multiToOneMorph, multiplyMat4Mat3, multiplyMat4Mat4, named, newThemeObj, oneToMultiMorph, ortho, parsePadding, parseStroke, parseSvgPath, pathModule, pathToBezierCurves, point$3 as point, pointEqual, pointInterpolation, pointInterpolationHighPerformance, pointsEqual, pointsInterpolation, polygonModule, preLoadAllModule, pyramid3dModule, quadCalc, quadLength, quadPointAt, rafBasedSto, rect3dModule, rectFillVisible, rectModule, rectStrokeVisible, recursiveCallBinarySplit, registerArc3dGraphic, registerArcGraphic, registerAreaGraphic, registerCircleGraphic, registerDirectionalLight, registerFlexLayoutPlugin, registerGlyphGraphic, registerGroupGraphic, registerHtmlAttributePlugin, registerImageGraphic, registerLineGraphic, registerOrthoCamera, registerPathGraphic, registerPolygonGraphic, registerPyramid3dGraphic, registerReactAttributePlugin, registerRect3dGraphic, registerRectGraphic, registerRichtextGraphic, registerShadowRootGraphic, registerSymbolGraphic, registerTextGraphic, registerViewTransform3dPlugin, registerWrapTextGraphic, renderCommandList, rewriteProto, richtextModule, rotateX, rotateY, rotateZ, runFill, runStroke, scaleMat4, segments, shouldUseMat4, snapLength, splitArc, splitArea, splitCircle, splitGraphic, splitLine, splitPath, splitPolygon, splitRect, splitToGrids, strCommandMap, strokeVisible, symbolModule, textAttributesToStyle, textDrawOffsetX, textDrawOffsetY, textLayoutOffsetY, textModule, transformKeys, transformMat4, transformUtil, translate, verticalLayout, vglobal, waitForAllSubLayers, wrapCanvas, wrapContext, xul };
|