@visactor/vrender 0.19.24-alpha.3 → 0.19.24-alpha.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.es.js +12 -13
- package/dist/index.js +12 -13
- 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 +4 -4
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.19.24-alpha.
|
|
24
|
+
exports.version = "0.19.24-alpha.5", (0, vrender_core_1.preLoadAllModule)(), (0,
|
|
25
25
|
vrender_core_1.isBrowserEnv)() ? (0, vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0,
|
|
26
26
|
vrender_core_1.isNodeEnv)() && (0, vrender_kits_1.loadNodeEnv)(vrender_core_1.container),
|
|
27
27
|
(0, vrender_kits_2.registerArc)(), (0, vrender_kits_2.registerArc3d)(), (0, vrender_kits_2.registerArea)(),
|
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,iBAAiB,CAAC;AAEzC,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.19.24-alpha.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAA8F;AAC9F,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,iBAAiB,CAAC;AAEzC,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.19.24-alpha.5\";\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.es.js
CHANGED
|
@@ -13038,7 +13038,7 @@ class Wrapper {
|
|
|
13038
13038
|
}
|
|
13039
13039
|
}
|
|
13040
13040
|
|
|
13041
|
-
const RICHTEXT_UPDATE_TAG_KEY = ["width", "height", "ellipsis", "wordBreak", "verticalDirection", "maxHeight", "maxWidth", "textAlign", "textBaseline", "textConfig", "layoutDirection", ...GRAPHIC_UPDATE_TAG_KEY];
|
|
13041
|
+
const RICHTEXT_UPDATE_TAG_KEY = ["width", "height", "ellipsis", "wordBreak", "verticalDirection", "maxHeight", "maxWidth", "textAlign", "textBaseline", "textConfig", "layoutDirection", "fill", "stroke", "fontSize", ...GRAPHIC_UPDATE_TAG_KEY];
|
|
13042
13042
|
class RichText extends Graphic {
|
|
13043
13043
|
constructor(params) {
|
|
13044
13044
|
super(params), this.type = "richtext", this._currentHoverIcon = null, this.numberType = RICHTEXT_NUMBER_TYPE;
|
|
@@ -15467,7 +15467,7 @@ function createRectPath(path, x, y, width, height, rectCornerRadius, edgeCb) {
|
|
|
15467
15467
|
centerY = leftTopPoint1[1] + _cornerRadius[0];
|
|
15468
15468
|
path.arc(centerX, centerY, _cornerRadius[0], pi, pi + halfPi, !1);
|
|
15469
15469
|
}
|
|
15470
|
-
return
|
|
15470
|
+
return path.closePath(), path;
|
|
15471
15471
|
}
|
|
15472
15472
|
|
|
15473
15473
|
var __decorate$1D = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
@@ -15563,21 +15563,20 @@ let SplitRectAfterRenderContribution = class {
|
|
|
15563
15563
|
width: width,
|
|
15564
15564
|
height: height
|
|
15565
15565
|
} = rect.attribute;
|
|
15566
|
-
if (width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0, Array.isArray(stroke) && stroke.some(s => !1 === s)) {
|
|
15567
|
-
if (context.setStrokeStyle(rect, rect.attribute, x, y, groupAttribute), !(0 === cornerRadius || isArray$1(cornerRadius) && cornerRadius.every(num => 0 === num))) {
|
|
15568
|
-
let lastStroke,
|
|
15569
|
-
lastStrokeI = 0;
|
|
15570
|
-
return createRectPath(context, x, y, width, height, cornerRadius, new Array(4).fill(0).map((_, i) => (x1, y1, x2, y2) => {
|
|
15571
|
-
stroke[i] && (lastStrokeI === i - 1 && stroke[i] === lastStroke || (context.setStrokeStyle(rect, Object.assign(Object.assign({}, rect.attribute), {
|
|
15572
|
-
stroke: stroke[i]
|
|
15573
|
-
}), x, y, groupAttribute), context.beginPath(), context.moveTo(x1, y1), lastStroke = stroke[i]), lastStrokeI = i, context.lineTo(x2, y2), context.stroke(), 3 === i && context.beginPath());
|
|
15574
|
-
})), void context.stroke();
|
|
15575
|
-
}
|
|
15566
|
+
if (width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0, Array.isArray(stroke) && stroke.some(s => !1 === s)) if (context.setStrokeStyle(rect, rect.attribute, x, y, groupAttribute), 0 === cornerRadius || isArray$1(cornerRadius) && cornerRadius.every(num => 0 === num)) {
|
|
15576
15567
|
if (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]) {
|
|
15577
15568
|
const adjustY = stroke[0] ? y - context.lineWidth / 2 : y;
|
|
15578
15569
|
context.lineTo(x, adjustY);
|
|
15579
15570
|
} else context.moveTo(x, y);
|
|
15580
15571
|
context.stroke();
|
|
15572
|
+
} else {
|
|
15573
|
+
let lastStroke,
|
|
15574
|
+
lastStrokeI = 0;
|
|
15575
|
+
createRectPath(context, x, y, width, height, cornerRadius, new Array(4).fill(0).map((_, i) => (x1, y1, x2, y2) => {
|
|
15576
|
+
stroke[i] && (lastStrokeI === i - 1 && stroke[i] === lastStroke || (context.setStrokeStyle(rect, Object.assign(Object.assign({}, rect.attribute), {
|
|
15577
|
+
stroke: stroke[i]
|
|
15578
|
+
}), x, y, groupAttribute), context.beginPath(), context.moveTo(x1, y1), lastStroke = stroke[i]), lastStrokeI = i, context.lineTo(x2, y2), context.stroke());
|
|
15579
|
+
}));
|
|
15581
15580
|
}
|
|
15582
15581
|
}
|
|
15583
15582
|
};
|
|
@@ -29322,7 +29321,7 @@ const registerWrapText = _registerWrapText;
|
|
|
29322
29321
|
|
|
29323
29322
|
const roughModule = _roughModule;
|
|
29324
29323
|
|
|
29325
|
-
const version = "0.19.24-alpha.
|
|
29324
|
+
const version = "0.19.24-alpha.5";
|
|
29326
29325
|
preLoadAllModule();
|
|
29327
29326
|
if (isBrowserEnv()) {
|
|
29328
29327
|
loadBrowserEnv(container);
|
package/dist/index.js
CHANGED
|
@@ -13044,7 +13044,7 @@
|
|
|
13044
13044
|
}
|
|
13045
13045
|
}
|
|
13046
13046
|
|
|
13047
|
-
const RICHTEXT_UPDATE_TAG_KEY = ["width", "height", "ellipsis", "wordBreak", "verticalDirection", "maxHeight", "maxWidth", "textAlign", "textBaseline", "textConfig", "layoutDirection", ...GRAPHIC_UPDATE_TAG_KEY];
|
|
13047
|
+
const RICHTEXT_UPDATE_TAG_KEY = ["width", "height", "ellipsis", "wordBreak", "verticalDirection", "maxHeight", "maxWidth", "textAlign", "textBaseline", "textConfig", "layoutDirection", "fill", "stroke", "fontSize", ...GRAPHIC_UPDATE_TAG_KEY];
|
|
13048
13048
|
class RichText extends Graphic {
|
|
13049
13049
|
constructor(params) {
|
|
13050
13050
|
super(params), this.type = "richtext", this._currentHoverIcon = null, this.numberType = RICHTEXT_NUMBER_TYPE;
|
|
@@ -15473,7 +15473,7 @@
|
|
|
15473
15473
|
centerY = leftTopPoint1[1] + _cornerRadius[0];
|
|
15474
15474
|
path.arc(centerX, centerY, _cornerRadius[0], pi, pi + halfPi, !1);
|
|
15475
15475
|
}
|
|
15476
|
-
return
|
|
15476
|
+
return path.closePath(), path;
|
|
15477
15477
|
}
|
|
15478
15478
|
|
|
15479
15479
|
var __decorate$1D = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
@@ -15569,21 +15569,20 @@
|
|
|
15569
15569
|
width: width,
|
|
15570
15570
|
height: height
|
|
15571
15571
|
} = rect.attribute;
|
|
15572
|
-
if (width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0, Array.isArray(stroke) && stroke.some(s => !1 === s)) {
|
|
15573
|
-
if (context.setStrokeStyle(rect, rect.attribute, x, y, groupAttribute), !(0 === cornerRadius || isArray$1(cornerRadius) && cornerRadius.every(num => 0 === num))) {
|
|
15574
|
-
let lastStroke,
|
|
15575
|
-
lastStrokeI = 0;
|
|
15576
|
-
return createRectPath(context, x, y, width, height, cornerRadius, new Array(4).fill(0).map((_, i) => (x1, y1, x2, y2) => {
|
|
15577
|
-
stroke[i] && (lastStrokeI === i - 1 && stroke[i] === lastStroke || (context.setStrokeStyle(rect, Object.assign(Object.assign({}, rect.attribute), {
|
|
15578
|
-
stroke: stroke[i]
|
|
15579
|
-
}), x, y, groupAttribute), context.beginPath(), context.moveTo(x1, y1), lastStroke = stroke[i]), lastStrokeI = i, context.lineTo(x2, y2), context.stroke(), 3 === i && context.beginPath());
|
|
15580
|
-
})), void context.stroke();
|
|
15581
|
-
}
|
|
15572
|
+
if (width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0, Array.isArray(stroke) && stroke.some(s => !1 === s)) if (context.setStrokeStyle(rect, rect.attribute, x, y, groupAttribute), 0 === cornerRadius || isArray$1(cornerRadius) && cornerRadius.every(num => 0 === num)) {
|
|
15582
15573
|
if (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]) {
|
|
15583
15574
|
const adjustY = stroke[0] ? y - context.lineWidth / 2 : y;
|
|
15584
15575
|
context.lineTo(x, adjustY);
|
|
15585
15576
|
} else context.moveTo(x, y);
|
|
15586
15577
|
context.stroke();
|
|
15578
|
+
} else {
|
|
15579
|
+
let lastStroke,
|
|
15580
|
+
lastStrokeI = 0;
|
|
15581
|
+
createRectPath(context, x, y, width, height, cornerRadius, new Array(4).fill(0).map((_, i) => (x1, y1, x2, y2) => {
|
|
15582
|
+
stroke[i] && (lastStrokeI === i - 1 && stroke[i] === lastStroke || (context.setStrokeStyle(rect, Object.assign(Object.assign({}, rect.attribute), {
|
|
15583
|
+
stroke: stroke[i]
|
|
15584
|
+
}), x, y, groupAttribute), context.beginPath(), context.moveTo(x1, y1), lastStroke = stroke[i]), lastStrokeI = i, context.lineTo(x2, y2), context.stroke());
|
|
15585
|
+
}));
|
|
15587
15586
|
}
|
|
15588
15587
|
}
|
|
15589
15588
|
};
|
|
@@ -29328,7 +29327,7 @@
|
|
|
29328
29327
|
|
|
29329
29328
|
const roughModule = _roughModule;
|
|
29330
29329
|
|
|
29331
|
-
const version = "0.19.24-alpha.
|
|
29330
|
+
const version = "0.19.24-alpha.5";
|
|
29332
29331
|
preLoadAllModule();
|
|
29333
29332
|
if (isBrowserEnv()) {
|
|
29334
29333
|
loadBrowserEnv(container);
|