@visactor/vrender 0.20.5-beta.0 → 0.20.6-alpha.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 +11 -10
- package/cjs/index.js.map +1 -1
- package/dist/index.es.js +70 -25
- package/dist/index.js +70 -25
- 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 +5 -5
package/cjs/index.d.ts
CHANGED
package/cjs/index.js
CHANGED
|
@@ -21,16 +21,17 @@ 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.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
(0, vrender_kits_2.
|
|
28
|
-
(0, vrender_kits_2.
|
|
29
|
-
(0, vrender_kits_2.
|
|
30
|
-
(0, vrender_kits_2.
|
|
31
|
-
vrender_kits_2.
|
|
32
|
-
(0, vrender_kits_2.
|
|
33
|
-
(0,
|
|
24
|
+
exports.version = "0.20.6-alpha.0", (0, vrender_core_1.preLoadAllModule)(), (0,
|
|
25
|
+
vrender_core_1.isBrowserEnv)() ? (0, vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0,
|
|
26
|
+
vrender_core_1.isNodeEnv)() && (0, vrender_kits_1.loadNodeEnv)(vrender_core_1.container),
|
|
27
|
+
(0, vrender_kits_2.registerArc)(), (0, vrender_kits_2.registerArc3d)(), (0, vrender_kits_2.registerArea)(),
|
|
28
|
+
(0, vrender_kits_2.registerCircle)(), (0, vrender_kits_2.registerGlyph)(), (0, vrender_kits_2.registerGroup)(),
|
|
29
|
+
(0, vrender_kits_2.registerImage)(), (0, vrender_kits_2.registerLine)(), (0, vrender_kits_2.registerPath)(),
|
|
30
|
+
(0, vrender_kits_2.registerPolygon)(), (0, vrender_kits_2.registerPyramid3d)(),
|
|
31
|
+
(0, vrender_kits_2.registerRect)(), (0, vrender_kits_2.registerRect3d)(), (0, vrender_kits_2.registerRichtext)(),
|
|
32
|
+
(0, vrender_kits_2.registerShadowRoot)(), (0, vrender_kits_2.registerSymbol)(),
|
|
33
|
+
(0, vrender_kits_2.registerText)(), (0, vrender_kits_2.registerWrapText)(), (0,
|
|
34
|
+
vrender_core_1.registerFlexLayoutPlugin)(), (0, vrender_core_1.registerViewTransform3dPlugin)(),
|
|
34
35
|
(0, vrender_core_1.registerHtmlAttributePlugin)(), (0, vrender_core_1.registerReactAttributePlugin)(),
|
|
35
36
|
(0, vrender_core_1.registerDirectionalLight)(), (0, vrender_core_1.registerOrthoCamera)(),
|
|
36
37
|
__exportStar(require("@visactor/vrender-core"), exports), __exportStar(require("@visactor/vrender-kits"), exports);
|
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,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAWgC;AAChC,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,gBAAgB,CAAC;AAExC,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-alpha.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)];
|
|
@@ -7569,8 +7575,9 @@ class TagPointsUpdate extends ACustomAnimate {
|
|
|
7569
7575
|
}), this.clipRange && (out.clipRange = this.clipRange + (1 - this.clipRange) * ratio), this.segmentsCache && this.to.segments) {
|
|
7570
7576
|
let start = 0;
|
|
7571
7577
|
out.segments = this.to.segments.map((segment, index) => {
|
|
7572
|
-
const
|
|
7573
|
-
|
|
7578
|
+
const end = start + this.segmentsCache[index],
|
|
7579
|
+
points = this.points.slice(start, end);
|
|
7580
|
+
return start = end, Object.assign(Object.assign({}, segment), {
|
|
7574
7581
|
points: points
|
|
7575
7582
|
});
|
|
7576
7583
|
});
|
|
@@ -11237,6 +11244,7 @@ let DefaultGraphicService = class {
|
|
|
11237
11244
|
validCheck(attribute, theme, aabbBounds, graphic) {
|
|
11238
11245
|
if (!graphic) return !0;
|
|
11239
11246
|
if (null != attribute.forceBoundsHeight || null != attribute.forceBoundsWidth) return !0;
|
|
11247
|
+
if (graphic.shadowRoot) return !0;
|
|
11240
11248
|
if (!graphic.valid) return aabbBounds.clear(), !1;
|
|
11241
11249
|
const {
|
|
11242
11250
|
visible = theme.visible
|
|
@@ -14383,13 +14391,23 @@ class Text extends Graphic {
|
|
|
14383
14391
|
if (this.isSimplify()) return this.tryUpdateAABBBounds(), this.cache.clipedWidth;
|
|
14384
14392
|
}
|
|
14385
14393
|
get cliped() {
|
|
14394
|
+
var _a, _b;
|
|
14386
14395
|
const textTheme = this.getGraphicTheme(),
|
|
14387
|
-
attribute = this.attribute
|
|
14388
|
-
|
|
14389
|
-
|
|
14390
|
-
|
|
14391
|
-
|
|
14392
|
-
|
|
14396
|
+
attribute = this.attribute,
|
|
14397
|
+
{
|
|
14398
|
+
maxLineWidth = textTheme.maxLineWidth,
|
|
14399
|
+
text: text,
|
|
14400
|
+
whiteSpace = textTheme.whiteSpace
|
|
14401
|
+
} = attribute;
|
|
14402
|
+
if (!Number.isFinite(maxLineWidth)) return !1;
|
|
14403
|
+
if (this.tryUpdateAABBBounds(), null === (_b = null === (_a = this.cache) || void 0 === _a ? void 0 : _a.layoutData) || void 0 === _b ? void 0 : _b.lines) {
|
|
14404
|
+
let mergedText = "";
|
|
14405
|
+
this.cache.layoutData.lines.forEach(item => {
|
|
14406
|
+
mergedText += item.str;
|
|
14407
|
+
});
|
|
14408
|
+
return (Array.isArray(text) ? text.join("") : text) !== mergedText;
|
|
14409
|
+
}
|
|
14410
|
+
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
14411
|
}
|
|
14394
14412
|
get multilineLayout() {
|
|
14395
14413
|
if (this.isMultiLine) return this.tryUpdateAABBBounds(), this.cache.layoutData;
|
|
@@ -16290,10 +16308,22 @@ class Line {
|
|
|
16290
16308
|
}
|
|
16291
16309
|
draw(ctx, lastLine, x, y, drawEllipsis, drawIcon) {
|
|
16292
16310
|
if (drawEllipsis && (lastLine || this.paragraphs.some(p => p.overflow))) {
|
|
16293
|
-
let
|
|
16311
|
+
let emptyOverflow = !0,
|
|
16312
|
+
skipEllipsis = !1;
|
|
16294
16313
|
for (let i = this.paragraphs.length - 1; i >= 0; i--) {
|
|
16295
16314
|
const paragraph = this.paragraphs[i];
|
|
16296
|
-
if (paragraph.overflow)
|
|
16315
|
+
if (paragraph.overflow) emptyOverflow = emptyOverflow && "" === paragraph.text;else if (emptyOverflow) {
|
|
16316
|
+
skipEllipsis = !0;
|
|
16317
|
+
break;
|
|
16318
|
+
}
|
|
16319
|
+
}
|
|
16320
|
+
let otherParagraphWidth = 0;
|
|
16321
|
+
if (!skipEllipsis) for (let i = this.paragraphs.length - 1; i >= 0; i--) {
|
|
16322
|
+
const paragraph = this.paragraphs[i];
|
|
16323
|
+
if (paragraph.overflow) {
|
|
16324
|
+
if ("" === paragraph.text) break;
|
|
16325
|
+
continue;
|
|
16326
|
+
}
|
|
16297
16327
|
if (paragraph instanceof RichTextIcon) break;
|
|
16298
16328
|
if ("vertical" === this.direction && "vertical" !== paragraph.direction) {
|
|
16299
16329
|
paragraph.verticalEllipsis = !0;
|
|
@@ -16518,6 +16548,21 @@ class RichText extends Graphic {
|
|
|
16518
16548
|
getFrameCache() {
|
|
16519
16549
|
return this.shouldUpdateShape() && (this.doUpdateFrameCache(), this.clearUpdateShapeTag()), this._frameCache;
|
|
16520
16550
|
}
|
|
16551
|
+
get cliped() {
|
|
16552
|
+
const frameCache = this.getFrameCache();
|
|
16553
|
+
if (frameCache.actualHeight > frameCache.height) return !0;
|
|
16554
|
+
const {
|
|
16555
|
+
disableAutoWrapLine: disableAutoWrapLine
|
|
16556
|
+
} = this.attribute;
|
|
16557
|
+
if (disableAutoWrapLine) for (let i = 0; i < frameCache.lines.length; i++) {
|
|
16558
|
+
const l = frameCache.lines[i];
|
|
16559
|
+
for (let j = 0; j < l.paragraphs.length; j++) {
|
|
16560
|
+
const p = l.paragraphs[j];
|
|
16561
|
+
if (p.overflow && "" !== p.text) return !0;
|
|
16562
|
+
}
|
|
16563
|
+
}
|
|
16564
|
+
return !1;
|
|
16565
|
+
}
|
|
16521
16566
|
combinedStyleToCharacter(config) {
|
|
16522
16567
|
const {
|
|
16523
16568
|
fill: fill,
|
|
@@ -28285,7 +28330,7 @@ const registerWrapText = _registerWrapText;
|
|
|
28285
28330
|
|
|
28286
28331
|
const roughModule = _roughModule;
|
|
28287
28332
|
|
|
28288
|
-
const version = "0.20.
|
|
28333
|
+
const version = "0.20.6-alpha.0";
|
|
28289
28334
|
preLoadAllModule();
|
|
28290
28335
|
if (isBrowserEnv()) {
|
|
28291
28336
|
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)];
|
|
@@ -7575,8 +7581,9 @@
|
|
|
7575
7581
|
}), this.clipRange && (out.clipRange = this.clipRange + (1 - this.clipRange) * ratio), this.segmentsCache && this.to.segments) {
|
|
7576
7582
|
let start = 0;
|
|
7577
7583
|
out.segments = this.to.segments.map((segment, index) => {
|
|
7578
|
-
const
|
|
7579
|
-
|
|
7584
|
+
const end = start + this.segmentsCache[index],
|
|
7585
|
+
points = this.points.slice(start, end);
|
|
7586
|
+
return start = end, Object.assign(Object.assign({}, segment), {
|
|
7580
7587
|
points: points
|
|
7581
7588
|
});
|
|
7582
7589
|
});
|
|
@@ -11243,6 +11250,7 @@
|
|
|
11243
11250
|
validCheck(attribute, theme, aabbBounds, graphic) {
|
|
11244
11251
|
if (!graphic) return !0;
|
|
11245
11252
|
if (null != attribute.forceBoundsHeight || null != attribute.forceBoundsWidth) return !0;
|
|
11253
|
+
if (graphic.shadowRoot) return !0;
|
|
11246
11254
|
if (!graphic.valid) return aabbBounds.clear(), !1;
|
|
11247
11255
|
const {
|
|
11248
11256
|
visible = theme.visible
|
|
@@ -14389,13 +14397,23 @@
|
|
|
14389
14397
|
if (this.isSimplify()) return this.tryUpdateAABBBounds(), this.cache.clipedWidth;
|
|
14390
14398
|
}
|
|
14391
14399
|
get cliped() {
|
|
14400
|
+
var _a, _b;
|
|
14392
14401
|
const textTheme = this.getGraphicTheme(),
|
|
14393
|
-
attribute = this.attribute
|
|
14394
|
-
|
|
14395
|
-
|
|
14396
|
-
|
|
14397
|
-
|
|
14398
|
-
|
|
14402
|
+
attribute = this.attribute,
|
|
14403
|
+
{
|
|
14404
|
+
maxLineWidth = textTheme.maxLineWidth,
|
|
14405
|
+
text: text,
|
|
14406
|
+
whiteSpace = textTheme.whiteSpace
|
|
14407
|
+
} = attribute;
|
|
14408
|
+
if (!Number.isFinite(maxLineWidth)) return !1;
|
|
14409
|
+
if (this.tryUpdateAABBBounds(), null === (_b = null === (_a = this.cache) || void 0 === _a ? void 0 : _a.layoutData) || void 0 === _b ? void 0 : _b.lines) {
|
|
14410
|
+
let mergedText = "";
|
|
14411
|
+
this.cache.layoutData.lines.forEach(item => {
|
|
14412
|
+
mergedText += item.str;
|
|
14413
|
+
});
|
|
14414
|
+
return (Array.isArray(text) ? text.join("") : text) !== mergedText;
|
|
14415
|
+
}
|
|
14416
|
+
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
14417
|
}
|
|
14400
14418
|
get multilineLayout() {
|
|
14401
14419
|
if (this.isMultiLine) return this.tryUpdateAABBBounds(), this.cache.layoutData;
|
|
@@ -16296,10 +16314,22 @@
|
|
|
16296
16314
|
}
|
|
16297
16315
|
draw(ctx, lastLine, x, y, drawEllipsis, drawIcon) {
|
|
16298
16316
|
if (drawEllipsis && (lastLine || this.paragraphs.some(p => p.overflow))) {
|
|
16299
|
-
let
|
|
16317
|
+
let emptyOverflow = !0,
|
|
16318
|
+
skipEllipsis = !1;
|
|
16300
16319
|
for (let i = this.paragraphs.length - 1; i >= 0; i--) {
|
|
16301
16320
|
const paragraph = this.paragraphs[i];
|
|
16302
|
-
if (paragraph.overflow)
|
|
16321
|
+
if (paragraph.overflow) emptyOverflow = emptyOverflow && "" === paragraph.text;else if (emptyOverflow) {
|
|
16322
|
+
skipEllipsis = !0;
|
|
16323
|
+
break;
|
|
16324
|
+
}
|
|
16325
|
+
}
|
|
16326
|
+
let otherParagraphWidth = 0;
|
|
16327
|
+
if (!skipEllipsis) for (let i = this.paragraphs.length - 1; i >= 0; i--) {
|
|
16328
|
+
const paragraph = this.paragraphs[i];
|
|
16329
|
+
if (paragraph.overflow) {
|
|
16330
|
+
if ("" === paragraph.text) break;
|
|
16331
|
+
continue;
|
|
16332
|
+
}
|
|
16303
16333
|
if (paragraph instanceof RichTextIcon) break;
|
|
16304
16334
|
if ("vertical" === this.direction && "vertical" !== paragraph.direction) {
|
|
16305
16335
|
paragraph.verticalEllipsis = !0;
|
|
@@ -16524,6 +16554,21 @@
|
|
|
16524
16554
|
getFrameCache() {
|
|
16525
16555
|
return this.shouldUpdateShape() && (this.doUpdateFrameCache(), this.clearUpdateShapeTag()), this._frameCache;
|
|
16526
16556
|
}
|
|
16557
|
+
get cliped() {
|
|
16558
|
+
const frameCache = this.getFrameCache();
|
|
16559
|
+
if (frameCache.actualHeight > frameCache.height) return !0;
|
|
16560
|
+
const {
|
|
16561
|
+
disableAutoWrapLine: disableAutoWrapLine
|
|
16562
|
+
} = this.attribute;
|
|
16563
|
+
if (disableAutoWrapLine) for (let i = 0; i < frameCache.lines.length; i++) {
|
|
16564
|
+
const l = frameCache.lines[i];
|
|
16565
|
+
for (let j = 0; j < l.paragraphs.length; j++) {
|
|
16566
|
+
const p = l.paragraphs[j];
|
|
16567
|
+
if (p.overflow && "" !== p.text) return !0;
|
|
16568
|
+
}
|
|
16569
|
+
}
|
|
16570
|
+
return !1;
|
|
16571
|
+
}
|
|
16527
16572
|
combinedStyleToCharacter(config) {
|
|
16528
16573
|
const {
|
|
16529
16574
|
fill: fill,
|
|
@@ -28291,7 +28336,7 @@
|
|
|
28291
28336
|
|
|
28292
28337
|
const roughModule = _roughModule;
|
|
28293
28338
|
|
|
28294
|
-
const version = "0.20.
|
|
28339
|
+
const version = "0.20.6-alpha.0";
|
|
28295
28340
|
preLoadAllModule();
|
|
28296
28341
|
if (isBrowserEnv()) {
|
|
28297
28342
|
loadBrowserEnv(container);
|