@visactor/vrender 0.17.25-alpha.3 → 0.17.26-alpha.1
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 +97 -30
- 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.17.
|
|
24
|
+
exports.version = "0.17.26-alpha.1", (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.17.
|
|
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.17.26-alpha.1\";\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
|
@@ -5157,6 +5157,8 @@
|
|
|
5157
5157
|
heightLimit: 1 / 0,
|
|
5158
5158
|
lineClamp: 1 / 0,
|
|
5159
5159
|
suffixPosition: "end",
|
|
5160
|
+
underlineDash: [],
|
|
5161
|
+
underlineOffset: 0,
|
|
5160
5162
|
disableAutoClipedPoptip: void 0
|
|
5161
5163
|
};
|
|
5162
5164
|
var DefaultPickStyle = {
|
|
@@ -11378,9 +11380,7 @@
|
|
|
11378
11380
|
var data = ResourceLoader.cache.get(svgStr);
|
|
11379
11381
|
data ? "fail" === data.loadState ? application.global.getRequestAnimationFrame()(function () {
|
|
11380
11382
|
mark.imageLoadFail(svgStr);
|
|
11381
|
-
}) : "init" === data.loadState || "loading" === data.loadState ? null === (_a = data.waitingMark) || void 0 === _a || _a.push(mark) : mark &&
|
|
11382
|
-
mark.imageLoadSuccess(svgStr, data.data);
|
|
11383
|
-
}) : (data = {
|
|
11383
|
+
}) : "init" === data.loadState || "loading" === data.loadState ? null === (_a = data.waitingMark) || void 0 === _a || _a.push(mark) : mark && mark.imageLoadSuccess(svgStr, data.data) : (data = {
|
|
11384
11384
|
type: "image",
|
|
11385
11385
|
loadState: "init"
|
|
11386
11386
|
}, ResourceLoader.cache.set(svgStr, data), data.dataPromise = application.global.loadSvg(svgStr), data.dataPromise ? (data.waitingMark = [mark], data.dataPromise.then(function (res) {
|
|
@@ -11486,6 +11486,7 @@
|
|
|
11486
11486
|
zIndex: 1,
|
|
11487
11487
|
layout: 1,
|
|
11488
11488
|
keepDirIn3d: 1,
|
|
11489
|
+
globalZIndex: 1,
|
|
11489
11490
|
outerBorder: 1,
|
|
11490
11491
|
innerBorder: 1,
|
|
11491
11492
|
lineDash: 1,
|
|
@@ -11830,7 +11831,7 @@
|
|
|
11830
11831
|
value: function animate(params) {
|
|
11831
11832
|
var _this2 = this;
|
|
11832
11833
|
this.animates || (this.animates = new Map());
|
|
11833
|
-
var animate = new Animate(null == params ? void 0 : params.id).bind(this);
|
|
11834
|
+
var animate = new Animate(null == params ? void 0 : params.id, this.stage && this.stage.getTimeline()).bind(this);
|
|
11834
11835
|
if (params) {
|
|
11835
11836
|
var onStart = params.onStart,
|
|
11836
11837
|
onFrame = params.onFrame,
|
|
@@ -14039,17 +14040,25 @@
|
|
|
14039
14040
|
key: "updateSingallineAABBBounds",
|
|
14040
14041
|
value: function updateSingallineAABBBounds(text) {
|
|
14041
14042
|
var textTheme = getTheme(this).text,
|
|
14042
|
-
_this$
|
|
14043
|
-
|
|
14044
|
-
|
|
14043
|
+
_this$attribute2 = this.attribute,
|
|
14044
|
+
_this$attribute2$dire = _this$attribute2.direction,
|
|
14045
|
+
direction = _this$attribute2$dire === void 0 ? textTheme.direction : _this$attribute2$dire,
|
|
14046
|
+
_this$attribute2$unde = _this$attribute2.underlineOffset,
|
|
14047
|
+
underlineOffset = _this$attribute2$unde === void 0 ? textTheme.underlineOffset : _this$attribute2$unde,
|
|
14048
|
+
b = "horizontal" === direction ? this.updateHorizontalSinglelineAABBBounds(text) : this.updateVerticalSinglelineAABBBounds(text);
|
|
14049
|
+
return "horizontal" === direction && underlineOffset && this._AABBBounds.add(this._AABBBounds.x1, this._AABBBounds.y2 + underlineOffset), b;
|
|
14045
14050
|
}
|
|
14046
14051
|
}, {
|
|
14047
14052
|
key: "updateMultilineAABBBounds",
|
|
14048
14053
|
value: function updateMultilineAABBBounds(text) {
|
|
14049
14054
|
var textTheme = getTheme(this).text,
|
|
14050
|
-
_this$
|
|
14051
|
-
|
|
14052
|
-
|
|
14055
|
+
_this$attribute3 = this.attribute,
|
|
14056
|
+
_this$attribute3$dire = _this$attribute3.direction,
|
|
14057
|
+
direction = _this$attribute3$dire === void 0 ? textTheme.direction : _this$attribute3$dire,
|
|
14058
|
+
_this$attribute3$unde = _this$attribute3.underlineOffset,
|
|
14059
|
+
underlineOffset = _this$attribute3$unde === void 0 ? textTheme.underlineOffset : _this$attribute3$unde,
|
|
14060
|
+
b = "horizontal" === direction ? this.updateHorizontalMultilineAABBBounds(text) : this.updateVerticalMultilineAABBBounds(text);
|
|
14061
|
+
return "horizontal" === direction && underlineOffset && this._AABBBounds.add(this._AABBBounds.x1, this._AABBBounds.y2 + underlineOffset), b;
|
|
14053
14062
|
}
|
|
14054
14063
|
}, {
|
|
14055
14064
|
key: "updateHorizontalSinglelineAABBBounds",
|
|
@@ -14766,7 +14775,7 @@
|
|
|
14766
14775
|
function StarSymbol() {
|
|
14767
14776
|
var _this;
|
|
14768
14777
|
_classCallCheck(this, StarSymbol);
|
|
14769
|
-
_this = _super.apply(this, arguments), _this.type = "star", _this.pathStr = "
|
|
14778
|
+
_this = _super.apply(this, arguments), _this.type = "star", _this.pathStr = "M0 -1L0.22451398828979266 -0.3090169943749474L0.9510565162951535 -0.30901699437494745L0.3632712640026804 0.1180339887498948L0.5877852522924732 0.8090169943749473L8.326672684688674e-17 0.3819660112501051L-0.587785252292473 0.8090169943749476L-0.3632712640026804 0.11803398874989487L-0.9510565162951536 -0.30901699437494723L-0.22451398828979274 -0.30901699437494734Z";
|
|
14770
14779
|
return _this;
|
|
14771
14780
|
}
|
|
14772
14781
|
_createClass(StarSymbol, [{
|
|
@@ -14889,7 +14898,7 @@
|
|
|
14889
14898
|
function WyeSymbol() {
|
|
14890
14899
|
var _this;
|
|
14891
14900
|
_classCallCheck(this, WyeSymbol);
|
|
14892
|
-
_this = _super.apply(this, arguments), _this.type = "wye", _this.pathStr = "
|
|
14901
|
+
_this = _super.apply(this, arguments), _this.type = "wye", _this.pathStr = "M0.25 0.14433756729740646L0.25 0.6443375672974064L-0.25 0.6443375672974064L-0.25 0.14433756729740643L-0.6830127018922193 -0.10566243270259357L-0.4330127018922193 -0.5386751345948129L0 -0.28867513459481287L0.4330127018922193 -0.5386751345948129L0.6830127018922193 -0.10566243270259357Z";
|
|
14893
14902
|
return _this;
|
|
14894
14903
|
}
|
|
14895
14904
|
_createClass(WyeSymbol, [{
|
|
@@ -18572,12 +18581,12 @@
|
|
|
18572
18581
|
_createClass(GradientParser, null, [{
|
|
18573
18582
|
key: "IsGradient",
|
|
18574
18583
|
value: function IsGradient(c) {
|
|
18575
|
-
return !("string" == typeof c && c.
|
|
18584
|
+
return !("string" == typeof c && !c.includes("gradient"));
|
|
18576
18585
|
}
|
|
18577
18586
|
}, {
|
|
18578
18587
|
key: "IsGradientStr",
|
|
18579
18588
|
value: function IsGradientStr(c) {
|
|
18580
|
-
return "string" == typeof c && c.
|
|
18589
|
+
return "string" == typeof c && c.includes("gradient");
|
|
18581
18590
|
}
|
|
18582
18591
|
}, {
|
|
18583
18592
|
key: "Parse",
|
|
@@ -20798,7 +20807,15 @@
|
|
|
20798
20807
|
_h2 = b.height();
|
|
20799
20808
|
b.set((null !== (_h = background.x) && void 0 !== _h ? _h : 0) + (null !== (_j = background.dx) && void 0 !== _j ? _j : 0), (null !== (_k = background.y) && void 0 !== _k ? _k : 0) + (null !== (_l = background.dy) && void 0 !== _l ? _l : 0), _w, _h2);
|
|
20800
20809
|
}
|
|
20801
|
-
} else b = graphic.AABBBounds, onlyTranslate || b.
|
|
20810
|
+
} else b = graphic.AABBBounds, onlyTranslate || (b = getTextBounds(Object.assign(Object.assign({}, graphic.attribute), {
|
|
20811
|
+
angle: 0,
|
|
20812
|
+
scaleX: 1,
|
|
20813
|
+
scaleY: 1,
|
|
20814
|
+
x: 0,
|
|
20815
|
+
y: 0,
|
|
20816
|
+
dx: 0,
|
|
20817
|
+
dy: 0
|
|
20818
|
+
})).clone());
|
|
20802
20819
|
if (graphic.backgroundImg && graphic.resources) {
|
|
20803
20820
|
var res = graphic.resources.get(background);
|
|
20804
20821
|
if ("success" !== res.state || !res.data) return;
|
|
@@ -20984,6 +21001,10 @@
|
|
|
20984
21001
|
fill = _text$attribute3$fill === void 0 ? textAttribute.fill : _text$attribute3$fill,
|
|
20985
21002
|
_text$attribute3$opac = _text$attribute3.opacity,
|
|
20986
21003
|
opacity = _text$attribute3$opac === void 0 ? textAttribute.opacity : _text$attribute3$opac,
|
|
21004
|
+
_text$attribute3$unde = _text$attribute3.underlineOffset,
|
|
21005
|
+
underlineOffset = _text$attribute3$unde === void 0 ? textAttribute.underlineOffset : _text$attribute3$unde,
|
|
21006
|
+
_text$attribute3$unde2 = _text$attribute3.underlineDash,
|
|
21007
|
+
underlineDash = _text$attribute3$unde2 === void 0 ? textAttribute.underlineDash : _text$attribute3$unde2,
|
|
20987
21008
|
_text$attribute3$fill2 = _text$attribute3.fillOpacity,
|
|
20988
21009
|
fillOpacity = _text$attribute3$fill2 === void 0 ? textAttribute.fillOpacity : _text$attribute3$fill2,
|
|
20989
21010
|
w = text.clipedWidth,
|
|
@@ -20996,8 +21017,8 @@
|
|
|
20996
21017
|
strokeOpacity: fillOpacity
|
|
20997
21018
|
};
|
|
20998
21019
|
if (underline) {
|
|
20999
|
-
attribute.lineWidth = underline, context.setStrokeStyle(text, attribute, x, y, textAttribute), context.beginPath();
|
|
21000
|
-
var dy = y + offsetY + fontSize;
|
|
21020
|
+
attribute.lineWidth = underline, context.setStrokeStyle(text, attribute, x, y, textAttribute), context.setLineDash(underlineDash), context.beginPath();
|
|
21021
|
+
var dy = y + offsetY + fontSize + underlineOffset;
|
|
21001
21022
|
context.moveTo(x + offsetX, dy, z), context.lineTo(x + offsetX + w, dy, z), context.stroke();
|
|
21002
21023
|
}
|
|
21003
21024
|
if (lineThrough) {
|
|
@@ -21019,6 +21040,10 @@
|
|
|
21019
21040
|
fill = _text$attribute4$fill === void 0 ? textAttribute.fill : _text$attribute4$fill,
|
|
21020
21041
|
_text$attribute4$opac = _text$attribute4.opacity,
|
|
21021
21042
|
opacity = _text$attribute4$opac === void 0 ? textAttribute.opacity : _text$attribute4$opac,
|
|
21043
|
+
_text$attribute4$unde = _text$attribute4.underlineOffset,
|
|
21044
|
+
underlineOffset = _text$attribute4$unde === void 0 ? textAttribute.underlineOffset : _text$attribute4$unde,
|
|
21045
|
+
_text$attribute4$unde2 = _text$attribute4.underlineDash,
|
|
21046
|
+
underlineDash = _text$attribute4$unde2 === void 0 ? textAttribute.underlineDash : _text$attribute4$unde2,
|
|
21022
21047
|
_text$attribute4$fill2 = _text$attribute4.fillOpacity,
|
|
21023
21048
|
fillOpacity = _text$attribute4$fill2 === void 0 ? textAttribute.fillOpacity : _text$attribute4$fill2,
|
|
21024
21049
|
offsetX = textDrawOffsetX(textAlign, w),
|
|
@@ -21031,8 +21056,8 @@
|
|
|
21031
21056
|
};
|
|
21032
21057
|
var deltaY = -3;
|
|
21033
21058
|
if (underline) {
|
|
21034
|
-
attribute.lineWidth = underline, context.setStrokeStyle(text, attribute, x, y, textAttribute), context.beginPath();
|
|
21035
|
-
var dy = y + offsetY + fontSize + deltaY;
|
|
21059
|
+
attribute.lineWidth = underline, context.setStrokeStyle(text, attribute, x, y, textAttribute), context.setLineDash(underlineDash), context.beginPath();
|
|
21060
|
+
var dy = y + offsetY + fontSize + deltaY + underlineOffset;
|
|
21036
21061
|
context.moveTo(x + offsetX, dy, z), context.lineTo(x + offsetX + w, dy, z), context.stroke();
|
|
21037
21062
|
}
|
|
21038
21063
|
if (deltaY = -1, lineThrough) {
|
|
@@ -25363,6 +25388,38 @@
|
|
|
25363
25388
|
}();
|
|
25364
25389
|
exports.DefaultGlobalPickerService = __decorate$12([injectable(), __metadata$O("design:paramtypes", [])], exports.DefaultGlobalPickerService);
|
|
25365
25390
|
|
|
25391
|
+
function simplifyRadialDist(points, sqTolerance) {
|
|
25392
|
+
var deltaX,
|
|
25393
|
+
deltaY,
|
|
25394
|
+
lastX = points[0].x,
|
|
25395
|
+
lastY = points[0].y;
|
|
25396
|
+
var newPoints = [points[0]];
|
|
25397
|
+
for (var i = 1, len = points.length; i < len; i++) deltaX = points[i].x - lastX, deltaY = points[i].y - lastY, deltaX * deltaX + deltaY * deltaY > sqTolerance && (lastX = points[i].x, lastY = points[i].y, newPoints.push(points[i]));
|
|
25398
|
+
return points[points.length - 1].x === lastX && points[points.length - 1].y === lastY || newPoints.push(points[points.length - 1]), newPoints;
|
|
25399
|
+
}
|
|
25400
|
+
function simplifyDPStep(points, startIdx, endIdx, sqTolerance, simplified) {
|
|
25401
|
+
var maxSqDist = sqTolerance,
|
|
25402
|
+
nextIdx = startIdx;
|
|
25403
|
+
var startX = points[startIdx].x,
|
|
25404
|
+
startY = points[startIdx].y,
|
|
25405
|
+
vecX2 = points[endIdx].x - startX,
|
|
25406
|
+
vecY2 = points[endIdx].y - startY,
|
|
25407
|
+
sqLength = vecX2 * vecX2 + vecY2 * vecY2;
|
|
25408
|
+
var area, sqArea, sqDistance, vecX1, vecY1;
|
|
25409
|
+
for (var i = startIdx + 1, len = endIdx - 1; i < len; i++) vecX1 = points[i].x - startX, vecY1 = points[i].y - startY, area = vecX1 * vecY2 - vecX2 * vecY1, sqArea = area * area, sqDistance = sqArea / sqLength, sqDistance > maxSqDist && (maxSqDist = sqDistance, nextIdx = i);
|
|
25410
|
+
maxSqDist > sqTolerance && (nextIdx - startIdx > 2 && simplifyDPStep(points, startIdx, nextIdx, sqTolerance, simplified), simplified.push(points[nextIdx], points[nextIdx + 1]), endIdx - nextIdx > 2 && simplifyDPStep(points, nextIdx, endIdx, sqTolerance, simplified));
|
|
25411
|
+
}
|
|
25412
|
+
function simplifyDouglasPeucker(points, sqTolerance) {
|
|
25413
|
+
var lastIdx = points.length - 1,
|
|
25414
|
+
simplified = [points[0]];
|
|
25415
|
+
return simplifyDPStep(points, 0, lastIdx, sqTolerance, simplified), simplified.push(points[lastIdx]), simplified;
|
|
25416
|
+
}
|
|
25417
|
+
function flatten_simplify(points, tolerance, highestQuality) {
|
|
25418
|
+
if (points.length <= 10) return points;
|
|
25419
|
+
var sqTolerance = void 0 !== tolerance ? tolerance * tolerance : 1;
|
|
25420
|
+
return points = simplifyDouglasPeucker(points = highestQuality ? points : simplifyRadialDist(points, sqTolerance), sqTolerance);
|
|
25421
|
+
}
|
|
25422
|
+
|
|
25366
25423
|
var DefaultGraphicAllocate = /*#__PURE__*/function () {
|
|
25367
25424
|
function DefaultGraphicAllocate() {
|
|
25368
25425
|
_classCallCheck(this, DefaultGraphicAllocate);
|
|
@@ -29078,9 +29135,11 @@
|
|
|
29078
29135
|
function jsx(type, config) {
|
|
29079
29136
|
var _a = config || {};
|
|
29080
29137
|
_a.key;
|
|
29138
|
+
_a.name;
|
|
29139
|
+
_a.id;
|
|
29081
29140
|
var attribute = _a.attribute,
|
|
29082
29141
|
stateProxy = _a.stateProxy,
|
|
29083
|
-
props = __rest(_a, ["key", "attribute", "stateProxy"]);
|
|
29142
|
+
props = __rest(_a, ["key", "name", "id", "attribute", "stateProxy"]);
|
|
29084
29143
|
var c = type;
|
|
29085
29144
|
isString$1(type) && (c = graphicCreator[type]);
|
|
29086
29145
|
var childrenList = [];
|
|
@@ -29124,14 +29183,21 @@
|
|
|
29124
29183
|
attribute = _dom$props.attribute,
|
|
29125
29184
|
children = _dom$props.children,
|
|
29126
29185
|
stateProxy = _dom$props.stateProxy,
|
|
29186
|
+
id = _dom$props.id,
|
|
29187
|
+
name = _dom$props.name,
|
|
29127
29188
|
g = type({
|
|
29128
29189
|
attribute: attribute
|
|
29129
29190
|
}),
|
|
29130
29191
|
out = parseToGraphic(g, dom.props, children);
|
|
29131
|
-
return out || (stateProxy && (g.stateProxy = stateProxy), g.id =
|
|
29132
|
-
|
|
29133
|
-
|
|
29134
|
-
|
|
29192
|
+
return out || (stateProxy && (g.stateProxy = stateProxy), g.id = id, g.name = name, parseChildren(children, g), g);
|
|
29193
|
+
}
|
|
29194
|
+
function parseChildren(children, g) {
|
|
29195
|
+
isArray$1(children) ? children.forEach(function (item) {
|
|
29196
|
+
if (isArray$1(item)) parseChildren(item, g);else {
|
|
29197
|
+
var c = decodeReactDom(item);
|
|
29198
|
+
c && c.type && g.add(c);
|
|
29199
|
+
}
|
|
29200
|
+
}) : children && g.add(decodeReactDom(children));
|
|
29135
29201
|
}
|
|
29136
29202
|
function parseToGraphic(g, props, childrenList) {
|
|
29137
29203
|
var out,
|
|
@@ -31716,7 +31782,7 @@
|
|
|
31716
31782
|
}, {
|
|
31717
31783
|
key: "getTitle",
|
|
31718
31784
|
value: function getTitle() {
|
|
31719
|
-
return this.canvas.id.toString();
|
|
31785
|
+
return this.canvas.id && this.canvas.id.toString();
|
|
31720
31786
|
}
|
|
31721
31787
|
}, {
|
|
31722
31788
|
key: "getWH",
|
|
@@ -31880,11 +31946,11 @@
|
|
|
31880
31946
|
try {
|
|
31881
31947
|
ng = !!lynx.createCanvasNG;
|
|
31882
31948
|
} catch (err) {}
|
|
31883
|
-
function makeUpCanvas$2(domref, canvasIdLists, canvasMap, freeCanvasIdx, freeCanvasList, pixelRatio) {
|
|
31949
|
+
function makeUpCanvas$2(domref, canvasIdLists, canvasMap, freeCanvasIdx, freeCanvasList, offscreen, pixelRatio) {
|
|
31884
31950
|
var dpr = null != pixelRatio ? pixelRatio : SystemInfo.pixelRatio;
|
|
31885
31951
|
canvasIdLists.forEach(function (id, i) {
|
|
31886
|
-
var _canvas
|
|
31887
|
-
_canvas.width = domref.width * dpr, _canvas.height = domref.height * dpr
|
|
31952
|
+
var _canvas;
|
|
31953
|
+
offscreen ? _canvas = lynx.createOffscreenCanvas() : (_canvas = ng ? lynx.createCanvasNG(id) : lynx.createCanvas(id), ng && _canvas.attachToCanvasView(id)), _canvas.width = domref.width * dpr, _canvas.height = domref.height * dpr;
|
|
31888
31954
|
var ctx = _canvas.getContext("2d"),
|
|
31889
31955
|
canvas = new CanvasWrapEnableWH(_canvas, ctx, dpr, domref.width, domref.height, id);
|
|
31890
31956
|
canvasMap.set(id, canvas), i >= freeCanvasIdx && freeCanvasList.push(canvas);
|
|
@@ -31920,7 +31986,7 @@
|
|
|
31920
31986
|
_createClass(LynxEnvContribution, [{
|
|
31921
31987
|
key: "configure",
|
|
31922
31988
|
value: function configure(service, params) {
|
|
31923
|
-
service.env === this.type && (service.setActiveEnvContribution(this), makeUpCanvas$2(params.domref, params.canvasIdLists, this.canvasMap, params.freeCanvasIdx, this.freeCanvasList, params.pixelRatio));
|
|
31989
|
+
service.env === this.type && (service.setActiveEnvContribution(this), makeUpCanvas$2(params.domref, params.canvasIdLists, this.canvasMap, params.freeCanvasIdx, this.freeCanvasList, !!params.offscreen, params.pixelRatio));
|
|
31924
31990
|
}
|
|
31925
31991
|
}, {
|
|
31926
31992
|
key: "getDynamicCanvasCount",
|
|
@@ -35054,7 +35120,7 @@
|
|
|
35054
35120
|
|
|
35055
35121
|
var roughModule = _roughModule;
|
|
35056
35122
|
|
|
35057
|
-
const version = "0.17.
|
|
35123
|
+
const version = "0.17.26-alpha.1";
|
|
35058
35124
|
preLoadAllModule();
|
|
35059
35125
|
if (isBrowserEnv()) {
|
|
35060
35126
|
loadBrowserEnv(container);
|
|
@@ -35429,6 +35495,7 @@
|
|
|
35429
35495
|
exports.fillVisible = fillVisible;
|
|
35430
35496
|
exports.findBestMorphingRotation = findBestMorphingRotation;
|
|
35431
35497
|
exports.findNextGraphic = findNextGraphic;
|
|
35498
|
+
exports.flatten_simplify = flatten_simplify;
|
|
35432
35499
|
exports.foreach = foreach;
|
|
35433
35500
|
exports.foreachAsync = foreachAsync;
|
|
35434
35501
|
exports.genBasisSegments = genBasisSegments;
|