@visactor/vrender 0.18.15 → 0.18.17
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 +22 -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.18.
|
|
24
|
+
exports.version = "0.18.17", (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.17\";\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
|
@@ -6594,7 +6594,6 @@
|
|
|
6594
6594
|
symbol: DefaultSymbolAttribute,
|
|
6595
6595
|
text: DefaultTextAttribute,
|
|
6596
6596
|
rect: DefaultRectAttribute,
|
|
6597
|
-
rect3d: DefaultRect3dAttribute,
|
|
6598
6597
|
polygon: DefaultPolygonAttribute,
|
|
6599
6598
|
richtext: DefaultRichTextAttribute,
|
|
6600
6599
|
richtextIcon: DefaultRichTextIconAttribute,
|
|
@@ -6613,7 +6612,6 @@
|
|
|
6613
6612
|
symbol: Object.assign({}, defaultThemeObj.symbol),
|
|
6614
6613
|
text: Object.assign({}, defaultThemeObj.text),
|
|
6615
6614
|
rect: Object.assign({}, defaultThemeObj.rect),
|
|
6616
|
-
rect3d: Object.assign({}, defaultThemeObj.rect3d),
|
|
6617
6615
|
polygon: Object.assign({}, defaultThemeObj.polygon),
|
|
6618
6616
|
richtext: Object.assign({}, defaultThemeObj.richtext),
|
|
6619
6617
|
richtextIcon: Object.assign({}, defaultThemeObj.richtextIcon),
|
|
@@ -13240,7 +13238,7 @@
|
|
|
13240
13238
|
}
|
|
13241
13239
|
function drawPathProxy(graphic, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
13242
13240
|
if (!graphic.pathProxy) return !1;
|
|
13243
|
-
var themeAttributes = getTheme(graphic, null == params ? void 0 : params.theme)[graphic.type],
|
|
13241
|
+
var themeAttributes = getTheme(graphic, null == params ? void 0 : params.theme)[graphic.type.replace("3d", "")],
|
|
13244
13242
|
_graphic$attribute = graphic.attribute,
|
|
13245
13243
|
_graphic$attribute$fi = _graphic$attribute.fill,
|
|
13246
13244
|
fill = _graphic$attribute$fi === void 0 ? themeAttributes.fill : _graphic$attribute$fi,
|
|
@@ -15531,7 +15529,7 @@
|
|
|
15531
15529
|
vertices: [],
|
|
15532
15530
|
edges: []
|
|
15533
15531
|
},
|
|
15534
|
-
rectTheme = getTheme(this).
|
|
15532
|
+
rectTheme = getTheme(this).rect,
|
|
15535
15533
|
_this$attribute = this.attribute,
|
|
15536
15534
|
x1 = _this$attribute.x1,
|
|
15537
15535
|
y1 = _this$attribute.y1,
|
|
@@ -19331,13 +19329,18 @@
|
|
|
19331
19329
|
key: "drawShape",
|
|
19332
19330
|
value: function drawShape(rect, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb) {
|
|
19333
19331
|
var _rect$attribute4 = rect.attribute,
|
|
19334
|
-
|
|
19335
|
-
|
|
19336
|
-
_rect$attribute4$
|
|
19337
|
-
|
|
19332
|
+
x1 = _rect$attribute4.x1,
|
|
19333
|
+
y1 = _rect$attribute4.y1,
|
|
19334
|
+
_rect$attribute4$x = _rect$attribute4.x,
|
|
19335
|
+
originX = _rect$attribute4$x === void 0 ? groupAttribute.x : _rect$attribute4$x,
|
|
19336
|
+
_rect$attribute4$y = _rect$attribute4.y,
|
|
19337
|
+
originY = _rect$attribute4$y === void 0 ? groupAttribute.y : _rect$attribute4$y,
|
|
19338
19338
|
_rect$attribute4$stro = _rect$attribute4.stroke,
|
|
19339
19339
|
stroke = _rect$attribute4$stro === void 0 ? groupAttribute.stroke : _rect$attribute4$stro;
|
|
19340
|
-
|
|
19340
|
+
var _rect$attribute5 = rect.attribute,
|
|
19341
|
+
width = _rect$attribute5.width,
|
|
19342
|
+
height = _rect$attribute5.height;
|
|
19343
|
+
if (width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0, Array.isArray(stroke) && stroke.some(function (s) {
|
|
19341
19344
|
return !1 === s;
|
|
19342
19345
|
})) {
|
|
19343
19346
|
if (context.setStrokeStyle(rect, rect.attribute, x, y, groupAttribute), context.beginPath(), context.moveTo(x, y), stroke[0] ? context.lineTo(x + width, y) : context.moveTo(x + width, y), stroke[1] ? context.lineTo(x + width, y + height) : context.moveTo(x + width, y + height), stroke[2] ? context.lineTo(x, y + height) : context.moveTo(x, y + height), stroke[3]) {
|
|
@@ -20922,7 +20925,7 @@
|
|
|
20922
20925
|
strokeOpacity: fillOpacity
|
|
20923
20926
|
};
|
|
20924
20927
|
if (underline) {
|
|
20925
|
-
attribute.lineWidth = underline, context.setStrokeStyle(text, attribute, x, y, textAttribute), context.setLineDash(underlineDash), context.beginPath();
|
|
20928
|
+
attribute.lineWidth = underline, context.setStrokeStyle(text, attribute, x, y, textAttribute), underlineDash && context.setLineDash(underlineDash), context.beginPath();
|
|
20926
20929
|
var dy = y + offsetY + fontSize + underlineOffset;
|
|
20927
20930
|
context.moveTo(x + offsetX, dy, z), context.lineTo(x + offsetX + w, dy, z), context.stroke();
|
|
20928
20931
|
}
|
|
@@ -20958,7 +20961,7 @@
|
|
|
20958
20961
|
};
|
|
20959
20962
|
var deltaY = -3;
|
|
20960
20963
|
if (underline) {
|
|
20961
|
-
attribute.lineWidth = underline, context.setStrokeStyle(text, attribute, x, y, textAttribute), context.setLineDash(underlineDash), context.beginPath();
|
|
20964
|
+
attribute.lineWidth = underline, context.setStrokeStyle(text, attribute, x, y, textAttribute), underlineDash && context.setLineDash(underlineDash), context.beginPath();
|
|
20962
20965
|
var dy = y + offsetY + fontSize + deltaY + underlineOffset;
|
|
20963
20966
|
context.moveTo(x + 0, dy, z), context.lineTo(x + 0 + w, dy, z), context.stroke();
|
|
20964
20967
|
}
|
|
@@ -23438,7 +23441,7 @@
|
|
|
23438
23441
|
}
|
|
23439
23442
|
} else if ("flex-end" === justifyContent) {
|
|
23440
23443
|
var _pos = main.len;
|
|
23441
|
-
for (var _i =
|
|
23444
|
+
for (var _i = currSeg.idx; _i >= lastIdx; _i--) {
|
|
23442
23445
|
_pos -= mianLenArray[_i].mainLen;
|
|
23443
23446
|
var _posBaseLeftTop = _pos + getPadding(children[_i], main.field),
|
|
23444
23447
|
_b = this.getAABBBounds(children[_i]);
|
|
@@ -25807,7 +25810,7 @@
|
|
|
25807
25810
|
key: "drawShape",
|
|
25808
25811
|
value: function drawShape(rect, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
25809
25812
|
var _a;
|
|
25810
|
-
var rectAttribute = getTheme(rect, null == params ? void 0 : params.theme).
|
|
25813
|
+
var rectAttribute = getTheme(rect, null == params ? void 0 : params.theme).rect,
|
|
25811
25814
|
_rect$attribute = rect.attribute,
|
|
25812
25815
|
_rect$attribute$fill = _rect$attribute.fill,
|
|
25813
25816
|
fill = _rect$attribute$fill === void 0 ? rectAttribute.fill : _rect$attribute$fill,
|
|
@@ -29945,7 +29948,7 @@
|
|
|
29945
29948
|
value: function setLineDash(segments) {
|
|
29946
29949
|
var a = arguments,
|
|
29947
29950
|
_context = this.nativeContext;
|
|
29948
|
-
this.nativeContext.setLineDash ? _context.setLineDash(a[0]) : "mozDash" in _context ? _context.mozDash = a[0] : "webkitLineDash" in _context && (_context.webkitLineDash = a[0]);
|
|
29951
|
+
this.nativeContext.setLineDash ? a[0] && _context.setLineDash(a[0]) : "mozDash" in _context ? _context.mozDash = a[0] : "webkitLineDash" in _context && (_context.webkitLineDash = a[0]);
|
|
29949
29952
|
}
|
|
29950
29953
|
}, {
|
|
29951
29954
|
key: "stroke",
|
|
@@ -30066,7 +30069,7 @@
|
|
|
30066
30069
|
lineCap = _attribute$lineCap === void 0 ? defaultParams.lineCap : _attribute$lineCap,
|
|
30067
30070
|
_attribute$miterLimit = attribute.miterLimit,
|
|
30068
30071
|
miterLimit = _attribute$miterLimit === void 0 ? defaultParams.miterLimit : _attribute$miterLimit;
|
|
30069
|
-
_context.globalAlpha = strokeOpacity * opacity, _context.lineWidth = getScaledStroke(this, lineWidth, this.dpr), _context.strokeStyle = createColor(this, stroke, params, offsetX, offsetY), _context.lineJoin = lineJoin, _context.setLineDash(lineDash), _context.lineCap = lineCap, _context.miterLimit = miterLimit;
|
|
30072
|
+
_context.globalAlpha = strokeOpacity * opacity, _context.lineWidth = getScaledStroke(this, lineWidth, this.dpr), _context.strokeStyle = createColor(this, stroke, params, offsetX, offsetY), _context.lineJoin = lineJoin, lineDash && _context.setLineDash(lineDash), _context.lineCap = lineCap, _context.miterLimit = miterLimit;
|
|
30070
30073
|
}
|
|
30071
30074
|
}
|
|
30072
30075
|
}, {
|
|
@@ -31525,7 +31528,7 @@
|
|
|
31525
31528
|
if (this.nativeContext.setLineDash) {
|
|
31526
31529
|
var lineDash = a[0];
|
|
31527
31530
|
if (0 === lineDash[0] && 0 === lineDash[1]) return;
|
|
31528
|
-
_context.setLineDash(lineDash);
|
|
31531
|
+
lineDash && _context.setLineDash(lineDash);
|
|
31529
31532
|
}
|
|
31530
31533
|
}
|
|
31531
31534
|
}, {
|
|
@@ -31550,7 +31553,7 @@
|
|
|
31550
31553
|
lineCap = _attribute$lineCap === void 0 ? defaultParams.lineCap : _attribute$lineCap,
|
|
31551
31554
|
_attribute$miterLimit = attribute.miterLimit,
|
|
31552
31555
|
miterLimit = _attribute$miterLimit === void 0 ? defaultParams.miterLimit : _attribute$miterLimit;
|
|
31553
|
-
_context.globalAlpha = strokeOpacity * opacity, _context.lineWidth = getScaledStroke(this, lineWidth, this.dpr), _context.strokeStyle = createColor(this, stroke, params, offsetX, offsetY), _context.lineJoin = lineJoin, 0 === lineDash[0] && 0 === lineDash[1] || _context.setLineDash(lineDash), _context.lineCap = lineCap, _context.miterLimit = miterLimit;
|
|
31556
|
+
_context.globalAlpha = strokeOpacity * opacity, _context.lineWidth = getScaledStroke(this, lineWidth, this.dpr), _context.strokeStyle = createColor(this, stroke, params, offsetX, offsetY), _context.lineJoin = lineJoin, 0 === lineDash[0] && 0 === lineDash[1] || lineDash && _context.setLineDash(lineDash), _context.lineCap = lineCap, _context.miterLimit = miterLimit;
|
|
31554
31557
|
}
|
|
31555
31558
|
}
|
|
31556
31559
|
}, {
|
|
@@ -32432,7 +32435,7 @@
|
|
|
32432
32435
|
lineCap = _attribute$lineCap === void 0 ? defaultParams.lineCap : _attribute$lineCap,
|
|
32433
32436
|
_attribute$miterLimit = attribute.miterLimit,
|
|
32434
32437
|
miterLimit = _attribute$miterLimit === void 0 ? defaultParams.miterLimit : _attribute$miterLimit;
|
|
32435
|
-
_context.setGlobalAlpha(strokeOpacity * opacity), _context.setLineWidth(getScaledStroke(this, lineWidth, this.dpr)), _context.setStrokeStyle(createColor(this, stroke, params, offsetX, offsetY)), _context.setLineJoin(lineJoin), _context.setLineDash(lineDash), _context.setLineCap(lineCap), _context.setMiterLimit(miterLimit);
|
|
32438
|
+
_context.setGlobalAlpha(strokeOpacity * opacity), _context.setLineWidth(getScaledStroke(this, lineWidth, this.dpr)), _context.setStrokeStyle(createColor(this, stroke, params, offsetX, offsetY)), _context.setLineJoin(lineJoin), lineDash && _context.setLineDash(lineDash), _context.setLineCap(lineCap), _context.setMiterLimit(miterLimit);
|
|
32436
32439
|
}
|
|
32437
32440
|
}
|
|
32438
32441
|
}, {
|
|
@@ -34952,7 +34955,7 @@
|
|
|
34952
34955
|
|
|
34953
34956
|
var roughModule = _roughModule;
|
|
34954
34957
|
|
|
34955
|
-
const version = "0.18.
|
|
34958
|
+
const version = "0.18.17";
|
|
34956
34959
|
preLoadAllModule();
|
|
34957
34960
|
if (isBrowserEnv()) {
|
|
34958
34961
|
loadBrowserEnv(container);
|