@visactor/vrender 0.20.5-beta.0 → 0.20.6-beta.0
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/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/dist/index.es.js +67 -23
- package/dist/index.js +67 -23
- package/dist/index.min.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/package.json +6 -6
package/cjs/index.d.ts
CHANGED
package/cjs/index.js
CHANGED
|
@@ -21,7 +21,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
21
21
|
|
|
22
22
|
const vrender_core_1 = require("@visactor/vrender-core"), vrender_kits_1 = require("@visactor/vrender-kits"), vrender_kits_2 = require("@visactor/vrender-kits");
|
|
23
23
|
|
|
24
|
-
exports.version = "0.20.
|
|
24
|
+
exports.version = "0.20.6-beta.0", (0, vrender_core_1.preLoadAllModule)(), (0, vrender_core_1.isBrowserEnv)() ? (0,
|
|
25
25
|
vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0, vrender_core_1.isNodeEnv)() && (0,
|
|
26
26
|
vrender_kits_1.loadNodeEnv)(vrender_core_1.container), (0, vrender_kits_2.registerArc)(),
|
|
27
27
|
(0, vrender_kits_2.registerArc3d)(), (0, vrender_kits_2.registerArea)(), (0, vrender_kits_2.registerCircle)(),
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAWgC;AAChC,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,eAAe,CAAC;AAEvC,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;IAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;CAC3B;KAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;IACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;CACxB;AACD,IAAA,0BAAW,GAAE,CAAC;AACd,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,8BAAe,GAAE,CAAC;AAClB,IAAA,gCAAiB,GAAE,CAAC;AACpB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,iCAAkB,GAAE,CAAC;AACrB,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,4CAA6B,GAAE,CAAC;AAChC,IAAA,0CAA2B,GAAE,CAAC;AAC9B,IAAA,2CAA4B,GAAE,CAAC;AAC/B,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,kCAAmB,GAAE,CAAC;AACtB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import '@visactor/vrender-core';\nimport {\n container,\n isBrowserEnv,\n isNodeEnv,\n preLoadAllModule,\n registerFlexLayoutPlugin,\n registerViewTransform3dPlugin,\n registerHtmlAttributePlugin,\n registerReactAttributePlugin,\n registerDirectionalLight,\n registerOrthoCamera\n} from '@visactor/vrender-core';\nimport { loadBrowserEnv, loadNodeEnv } from '@visactor/vrender-kits';\nimport {\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\nexport const version = \"0.20.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAWgC;AAChC,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,eAAe,CAAC;AAEvC,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;IAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;CAC3B;KAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;IACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;CACxB;AACD,IAAA,0BAAW,GAAE,CAAC;AACd,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,8BAAe,GAAE,CAAC;AAClB,IAAA,gCAAiB,GAAE,CAAC;AACpB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,iCAAkB,GAAE,CAAC;AACrB,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,4CAA6B,GAAE,CAAC;AAChC,IAAA,0CAA2B,GAAE,CAAC;AAC9B,IAAA,2CAA4B,GAAE,CAAC;AAC/B,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,kCAAmB,GAAE,CAAC;AACtB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import '@visactor/vrender-core';\nimport {\n container,\n isBrowserEnv,\n isNodeEnv,\n preLoadAllModule,\n registerFlexLayoutPlugin,\n registerViewTransform3dPlugin,\n registerHtmlAttributePlugin,\n registerReactAttributePlugin,\n registerDirectionalLight,\n registerOrthoCamera\n} from '@visactor/vrender-core';\nimport { loadBrowserEnv, loadNodeEnv } from '@visactor/vrender-kits';\nimport {\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\nexport const version = \"0.20.6-beta.0\";\n\npreLoadAllModule();\n\nif (isBrowserEnv()) {\n loadBrowserEnv(container);\n} else if (isNodeEnv()) {\n loadNodeEnv(container);\n}\nregisterArc();\nregisterArc3d();\nregisterArea();\nregisterCircle();\nregisterGlyph();\nregisterGroup();\nregisterImage();\nregisterLine();\nregisterPath();\nregisterPolygon();\nregisterPyramid3d();\nregisterRect();\nregisterRect3d();\nregisterRichtext();\nregisterShadowRoot();\nregisterSymbol();\nregisterText();\nregisterWrapText();\n\nregisterFlexLayoutPlugin();\nregisterViewTransform3dPlugin();\nregisterHtmlAttributePlugin();\nregisterReactAttributePlugin();\nregisterDirectionalLight();\nregisterOrthoCamera();\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\n"]}
|
package/dist/index.es.js
CHANGED
|
@@ -2549,7 +2549,7 @@ class BoundsContext {
|
|
|
2549
2549
|
this.bounds.add(cx + xmin, cy + ymin), this.bounds.add(cx + xmax, cy + ymax);
|
|
2550
2550
|
}
|
|
2551
2551
|
arcTo(x1, y1, x2, y2, radius) {
|
|
2552
|
-
|
|
2552
|
+
this.bounds.add(x1, y1);
|
|
2553
2553
|
}
|
|
2554
2554
|
bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) {
|
|
2555
2555
|
this.bounds.add(cp1x, cp1y), this.bounds.add(cp2x, cp2y), this.bounds.add(x, y);
|
|
@@ -2758,19 +2758,25 @@ function drawArc(context, x, y, coords) {
|
|
|
2758
2758
|
}
|
|
2759
2759
|
const addArcToBezierPath$1 = (bezierPath, startAngle, endAngle, cx, cy, rx, ry) => {
|
|
2760
2760
|
const delta = Math.abs(endAngle - startAngle),
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2761
|
+
count = delta > .5 * Math.PI ? Math.ceil(2 * delta / Math.PI) : 1,
|
|
2762
|
+
stepAngle = (endAngle - startAngle) / count;
|
|
2763
|
+
for (let i = 0; i < count; i++) {
|
|
2764
|
+
const sa = startAngle + stepAngle * i,
|
|
2765
|
+
ea = startAngle + stepAngle * (i + 1),
|
|
2766
|
+
len = 4 * Math.tan(Math.abs(stepAngle) / 4) / 3,
|
|
2767
|
+
dir = ea < sa ? -1 : 1,
|
|
2768
|
+
c1 = Math.cos(sa),
|
|
2769
|
+
s1 = Math.sin(sa),
|
|
2770
|
+
c2 = Math.cos(ea),
|
|
2771
|
+
s2 = Math.sin(ea),
|
|
2772
|
+
x1 = c1 * rx + cx,
|
|
2773
|
+
y1 = s1 * ry + cy,
|
|
2774
|
+
x4 = c2 * rx + cx,
|
|
2775
|
+
y4 = s2 * ry + cy,
|
|
2776
|
+
hx = rx * len * dir,
|
|
2777
|
+
hy = ry * len * dir;
|
|
2778
|
+
bezierPath.push(x1 - hx * s1, y1 + hy * c1, x4 + hx * s2, y4 - hy * c2, x4, y4);
|
|
2779
|
+
}
|
|
2774
2780
|
};
|
|
2775
2781
|
|
|
2776
2782
|
const commandFuncs = [(command, context, x, y, sx, sy, z) => context.arc(command[1] * sx + x, command[2] * sy + y, command[3] * (sx + sy) / 2, command[4], command[5], command[6], z), (command, context, x, y, sx, sy, z) => context.arcTo(command[1] * sx + x, command[2] * sy + y, command[3] * sx + x, command[4] * sy + y, command[5] * (sx + sy) / 2, z), (command, context, x, y, sx, sy, z) => context.bezierCurveTo(command[1] * sx + x, command[2] * sy + y, command[3] * sx + x, command[4] * sy + y, command[5] * sx + x, command[6] * sy + y, z), (command, context, x, y) => context.closePath(), (command, context, x, y, sx, sy) => context.ellipse(command[1] * sx + x, command[2] * sy + y, command[3] * sx, command[4] * sy, command[5], command[6], command[7], command[8]), (command, context, x, y, sx, sy, z) => context.lineTo(command[1] * sx + x, command[2] * sy + y, z), (command, context, x, y, sx, sy, z) => context.moveTo(command[1] * sx + x, command[2] * sy + y, z), (command, context, x, y, sx, sy, z) => context.quadraticCurveTo(command[1] * sx + x, command[2] * sy + y, command[3] * sx + x, command[4] * sy + y, z), (command, context, x, y, sx, sy, z) => context.rect(command[1] * sx + x, command[2] * sy + y, command[3] * sx, command[4] * sy, z)];
|
|
@@ -11237,6 +11243,7 @@ let DefaultGraphicService = class {
|
|
|
11237
11243
|
validCheck(attribute, theme, aabbBounds, graphic) {
|
|
11238
11244
|
if (!graphic) return !0;
|
|
11239
11245
|
if (null != attribute.forceBoundsHeight || null != attribute.forceBoundsWidth) return !0;
|
|
11246
|
+
if (graphic.shadowRoot) return !0;
|
|
11240
11247
|
if (!graphic.valid) return aabbBounds.clear(), !1;
|
|
11241
11248
|
const {
|
|
11242
11249
|
visible = theme.visible
|
|
@@ -14383,13 +14390,23 @@ class Text extends Graphic {
|
|
|
14383
14390
|
if (this.isSimplify()) return this.tryUpdateAABBBounds(), this.cache.clipedWidth;
|
|
14384
14391
|
}
|
|
14385
14392
|
get cliped() {
|
|
14393
|
+
var _a, _b;
|
|
14386
14394
|
const textTheme = this.getGraphicTheme(),
|
|
14387
|
-
attribute = this.attribute
|
|
14388
|
-
|
|
14389
|
-
|
|
14390
|
-
|
|
14391
|
-
|
|
14392
|
-
|
|
14395
|
+
attribute = this.attribute,
|
|
14396
|
+
{
|
|
14397
|
+
maxLineWidth = textTheme.maxLineWidth,
|
|
14398
|
+
text: text,
|
|
14399
|
+
whiteSpace = textTheme.whiteSpace
|
|
14400
|
+
} = attribute;
|
|
14401
|
+
if (!Number.isFinite(maxLineWidth)) return !1;
|
|
14402
|
+
if (this.tryUpdateAABBBounds(), null === (_b = null === (_a = this.cache) || void 0 === _a ? void 0 : _a.layoutData) || void 0 === _b ? void 0 : _b.lines) {
|
|
14403
|
+
let mergedText = "";
|
|
14404
|
+
this.cache.layoutData.lines.forEach(item => {
|
|
14405
|
+
mergedText += item.str;
|
|
14406
|
+
});
|
|
14407
|
+
return (Array.isArray(text) ? text.join("") : text) !== mergedText;
|
|
14408
|
+
}
|
|
14409
|
+
return "vertical" === attribute.direction && this.cache.verticalList && this.cache.verticalList[0] ? this.cache.verticalList[0].map(item => item.text).join("") !== attribute.text.toString() : null != this.clipedText && this.clipedText !== attribute.text.toString();
|
|
14393
14410
|
}
|
|
14394
14411
|
get multilineLayout() {
|
|
14395
14412
|
if (this.isMultiLine) return this.tryUpdateAABBBounds(), this.cache.layoutData;
|
|
@@ -16290,10 +16307,22 @@ class Line {
|
|
|
16290
16307
|
}
|
|
16291
16308
|
draw(ctx, lastLine, x, y, drawEllipsis, drawIcon) {
|
|
16292
16309
|
if (drawEllipsis && (lastLine || this.paragraphs.some(p => p.overflow))) {
|
|
16293
|
-
let
|
|
16310
|
+
let emptyOverflow = !0,
|
|
16311
|
+
skipEllipsis = !1;
|
|
16294
16312
|
for (let i = this.paragraphs.length - 1; i >= 0; i--) {
|
|
16295
16313
|
const paragraph = this.paragraphs[i];
|
|
16296
|
-
if (paragraph.overflow)
|
|
16314
|
+
if (paragraph.overflow) emptyOverflow = emptyOverflow && "" === paragraph.text;else if (emptyOverflow) {
|
|
16315
|
+
skipEllipsis = !0;
|
|
16316
|
+
break;
|
|
16317
|
+
}
|
|
16318
|
+
}
|
|
16319
|
+
let otherParagraphWidth = 0;
|
|
16320
|
+
if (!skipEllipsis) for (let i = this.paragraphs.length - 1; i >= 0; i--) {
|
|
16321
|
+
const paragraph = this.paragraphs[i];
|
|
16322
|
+
if (paragraph.overflow) {
|
|
16323
|
+
if ("" === paragraph.text) break;
|
|
16324
|
+
continue;
|
|
16325
|
+
}
|
|
16297
16326
|
if (paragraph instanceof RichTextIcon) break;
|
|
16298
16327
|
if ("vertical" === this.direction && "vertical" !== paragraph.direction) {
|
|
16299
16328
|
paragraph.verticalEllipsis = !0;
|
|
@@ -16518,6 +16547,21 @@ class RichText extends Graphic {
|
|
|
16518
16547
|
getFrameCache() {
|
|
16519
16548
|
return this.shouldUpdateShape() && (this.doUpdateFrameCache(), this.clearUpdateShapeTag()), this._frameCache;
|
|
16520
16549
|
}
|
|
16550
|
+
get cliped() {
|
|
16551
|
+
const frameCache = this.getFrameCache();
|
|
16552
|
+
if (frameCache.actualHeight > frameCache.height) return !0;
|
|
16553
|
+
const {
|
|
16554
|
+
disableAutoWrapLine: disableAutoWrapLine
|
|
16555
|
+
} = this.attribute;
|
|
16556
|
+
if (disableAutoWrapLine) for (let i = 0; i < frameCache.lines.length; i++) {
|
|
16557
|
+
const l = frameCache.lines[i];
|
|
16558
|
+
for (let j = 0; j < l.paragraphs.length; j++) {
|
|
16559
|
+
const p = l.paragraphs[j];
|
|
16560
|
+
if (p.overflow && "" !== p.text) return !0;
|
|
16561
|
+
}
|
|
16562
|
+
}
|
|
16563
|
+
return !1;
|
|
16564
|
+
}
|
|
16521
16565
|
combinedStyleToCharacter(config) {
|
|
16522
16566
|
const {
|
|
16523
16567
|
fill: fill,
|
|
@@ -28285,7 +28329,7 @@ const registerWrapText = _registerWrapText;
|
|
|
28285
28329
|
|
|
28286
28330
|
const roughModule = _roughModule;
|
|
28287
28331
|
|
|
28288
|
-
const version = "0.20.
|
|
28332
|
+
const version = "0.20.6-beta.0";
|
|
28289
28333
|
preLoadAllModule();
|
|
28290
28334
|
if (isBrowserEnv()) {
|
|
28291
28335
|
loadBrowserEnv(container);
|
package/dist/index.js
CHANGED
|
@@ -2555,7 +2555,7 @@
|
|
|
2555
2555
|
this.bounds.add(cx + xmin, cy + ymin), this.bounds.add(cx + xmax, cy + ymax);
|
|
2556
2556
|
}
|
|
2557
2557
|
arcTo(x1, y1, x2, y2, radius) {
|
|
2558
|
-
|
|
2558
|
+
this.bounds.add(x1, y1);
|
|
2559
2559
|
}
|
|
2560
2560
|
bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) {
|
|
2561
2561
|
this.bounds.add(cp1x, cp1y), this.bounds.add(cp2x, cp2y), this.bounds.add(x, y);
|
|
@@ -2764,19 +2764,25 @@
|
|
|
2764
2764
|
}
|
|
2765
2765
|
const addArcToBezierPath$1 = (bezierPath, startAngle, endAngle, cx, cy, rx, ry) => {
|
|
2766
2766
|
const delta = Math.abs(endAngle - startAngle),
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2767
|
+
count = delta > .5 * Math.PI ? Math.ceil(2 * delta / Math.PI) : 1,
|
|
2768
|
+
stepAngle = (endAngle - startAngle) / count;
|
|
2769
|
+
for (let i = 0; i < count; i++) {
|
|
2770
|
+
const sa = startAngle + stepAngle * i,
|
|
2771
|
+
ea = startAngle + stepAngle * (i + 1),
|
|
2772
|
+
len = 4 * Math.tan(Math.abs(stepAngle) / 4) / 3,
|
|
2773
|
+
dir = ea < sa ? -1 : 1,
|
|
2774
|
+
c1 = Math.cos(sa),
|
|
2775
|
+
s1 = Math.sin(sa),
|
|
2776
|
+
c2 = Math.cos(ea),
|
|
2777
|
+
s2 = Math.sin(ea),
|
|
2778
|
+
x1 = c1 * rx + cx,
|
|
2779
|
+
y1 = s1 * ry + cy,
|
|
2780
|
+
x4 = c2 * rx + cx,
|
|
2781
|
+
y4 = s2 * ry + cy,
|
|
2782
|
+
hx = rx * len * dir,
|
|
2783
|
+
hy = ry * len * dir;
|
|
2784
|
+
bezierPath.push(x1 - hx * s1, y1 + hy * c1, x4 + hx * s2, y4 - hy * c2, x4, y4);
|
|
2785
|
+
}
|
|
2780
2786
|
};
|
|
2781
2787
|
|
|
2782
2788
|
const commandFuncs = [(command, context, x, y, sx, sy, z) => context.arc(command[1] * sx + x, command[2] * sy + y, command[3] * (sx + sy) / 2, command[4], command[5], command[6], z), (command, context, x, y, sx, sy, z) => context.arcTo(command[1] * sx + x, command[2] * sy + y, command[3] * sx + x, command[4] * sy + y, command[5] * (sx + sy) / 2, z), (command, context, x, y, sx, sy, z) => context.bezierCurveTo(command[1] * sx + x, command[2] * sy + y, command[3] * sx + x, command[4] * sy + y, command[5] * sx + x, command[6] * sy + y, z), (command, context, x, y) => context.closePath(), (command, context, x, y, sx, sy) => context.ellipse(command[1] * sx + x, command[2] * sy + y, command[3] * sx, command[4] * sy, command[5], command[6], command[7], command[8]), (command, context, x, y, sx, sy, z) => context.lineTo(command[1] * sx + x, command[2] * sy + y, z), (command, context, x, y, sx, sy, z) => context.moveTo(command[1] * sx + x, command[2] * sy + y, z), (command, context, x, y, sx, sy, z) => context.quadraticCurveTo(command[1] * sx + x, command[2] * sy + y, command[3] * sx + x, command[4] * sy + y, z), (command, context, x, y, sx, sy, z) => context.rect(command[1] * sx + x, command[2] * sy + y, command[3] * sx, command[4] * sy, z)];
|
|
@@ -11243,6 +11249,7 @@
|
|
|
11243
11249
|
validCheck(attribute, theme, aabbBounds, graphic) {
|
|
11244
11250
|
if (!graphic) return !0;
|
|
11245
11251
|
if (null != attribute.forceBoundsHeight || null != attribute.forceBoundsWidth) return !0;
|
|
11252
|
+
if (graphic.shadowRoot) return !0;
|
|
11246
11253
|
if (!graphic.valid) return aabbBounds.clear(), !1;
|
|
11247
11254
|
const {
|
|
11248
11255
|
visible = theme.visible
|
|
@@ -14389,13 +14396,23 @@
|
|
|
14389
14396
|
if (this.isSimplify()) return this.tryUpdateAABBBounds(), this.cache.clipedWidth;
|
|
14390
14397
|
}
|
|
14391
14398
|
get cliped() {
|
|
14399
|
+
var _a, _b;
|
|
14392
14400
|
const textTheme = this.getGraphicTheme(),
|
|
14393
|
-
attribute = this.attribute
|
|
14394
|
-
|
|
14395
|
-
|
|
14396
|
-
|
|
14397
|
-
|
|
14398
|
-
|
|
14401
|
+
attribute = this.attribute,
|
|
14402
|
+
{
|
|
14403
|
+
maxLineWidth = textTheme.maxLineWidth,
|
|
14404
|
+
text: text,
|
|
14405
|
+
whiteSpace = textTheme.whiteSpace
|
|
14406
|
+
} = attribute;
|
|
14407
|
+
if (!Number.isFinite(maxLineWidth)) return !1;
|
|
14408
|
+
if (this.tryUpdateAABBBounds(), null === (_b = null === (_a = this.cache) || void 0 === _a ? void 0 : _a.layoutData) || void 0 === _b ? void 0 : _b.lines) {
|
|
14409
|
+
let mergedText = "";
|
|
14410
|
+
this.cache.layoutData.lines.forEach(item => {
|
|
14411
|
+
mergedText += item.str;
|
|
14412
|
+
});
|
|
14413
|
+
return (Array.isArray(text) ? text.join("") : text) !== mergedText;
|
|
14414
|
+
}
|
|
14415
|
+
return "vertical" === attribute.direction && this.cache.verticalList && this.cache.verticalList[0] ? this.cache.verticalList[0].map(item => item.text).join("") !== attribute.text.toString() : null != this.clipedText && this.clipedText !== attribute.text.toString();
|
|
14399
14416
|
}
|
|
14400
14417
|
get multilineLayout() {
|
|
14401
14418
|
if (this.isMultiLine) return this.tryUpdateAABBBounds(), this.cache.layoutData;
|
|
@@ -16296,10 +16313,22 @@
|
|
|
16296
16313
|
}
|
|
16297
16314
|
draw(ctx, lastLine, x, y, drawEllipsis, drawIcon) {
|
|
16298
16315
|
if (drawEllipsis && (lastLine || this.paragraphs.some(p => p.overflow))) {
|
|
16299
|
-
let
|
|
16316
|
+
let emptyOverflow = !0,
|
|
16317
|
+
skipEllipsis = !1;
|
|
16300
16318
|
for (let i = this.paragraphs.length - 1; i >= 0; i--) {
|
|
16301
16319
|
const paragraph = this.paragraphs[i];
|
|
16302
|
-
if (paragraph.overflow)
|
|
16320
|
+
if (paragraph.overflow) emptyOverflow = emptyOverflow && "" === paragraph.text;else if (emptyOverflow) {
|
|
16321
|
+
skipEllipsis = !0;
|
|
16322
|
+
break;
|
|
16323
|
+
}
|
|
16324
|
+
}
|
|
16325
|
+
let otherParagraphWidth = 0;
|
|
16326
|
+
if (!skipEllipsis) for (let i = this.paragraphs.length - 1; i >= 0; i--) {
|
|
16327
|
+
const paragraph = this.paragraphs[i];
|
|
16328
|
+
if (paragraph.overflow) {
|
|
16329
|
+
if ("" === paragraph.text) break;
|
|
16330
|
+
continue;
|
|
16331
|
+
}
|
|
16303
16332
|
if (paragraph instanceof RichTextIcon) break;
|
|
16304
16333
|
if ("vertical" === this.direction && "vertical" !== paragraph.direction) {
|
|
16305
16334
|
paragraph.verticalEllipsis = !0;
|
|
@@ -16524,6 +16553,21 @@
|
|
|
16524
16553
|
getFrameCache() {
|
|
16525
16554
|
return this.shouldUpdateShape() && (this.doUpdateFrameCache(), this.clearUpdateShapeTag()), this._frameCache;
|
|
16526
16555
|
}
|
|
16556
|
+
get cliped() {
|
|
16557
|
+
const frameCache = this.getFrameCache();
|
|
16558
|
+
if (frameCache.actualHeight > frameCache.height) return !0;
|
|
16559
|
+
const {
|
|
16560
|
+
disableAutoWrapLine: disableAutoWrapLine
|
|
16561
|
+
} = this.attribute;
|
|
16562
|
+
if (disableAutoWrapLine) for (let i = 0; i < frameCache.lines.length; i++) {
|
|
16563
|
+
const l = frameCache.lines[i];
|
|
16564
|
+
for (let j = 0; j < l.paragraphs.length; j++) {
|
|
16565
|
+
const p = l.paragraphs[j];
|
|
16566
|
+
if (p.overflow && "" !== p.text) return !0;
|
|
16567
|
+
}
|
|
16568
|
+
}
|
|
16569
|
+
return !1;
|
|
16570
|
+
}
|
|
16527
16571
|
combinedStyleToCharacter(config) {
|
|
16528
16572
|
const {
|
|
16529
16573
|
fill: fill,
|
|
@@ -28291,7 +28335,7 @@
|
|
|
28291
28335
|
|
|
28292
28336
|
const roughModule = _roughModule;
|
|
28293
28337
|
|
|
28294
|
-
const version = "0.20.
|
|
28338
|
+
const version = "0.20.6-beta.0";
|
|
28295
28339
|
preLoadAllModule();
|
|
28296
28340
|
if (isBrowserEnv()) {
|
|
28297
28341
|
loadBrowserEnv(container);
|