@visactor/vrender 0.19.24-alpha.1 → 0.19.24-alpha.3
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 +23 -11
- package/dist/index.js +23 -11
- 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.19.24-alpha.
|
|
24
|
+
exports.version = "0.19.24-alpha.3", (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.3\";\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
|
@@ -15415,7 +15415,7 @@ class DefaultGroupBackgroundRenderContribution extends DefaultBaseBackgroundRend
|
|
|
15415
15415
|
const defaultGroupBackgroundRenderContribution = new DefaultGroupBackgroundRenderContribution();
|
|
15416
15416
|
|
|
15417
15417
|
const halfPi = pi / 2;
|
|
15418
|
-
function createRectPath(path, x, y, width, height, rectCornerRadius) {
|
|
15418
|
+
function createRectPath(path, x, y, width, height, rectCornerRadius, edgeCb) {
|
|
15419
15419
|
let cornerRadius;
|
|
15420
15420
|
if (width < 0 && (x += width, width = -width), height < 0 && (y += height, height = -height), isNumber$1(rectCornerRadius, !0)) cornerRadius = [rectCornerRadius = abs(rectCornerRadius), rectCornerRadius, rectCornerRadius, rectCornerRadius];else if (Array.isArray(rectCornerRadius)) {
|
|
15421
15421
|
const cornerRadiusArr = rectCornerRadius;
|
|
@@ -15447,27 +15447,27 @@ function createRectPath(path, x, y, width, height, rectCornerRadius) {
|
|
|
15447
15447
|
rightBottomPoint2 = [rightBottom[0], rightBottom[1] - _cornerRadius[2]],
|
|
15448
15448
|
leftBottomPoint1 = [leftBottom[0] + _cornerRadius[3], leftBottom[1]],
|
|
15449
15449
|
leftBottomPoint2 = [leftBottom[0], leftBottom[1] - _cornerRadius[3]];
|
|
15450
|
-
if (path.moveTo(leftTopPoint1[0], leftTopPoint1[1]), path.lineTo(rightTopPoint1[0], rightTopPoint1[1]), !arrayEqual(rightTopPoint1, rightTopPoint2)) {
|
|
15450
|
+
if (path.moveTo(leftTopPoint1[0], leftTopPoint1[1]), edgeCb && edgeCb[0] ? edgeCb[0](leftTopPoint1[0], leftTopPoint1[1], rightTopPoint1[0], rightTopPoint1[1]) : path.lineTo(rightTopPoint1[0], rightTopPoint1[1]), !arrayEqual(rightTopPoint1, rightTopPoint2)) {
|
|
15451
15451
|
const centerX = rightTopPoint1[0],
|
|
15452
15452
|
centerY = rightTopPoint1[1] + _cornerRadius[1];
|
|
15453
15453
|
path.arc(centerX, centerY, _cornerRadius[1], -halfPi, 0, !1);
|
|
15454
15454
|
}
|
|
15455
|
-
if (path.lineTo(rightBottomPoint2[0], rightBottomPoint2[1]), !arrayEqual(rightBottomPoint1, rightBottomPoint2)) {
|
|
15455
|
+
if (edgeCb && edgeCb[1] ? edgeCb[1](rightTopPoint1[0], rightTopPoint1[1], rightBottomPoint2[0], rightBottomPoint2[1]) : path.lineTo(rightBottomPoint2[0], rightBottomPoint2[1]), !arrayEqual(rightBottomPoint1, rightBottomPoint2)) {
|
|
15456
15456
|
const centerX = rightBottomPoint2[0] - _cornerRadius[2],
|
|
15457
15457
|
centerY = rightBottomPoint2[1];
|
|
15458
15458
|
path.arc(centerX, centerY, _cornerRadius[2], 0, halfPi, !1);
|
|
15459
15459
|
}
|
|
15460
|
-
if (path.lineTo(leftBottomPoint1[0], leftBottomPoint1[1]), !arrayEqual(leftBottomPoint1, leftBottomPoint2)) {
|
|
15460
|
+
if (edgeCb && edgeCb[2] ? edgeCb[2](rightBottomPoint2[0], rightBottomPoint2[1], leftBottomPoint1[0], leftBottomPoint1[1]) : path.lineTo(leftBottomPoint1[0], leftBottomPoint1[1]), !arrayEqual(leftBottomPoint1, leftBottomPoint2)) {
|
|
15461
15461
|
const centerX = leftBottomPoint1[0],
|
|
15462
15462
|
centerY = leftBottomPoint1[1] - _cornerRadius[3];
|
|
15463
15463
|
path.arc(centerX, centerY, _cornerRadius[3], halfPi, pi, !1);
|
|
15464
15464
|
}
|
|
15465
|
-
if (path.lineTo(leftTopPoint2[0], leftTopPoint2[1]), !arrayEqual(leftTopPoint1, leftTopPoint2)) {
|
|
15465
|
+
if (edgeCb && edgeCb[3] ? edgeCb[3](leftBottomPoint1[0], leftBottomPoint1[1], leftTopPoint2[0], leftTopPoint2[1]) : path.lineTo(leftTopPoint2[0], leftTopPoint2[1]), !arrayEqual(leftTopPoint1, leftTopPoint2)) {
|
|
15466
15466
|
const centerX = leftTopPoint1[0],
|
|
15467
15467
|
centerY = leftTopPoint1[1] + _cornerRadius[0];
|
|
15468
15468
|
path.arc(centerX, centerY, _cornerRadius[0], pi, pi + halfPi, !1);
|
|
15469
15469
|
}
|
|
15470
|
-
return path.closePath(), path;
|
|
15470
|
+
return !edgeCb && path.closePath(), path;
|
|
15471
15471
|
}
|
|
15472
15472
|
|
|
15473
15473
|
var __decorate$1D = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
@@ -15556,14 +15556,24 @@ let SplitRectAfterRenderContribution = class {
|
|
|
15556
15556
|
y1: y1,
|
|
15557
15557
|
x: originX = groupAttribute.x,
|
|
15558
15558
|
y: originY = groupAttribute.y,
|
|
15559
|
-
stroke = groupAttribute.stroke
|
|
15559
|
+
stroke = groupAttribute.stroke,
|
|
15560
|
+
cornerRadius = groupAttribute.cornerRadius
|
|
15560
15561
|
} = rect.attribute;
|
|
15561
15562
|
let {
|
|
15562
15563
|
width: width,
|
|
15563
15564
|
height: height
|
|
15564
15565
|
} = rect.attribute;
|
|
15565
15566
|
if (width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0, Array.isArray(stroke) && stroke.some(s => !1 === s)) {
|
|
15566
|
-
if (context.setStrokeStyle(rect, rect.attribute, x, y, groupAttribute),
|
|
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
|
+
}
|
|
15576
|
+
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]) {
|
|
15567
15577
|
const adjustY = stroke[0] ? y - context.lineWidth / 2 : y;
|
|
15568
15578
|
context.lineTo(x, adjustY);
|
|
15569
15579
|
} else context.moveTo(x, y);
|
|
@@ -17301,7 +17311,9 @@ let DefaultCanvasGroupRender = class {
|
|
|
17301
17311
|
clip: clip,
|
|
17302
17312
|
baseOpacity = 1
|
|
17303
17313
|
} = group.attribute;
|
|
17304
|
-
clip ? context.save() : context.highPerformanceSave()
|
|
17314
|
+
clip ? context.save() : context.highPerformanceSave();
|
|
17315
|
+
const baseGlobalAlpha = context.baseGlobalAlpha;
|
|
17316
|
+
context.baseGlobalAlpha *= baseOpacity;
|
|
17305
17317
|
const groupAttribute = getTheme(group, null == params ? void 0 : params.theme).group,
|
|
17306
17318
|
lastModelMatrix = context.modelMatrix;
|
|
17307
17319
|
if (context.camera) {
|
|
@@ -17315,7 +17327,7 @@ let DefaultCanvasGroupRender = class {
|
|
|
17315
17327
|
scrollY = groupAttribute.scrollY
|
|
17316
17328
|
} = group.attribute;
|
|
17317
17329
|
let p;
|
|
17318
|
-
(scrollX || scrollY) && context.translate(scrollX, scrollY), params && params.drawingCb && (p = params.drawingCb()), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, context.baseGlobalAlpha
|
|
17330
|
+
(scrollX || scrollY) && context.translate(scrollX, scrollY), params && params.drawingCb && (p = params.drawingCb()), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, context.baseGlobalAlpha = baseGlobalAlpha, p && p.then ? p.then(() => {
|
|
17319
17331
|
clip ? context.restore() : context.highPerformanceRestore();
|
|
17320
17332
|
}) : clip ? context.restore() : context.highPerformanceRestore();
|
|
17321
17333
|
}
|
|
@@ -29310,7 +29322,7 @@ const registerWrapText = _registerWrapText;
|
|
|
29310
29322
|
|
|
29311
29323
|
const roughModule = _roughModule;
|
|
29312
29324
|
|
|
29313
|
-
const version = "0.19.24-alpha.
|
|
29325
|
+
const version = "0.19.24-alpha.3";
|
|
29314
29326
|
preLoadAllModule();
|
|
29315
29327
|
if (isBrowserEnv()) {
|
|
29316
29328
|
loadBrowserEnv(container);
|
package/dist/index.js
CHANGED
|
@@ -15421,7 +15421,7 @@
|
|
|
15421
15421
|
const defaultGroupBackgroundRenderContribution = new DefaultGroupBackgroundRenderContribution();
|
|
15422
15422
|
|
|
15423
15423
|
const halfPi = pi / 2;
|
|
15424
|
-
function createRectPath(path, x, y, width, height, rectCornerRadius) {
|
|
15424
|
+
function createRectPath(path, x, y, width, height, rectCornerRadius, edgeCb) {
|
|
15425
15425
|
let cornerRadius;
|
|
15426
15426
|
if (width < 0 && (x += width, width = -width), height < 0 && (y += height, height = -height), isNumber$1(rectCornerRadius, !0)) cornerRadius = [rectCornerRadius = abs(rectCornerRadius), rectCornerRadius, rectCornerRadius, rectCornerRadius];else if (Array.isArray(rectCornerRadius)) {
|
|
15427
15427
|
const cornerRadiusArr = rectCornerRadius;
|
|
@@ -15453,27 +15453,27 @@
|
|
|
15453
15453
|
rightBottomPoint2 = [rightBottom[0], rightBottom[1] - _cornerRadius[2]],
|
|
15454
15454
|
leftBottomPoint1 = [leftBottom[0] + _cornerRadius[3], leftBottom[1]],
|
|
15455
15455
|
leftBottomPoint2 = [leftBottom[0], leftBottom[1] - _cornerRadius[3]];
|
|
15456
|
-
if (path.moveTo(leftTopPoint1[0], leftTopPoint1[1]), path.lineTo(rightTopPoint1[0], rightTopPoint1[1]), !arrayEqual(rightTopPoint1, rightTopPoint2)) {
|
|
15456
|
+
if (path.moveTo(leftTopPoint1[0], leftTopPoint1[1]), edgeCb && edgeCb[0] ? edgeCb[0](leftTopPoint1[0], leftTopPoint1[1], rightTopPoint1[0], rightTopPoint1[1]) : path.lineTo(rightTopPoint1[0], rightTopPoint1[1]), !arrayEqual(rightTopPoint1, rightTopPoint2)) {
|
|
15457
15457
|
const centerX = rightTopPoint1[0],
|
|
15458
15458
|
centerY = rightTopPoint1[1] + _cornerRadius[1];
|
|
15459
15459
|
path.arc(centerX, centerY, _cornerRadius[1], -halfPi, 0, !1);
|
|
15460
15460
|
}
|
|
15461
|
-
if (path.lineTo(rightBottomPoint2[0], rightBottomPoint2[1]), !arrayEqual(rightBottomPoint1, rightBottomPoint2)) {
|
|
15461
|
+
if (edgeCb && edgeCb[1] ? edgeCb[1](rightTopPoint1[0], rightTopPoint1[1], rightBottomPoint2[0], rightBottomPoint2[1]) : path.lineTo(rightBottomPoint2[0], rightBottomPoint2[1]), !arrayEqual(rightBottomPoint1, rightBottomPoint2)) {
|
|
15462
15462
|
const centerX = rightBottomPoint2[0] - _cornerRadius[2],
|
|
15463
15463
|
centerY = rightBottomPoint2[1];
|
|
15464
15464
|
path.arc(centerX, centerY, _cornerRadius[2], 0, halfPi, !1);
|
|
15465
15465
|
}
|
|
15466
|
-
if (path.lineTo(leftBottomPoint1[0], leftBottomPoint1[1]), !arrayEqual(leftBottomPoint1, leftBottomPoint2)) {
|
|
15466
|
+
if (edgeCb && edgeCb[2] ? edgeCb[2](rightBottomPoint2[0], rightBottomPoint2[1], leftBottomPoint1[0], leftBottomPoint1[1]) : path.lineTo(leftBottomPoint1[0], leftBottomPoint1[1]), !arrayEqual(leftBottomPoint1, leftBottomPoint2)) {
|
|
15467
15467
|
const centerX = leftBottomPoint1[0],
|
|
15468
15468
|
centerY = leftBottomPoint1[1] - _cornerRadius[3];
|
|
15469
15469
|
path.arc(centerX, centerY, _cornerRadius[3], halfPi, pi, !1);
|
|
15470
15470
|
}
|
|
15471
|
-
if (path.lineTo(leftTopPoint2[0], leftTopPoint2[1]), !arrayEqual(leftTopPoint1, leftTopPoint2)) {
|
|
15471
|
+
if (edgeCb && edgeCb[3] ? edgeCb[3](leftBottomPoint1[0], leftBottomPoint1[1], leftTopPoint2[0], leftTopPoint2[1]) : path.lineTo(leftTopPoint2[0], leftTopPoint2[1]), !arrayEqual(leftTopPoint1, leftTopPoint2)) {
|
|
15472
15472
|
const centerX = leftTopPoint1[0],
|
|
15473
15473
|
centerY = leftTopPoint1[1] + _cornerRadius[0];
|
|
15474
15474
|
path.arc(centerX, centerY, _cornerRadius[0], pi, pi + halfPi, !1);
|
|
15475
15475
|
}
|
|
15476
|
-
return path.closePath(), path;
|
|
15476
|
+
return !edgeCb && path.closePath(), path;
|
|
15477
15477
|
}
|
|
15478
15478
|
|
|
15479
15479
|
var __decorate$1D = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
@@ -15562,14 +15562,24 @@
|
|
|
15562
15562
|
y1: y1,
|
|
15563
15563
|
x: originX = groupAttribute.x,
|
|
15564
15564
|
y: originY = groupAttribute.y,
|
|
15565
|
-
stroke = groupAttribute.stroke
|
|
15565
|
+
stroke = groupAttribute.stroke,
|
|
15566
|
+
cornerRadius = groupAttribute.cornerRadius
|
|
15566
15567
|
} = rect.attribute;
|
|
15567
15568
|
let {
|
|
15568
15569
|
width: width,
|
|
15569
15570
|
height: height
|
|
15570
15571
|
} = rect.attribute;
|
|
15571
15572
|
if (width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0, Array.isArray(stroke) && stroke.some(s => !1 === s)) {
|
|
15572
|
-
if (context.setStrokeStyle(rect, rect.attribute, x, y, groupAttribute),
|
|
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
|
+
}
|
|
15582
|
+
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]) {
|
|
15573
15583
|
const adjustY = stroke[0] ? y - context.lineWidth / 2 : y;
|
|
15574
15584
|
context.lineTo(x, adjustY);
|
|
15575
15585
|
} else context.moveTo(x, y);
|
|
@@ -17307,7 +17317,9 @@
|
|
|
17307
17317
|
clip: clip,
|
|
17308
17318
|
baseOpacity = 1
|
|
17309
17319
|
} = group.attribute;
|
|
17310
|
-
clip ? context.save() : context.highPerformanceSave()
|
|
17320
|
+
clip ? context.save() : context.highPerformanceSave();
|
|
17321
|
+
const baseGlobalAlpha = context.baseGlobalAlpha;
|
|
17322
|
+
context.baseGlobalAlpha *= baseOpacity;
|
|
17311
17323
|
const groupAttribute = getTheme(group, null == params ? void 0 : params.theme).group,
|
|
17312
17324
|
lastModelMatrix = context.modelMatrix;
|
|
17313
17325
|
if (context.camera) {
|
|
@@ -17321,7 +17333,7 @@
|
|
|
17321
17333
|
scrollY = groupAttribute.scrollY
|
|
17322
17334
|
} = group.attribute;
|
|
17323
17335
|
let p;
|
|
17324
|
-
(scrollX || scrollY) && context.translate(scrollX, scrollY), params && params.drawingCb && (p = params.drawingCb()), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, context.baseGlobalAlpha
|
|
17336
|
+
(scrollX || scrollY) && context.translate(scrollX, scrollY), params && params.drawingCb && (p = params.drawingCb()), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, context.baseGlobalAlpha = baseGlobalAlpha, p && p.then ? p.then(() => {
|
|
17325
17337
|
clip ? context.restore() : context.highPerformanceRestore();
|
|
17326
17338
|
}) : clip ? context.restore() : context.highPerformanceRestore();
|
|
17327
17339
|
}
|
|
@@ -29316,7 +29328,7 @@
|
|
|
29316
29328
|
|
|
29317
29329
|
const roughModule = _roughModule;
|
|
29318
29330
|
|
|
29319
|
-
const version = "0.19.24-alpha.
|
|
29331
|
+
const version = "0.19.24-alpha.3";
|
|
29320
29332
|
preLoadAllModule();
|
|
29321
29333
|
if (isBrowserEnv()) {
|
|
29322
29334
|
loadBrowserEnv(container);
|