@visactor/vrender 0.18.14 → 0.18.15
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 +25 -3
- 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 +3 -3
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.18.
|
|
24
|
+
exports.version = "0.18.15", (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,yDAA8F;AAC9F,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,SAAS,CAAC;AAEjC,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;AACnB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import '@visactor/vrender-core';\nimport { container, isBrowserEnv, isNodeEnv, preLoadAllModule } 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.18.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAA8F;AAC9F,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,SAAS,CAAC;AAEjC,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;AACnB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import '@visactor/vrender-core';\nimport { container, isBrowserEnv, isNodeEnv, preLoadAllModule } 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.18.15\";\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();\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\n"]}
|
package/dist/index.js
CHANGED
|
@@ -5100,6 +5100,8 @@
|
|
|
5100
5100
|
pickStrokeBuffer: 0
|
|
5101
5101
|
};
|
|
5102
5102
|
var DefaultStyle = Object.assign(Object.assign(Object.assign(Object.assign({
|
|
5103
|
+
forceBoundsWidth: void 0,
|
|
5104
|
+
forceBoundsHeight: void 0,
|
|
5103
5105
|
opacity: 1,
|
|
5104
5106
|
background: null,
|
|
5105
5107
|
backgroundOpacity: 1,
|
|
@@ -5126,6 +5128,7 @@
|
|
|
5126
5128
|
};
|
|
5127
5129
|
var DefaultAttribute = Object.assign(Object.assign(Object.assign({
|
|
5128
5130
|
strokeSeg: null,
|
|
5131
|
+
renderable: !0,
|
|
5129
5132
|
pickable: !0,
|
|
5130
5133
|
childrenPickable: !0,
|
|
5131
5134
|
fillPickable: !0,
|
|
@@ -17720,6 +17723,22 @@
|
|
|
17720
17723
|
aabbBounds.union(node.AABBBounds);
|
|
17721
17724
|
}), aabbBounds) : aabbBounds;
|
|
17722
17725
|
}
|
|
17726
|
+
}, {
|
|
17727
|
+
key: "updateHTMLTextAABBBounds",
|
|
17728
|
+
value: function updateHTMLTextAABBBounds(attribute, textTheme, aabbBounds, graphic) {
|
|
17729
|
+
var textAlign = attribute.textAlign,
|
|
17730
|
+
textBaseline = attribute.textBaseline;
|
|
17731
|
+
if (null != attribute.forceBoundsHeight) {
|
|
17732
|
+
var h = isNumber$1(attribute.forceBoundsHeight) ? attribute.forceBoundsHeight : attribute.forceBoundsHeight(),
|
|
17733
|
+
dy = textLayoutOffsetY(textBaseline, h, h);
|
|
17734
|
+
aabbBounds.set(aabbBounds.x1, dy, aabbBounds.x2, dy + h);
|
|
17735
|
+
}
|
|
17736
|
+
if (null != attribute.forceBoundsWidth) {
|
|
17737
|
+
var w = isNumber$1(attribute.forceBoundsWidth) ? attribute.forceBoundsWidth : attribute.forceBoundsWidth(),
|
|
17738
|
+
dx = textDrawOffsetX(textAlign, w);
|
|
17739
|
+
aabbBounds.set(dx, aabbBounds.y1, dx + w, aabbBounds.y2);
|
|
17740
|
+
}
|
|
17741
|
+
}
|
|
17723
17742
|
}, {
|
|
17724
17743
|
key: "updateRichTextAABBBounds",
|
|
17725
17744
|
value: function updateRichTextAABBBounds(attribute, richtextTheme, aabbBounds, graphic) {
|
|
@@ -17771,7 +17790,7 @@
|
|
|
17771
17790
|
aabbBounds.translate(deltaX, deltaY);
|
|
17772
17791
|
var tb1 = this.tempAABBBounds1,
|
|
17773
17792
|
tb2 = this.tempAABBBounds2;
|
|
17774
|
-
return tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), this.transformAABBBounds(attribute, aabbBounds, richtextTheme, !1, graphic), aabbBounds;
|
|
17793
|
+
return tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), null == attribute.forceBoundsHeight && null == attribute.forceBoundsWidth || this.updateHTMLTextAABBBounds(attribute, richtextTheme, aabbBounds), this.transformAABBBounds(attribute, aabbBounds, richtextTheme, !1, graphic), aabbBounds;
|
|
17775
17794
|
}
|
|
17776
17795
|
}, {
|
|
17777
17796
|
key: "updateTextAABBBounds",
|
|
@@ -17796,7 +17815,7 @@
|
|
|
17796
17815
|
var shadowBlurHalfWidth = shadowBlur / Math.abs(scaleX + scaleY);
|
|
17797
17816
|
boundStroke(tb1, shadowBlurHalfWidth, !0, strokeBoundsBuffer), aabbBounds.union(tb1);
|
|
17798
17817
|
}
|
|
17799
|
-
return this.combindShadowAABBBounds(aabbBounds, graphic), transformBoundsWithMatrix(aabbBounds, aabbBounds, graphic.transMatrix), aabbBounds;
|
|
17818
|
+
return this.combindShadowAABBBounds(aabbBounds, graphic), null == attribute.forceBoundsHeight && null == attribute.forceBoundsWidth || this.updateHTMLTextAABBBounds(attribute, textTheme, aabbBounds), transformBoundsWithMatrix(aabbBounds, aabbBounds, graphic.transMatrix), aabbBounds;
|
|
17800
17819
|
}
|
|
17801
17820
|
}, {
|
|
17802
17821
|
key: "updatePathAABBBounds",
|
|
@@ -18120,6 +18139,7 @@
|
|
|
18120
18139
|
key: "_validCheck",
|
|
18121
18140
|
value: function _validCheck(attribute, theme, aabbBounds, graphic) {
|
|
18122
18141
|
if (!graphic) return !0;
|
|
18142
|
+
if (null != attribute.forceBoundsHeight || null != attribute.forceBoundsWidth) return !0;
|
|
18123
18143
|
if (!graphic.valid) return aabbBounds.clear(), !1;
|
|
18124
18144
|
var _attribute$visible = attribute.visible,
|
|
18125
18145
|
visible = _attribute$visible === void 0 ? theme.visible : _attribute$visible;
|
|
@@ -18312,6 +18332,8 @@
|
|
|
18312
18332
|
value: function _draw(graphic, defaultAttr, computed3dMatrix, drawContext, params) {
|
|
18313
18333
|
var context = drawContext.context;
|
|
18314
18334
|
if (!context) return;
|
|
18335
|
+
var renderable = graphic.attribute.renderable;
|
|
18336
|
+
if (!1 === renderable) return;
|
|
18315
18337
|
context.highPerformanceSave();
|
|
18316
18338
|
var data = this.transform(graphic, defaultAttr, context, computed3dMatrix),
|
|
18317
18339
|
x = data.x,
|
|
@@ -34930,7 +34952,7 @@
|
|
|
34930
34952
|
|
|
34931
34953
|
var roughModule = _roughModule;
|
|
34932
34954
|
|
|
34933
|
-
const version = "0.18.
|
|
34955
|
+
const version = "0.18.15";
|
|
34934
34956
|
preLoadAllModule();
|
|
34935
34957
|
if (isBrowserEnv()) {
|
|
34936
34958
|
loadBrowserEnv(container);
|