@visactor/vrender 0.17.5-alpha.0 → 0.17.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/dist/index.js +31 -19
- 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,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.17.5
|
|
24
|
+
exports.version = "0.17.5", (0, vrender_core_1.isBrowserEnv)() ? (0, vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0,
|
|
25
25
|
vrender_core_1.isNodeEnv)() && (0, vrender_kits_1.loadNodeEnv)(vrender_core_1.container),
|
|
26
26
|
(0, vrender_kits_2.registerArc)(), (0, vrender_kits_2.registerArc3d)(), (0, vrender_kits_2.registerArea)(),
|
|
27
27
|
(0, vrender_kits_2.registerCircle)(), (0, vrender_kits_2.registerGlyph)(), (0, vrender_kits_2.registerGroup)(),
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yDAA4E;AAC5E,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yDAA4E;AAC5E,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,QAAQ,CAAC;AAEhC,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;AACnB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import { container, isBrowserEnv, isNodeEnv } 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.17.5\";\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();\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\n"]}
|
package/dist/index.js
CHANGED
|
@@ -2927,7 +2927,7 @@
|
|
|
2927
2927
|
function LinearToSRGB(c) {
|
|
2928
2928
|
return c < .0031308 ? 12.92 * c : 1.055 * Math.pow(c, .41666) - .055;
|
|
2929
2929
|
}
|
|
2930
|
-
var Color
|
|
2930
|
+
var Color = /*#__PURE__*/function () {
|
|
2931
2931
|
function Color(value) {
|
|
2932
2932
|
_classCallCheck(this, Color);
|
|
2933
2933
|
var color = Color.parseColorString(value);
|
|
@@ -5122,7 +5122,8 @@
|
|
|
5122
5122
|
whiteSpace: "no-wrap",
|
|
5123
5123
|
heightLimit: 1 / 0,
|
|
5124
5124
|
lineClamp: 1 / 0,
|
|
5125
|
-
suffixPosition: "end"
|
|
5125
|
+
suffixPosition: "end",
|
|
5126
|
+
disableAutoClipedPoptip: void 0
|
|
5126
5127
|
};
|
|
5127
5128
|
var DefaultPickStyle = {
|
|
5128
5129
|
pickStrokeBuffer: 0
|
|
@@ -10613,7 +10614,6 @@
|
|
|
10613
10614
|
return res;
|
|
10614
10615
|
};
|
|
10615
10616
|
|
|
10616
|
-
var Color = Color$1;
|
|
10617
10617
|
function colorEqual(color1, color2) {
|
|
10618
10618
|
var c1 = Color.parseColorString(color1),
|
|
10619
10619
|
c2 = Color.parseColorString(color2);
|
|
@@ -13701,7 +13701,7 @@
|
|
|
13701
13701
|
var _a;
|
|
13702
13702
|
var attribute = this.attribute,
|
|
13703
13703
|
textTheme = getTheme(this).text;
|
|
13704
|
-
if (
|
|
13704
|
+
if (this.isMultiLine) return;
|
|
13705
13705
|
var _attribute$maxLineWid = attribute.maxLineWidth,
|
|
13706
13706
|
maxLineWidth = _attribute$maxLineWid === void 0 ? textTheme.maxLineWidth : _attribute$maxLineWid;
|
|
13707
13707
|
return Number.isFinite(maxLineWidth) ? (this.tryUpdateAABBBounds(), this.cache.clipedText) : (null !== (_a = attribute.text) && void 0 !== _a ? _a : textTheme.text).toString();
|
|
@@ -13709,14 +13709,14 @@
|
|
|
13709
13709
|
}, {
|
|
13710
13710
|
key: "clipedWidth",
|
|
13711
13711
|
get: function get() {
|
|
13712
|
-
if (!
|
|
13712
|
+
if (!this.isMultiLine) return this.tryUpdateAABBBounds(), this.cache.clipedWidth;
|
|
13713
13713
|
}
|
|
13714
13714
|
}, {
|
|
13715
13715
|
key: "cliped",
|
|
13716
13716
|
get: function get() {
|
|
13717
13717
|
var textTheme = getTheme(this).text,
|
|
13718
13718
|
attribute = this.attribute;
|
|
13719
|
-
if (
|
|
13719
|
+
if (this.isMultiLine) return;
|
|
13720
13720
|
var _attribute$maxLineWid2 = attribute.maxLineWidth,
|
|
13721
13721
|
maxLineWidth = _attribute$maxLineWid2 === void 0 ? textTheme.maxLineWidth : _attribute$maxLineWid2;
|
|
13722
13722
|
return !!Number.isFinite(maxLineWidth) && (this.tryUpdateAABBBounds(), this.clipedText !== attribute.text.toString());
|
|
@@ -13724,7 +13724,12 @@
|
|
|
13724
13724
|
}, {
|
|
13725
13725
|
key: "multilineLayout",
|
|
13726
13726
|
get: function get() {
|
|
13727
|
-
if (
|
|
13727
|
+
if (this.isMultiLine) return this.tryUpdateAABBBounds(), this.cache.layoutData;
|
|
13728
|
+
}
|
|
13729
|
+
}, {
|
|
13730
|
+
key: "isMultiLine",
|
|
13731
|
+
get: function get() {
|
|
13732
|
+
return Array.isArray(this.attribute.text) || "normal" === this.attribute.whiteSpace;
|
|
13728
13733
|
}
|
|
13729
13734
|
}, {
|
|
13730
13735
|
key: "isValid",
|
|
@@ -20360,9 +20365,9 @@
|
|
|
20360
20365
|
var _this2 = this;
|
|
20361
20366
|
var _a, _b, _c;
|
|
20362
20367
|
var textAttribute = getTheme(text, null == params ? void 0 : params.theme).text,
|
|
20363
|
-
_text$attribute = text.attribute
|
|
20364
|
-
|
|
20365
|
-
_text$attribute$under = _text$attribute.underline,
|
|
20368
|
+
_text$attribute = text.attribute;
|
|
20369
|
+
_text$attribute.text;
|
|
20370
|
+
var _text$attribute$under = _text$attribute.underline,
|
|
20366
20371
|
underline = _text$attribute$under === void 0 ? textAttribute.underline : _text$attribute$under,
|
|
20367
20372
|
_text$attribute$lineT = _text$attribute.lineThrough,
|
|
20368
20373
|
lineThrough = _text$attribute$lineT === void 0 ? textAttribute.lineThrough : _text$attribute$lineT,
|
|
@@ -20370,7 +20375,9 @@
|
|
|
20370
20375
|
keepDirIn3d = _text$attribute$keepD === void 0 ? textAttribute.keepDirIn3d : _text$attribute$keepD,
|
|
20371
20376
|
_text$attribute$direc = _text$attribute.direction,
|
|
20372
20377
|
direction = _text$attribute$direc === void 0 ? textAttribute.direction : _text$attribute$direc,
|
|
20373
|
-
_text$attribute$
|
|
20378
|
+
_text$attribute$white = _text$attribute.whiteSpace;
|
|
20379
|
+
_text$attribute$white === void 0 ? textAttribute.whiteSpace : _text$attribute$white;
|
|
20380
|
+
var _text$attribute$fontS = _text$attribute.fontSize,
|
|
20374
20381
|
fontSize = _text$attribute$fontS === void 0 ? textAttribute.fontSize : _text$attribute$fontS,
|
|
20375
20382
|
_text$attribute$verti = _text$attribute.verticalMode,
|
|
20376
20383
|
verticalMode = _text$attribute$verti === void 0 ? textAttribute.verticalMode : _text$attribute$verti,
|
|
@@ -20407,7 +20414,7 @@
|
|
|
20407
20414
|
}
|
|
20408
20415
|
doStroke && (strokeCb ? strokeCb(context, text.attribute, textAttribute) : sVisible && (context.setStrokeStyle(text, text.attribute, originX - x, originY - y, textAttribute), context.strokeText(t, _x, _y, z))), doFill && (fillCb ? fillCb(context, text.attribute, textAttribute) : fVisible && (context.setCommonStyle(text, text.attribute, originX - x, originY - y, textAttribute), context.fillText(t, _x, _y, z), _this2.drawUnderLine(underline, lineThrough, text, _x, _y, z, textAttribute, context))), direction && (context.highPerformanceRestore(), context.setTransformForCurrent());
|
|
20409
20416
|
};
|
|
20410
|
-
if (
|
|
20417
|
+
if (text.isMultiLine) {
|
|
20411
20418
|
if (context.setTextStyleWithoutAlignBaseline(text.attribute, textAttribute, z), "horizontal" === direction) {
|
|
20412
20419
|
var multilineLayout = text.multilineLayout;
|
|
20413
20420
|
if (!multilineLayout) return void context.highPerformanceRestore();
|
|
@@ -21065,6 +21072,11 @@
|
|
|
21065
21072
|
value: function register(plugin) {
|
|
21066
21073
|
"onStartupFinished" === plugin.activeEvent ? this.onStartupFinishedPlugin.push(plugin) : "onRegister" === plugin.activeEvent && (this.onRegisterPlugin.push(plugin), plugin.activate(this));
|
|
21067
21074
|
}
|
|
21075
|
+
}, {
|
|
21076
|
+
key: "unRegister",
|
|
21077
|
+
value: function unRegister(plugin) {
|
|
21078
|
+
"onStartupFinished" === plugin.activeEvent ? this.onStartupFinishedPlugin.splice(this.onStartupFinishedPlugin.indexOf(plugin), 1) : "onRegister" === plugin.activeEvent && this.onRegisterPlugin.splice(this.onStartupFinishedPlugin.indexOf(plugin), 1), plugin.deactivate(this);
|
|
21079
|
+
}
|
|
21068
21080
|
}, {
|
|
21069
21081
|
key: "release",
|
|
21070
21082
|
value: function release() {
|
|
@@ -23537,7 +23549,7 @@
|
|
|
23537
23549
|
value: function disableView3dTranform() {
|
|
23538
23550
|
var _this2 = this;
|
|
23539
23551
|
this.view3dTranform && (this.view3dTranform = !1, this.pluginService.findPluginsByName("ViewTransform3dPlugin").forEach(function (plugin) {
|
|
23540
|
-
|
|
23552
|
+
_this2.pluginService.unRegister(plugin);
|
|
23541
23553
|
}));
|
|
23542
23554
|
}
|
|
23543
23555
|
}, {
|
|
@@ -23550,7 +23562,7 @@
|
|
|
23550
23562
|
value: function disableAutoRender() {
|
|
23551
23563
|
var _this3 = this;
|
|
23552
23564
|
this.autoRender && (this.autoRender = !1, this.pluginService.findPluginsByName("AutoRenderPlugin").forEach(function (plugin) {
|
|
23553
|
-
|
|
23565
|
+
_this3.pluginService.unRegister(plugin);
|
|
23554
23566
|
}));
|
|
23555
23567
|
}
|
|
23556
23568
|
}, {
|
|
@@ -23563,7 +23575,7 @@
|
|
|
23563
23575
|
value: function disableIncrementalAutoRender() {
|
|
23564
23576
|
var _this4 = this;
|
|
23565
23577
|
this.increaseAutoRender && (this.increaseAutoRender = !1, this.pluginService.findPluginsByName("IncrementalAutoRenderPlugin").forEach(function (plugin) {
|
|
23566
|
-
|
|
23578
|
+
_this4.pluginService.unRegister(plugin);
|
|
23567
23579
|
}));
|
|
23568
23580
|
}
|
|
23569
23581
|
}, {
|
|
@@ -23579,7 +23591,7 @@
|
|
|
23579
23591
|
value: function disableDirtyBounds() {
|
|
23580
23592
|
var _this5 = this;
|
|
23581
23593
|
this.dirtyBounds && (this.dirtyBounds = null, this.pluginService.findPluginsByName("DirtyBoundsPlugin").forEach(function (plugin) {
|
|
23582
|
-
|
|
23594
|
+
_this5.pluginService.unRegister(plugin);
|
|
23583
23595
|
}));
|
|
23584
23596
|
}
|
|
23585
23597
|
}, {
|
|
@@ -23592,7 +23604,7 @@
|
|
|
23592
23604
|
value: function disableLayout() {
|
|
23593
23605
|
var _this6 = this;
|
|
23594
23606
|
this._enableLayout && (this._enableLayout = !1, this.pluginService.findPluginsByName("FlexLayoutPlugin").forEach(function (plugin) {
|
|
23595
|
-
|
|
23607
|
+
_this6.pluginService.unRegister(plugin);
|
|
23596
23608
|
}));
|
|
23597
23609
|
}
|
|
23598
23610
|
}, {
|
|
@@ -23605,7 +23617,7 @@
|
|
|
23605
23617
|
value: function disableHtmlAttribute() {
|
|
23606
23618
|
var _this7 = this;
|
|
23607
23619
|
this.htmlAttribute && (this.htmlAttribute = !1, this.pluginService.findPluginsByName("HtmlAttributePlugin").forEach(function (plugin) {
|
|
23608
|
-
|
|
23620
|
+
_this7.pluginService.unRegister(plugin);
|
|
23609
23621
|
}));
|
|
23610
23622
|
}
|
|
23611
23623
|
}, {
|
|
@@ -34340,7 +34352,7 @@
|
|
|
34340
34352
|
|
|
34341
34353
|
var roughModule = _roughModule;
|
|
34342
34354
|
|
|
34343
|
-
const version = "0.17.5
|
|
34355
|
+
const version = "0.17.5";
|
|
34344
34356
|
if (isBrowserEnv()) {
|
|
34345
34357
|
loadBrowserEnv(container);
|
|
34346
34358
|
}
|