@visactor/vrender 0.16.12 → 0.16.14-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 +154 -15
- 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,5 +21,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
21
21
|
|
|
22
22
|
const vrender_core_1 = require("@visactor/vrender-core"), vrender_kits_1 = require("@visactor/vrender-kits");
|
|
23
23
|
|
|
24
|
-
exports.version = "0.16.
|
|
24
|
+
exports.version = "0.16.14-alpha.1", (0, vrender_kits_1.loadAllModule)(vrender_core_1.container),
|
|
25
25
|
__exportStar(require("@visactor/vrender-core"), exports), __exportStar(require("@visactor/vrender-kits"), exports);
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yDAAmD;AACnD,yDAAuD;AAG1C,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yDAAmD;AACnD,yDAAuD;AAG1C,QAAA,OAAO,GAAG,iBAAiB,CAAC;AAEzC,IAAA,4BAAa,EAAC,wBAAS,CAAC,CAAC;AAEzB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import { container } from '@visactor/vrender-core';\nimport { loadAllModule } from '@visactor/vrender-kits';\n\n// 导出版本号\nexport const version = \"0.16.14-alpha.1\";\n\nloadAllModule(container);\n\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\n"]}
|
package/dist/index.js
CHANGED
|
@@ -6285,7 +6285,10 @@
|
|
|
6285
6285
|
direction: "horizontal",
|
|
6286
6286
|
wordBreak: "break-all",
|
|
6287
6287
|
ignoreBuf: !1,
|
|
6288
|
-
verticalMode: 0
|
|
6288
|
+
verticalMode: 0,
|
|
6289
|
+
whiteSpace: "no-wrap",
|
|
6290
|
+
heightLimit: 1 / 0,
|
|
6291
|
+
lineClamp: 1 / 0
|
|
6289
6292
|
};
|
|
6290
6293
|
var DefaultStyle = Object.assign(Object.assign(Object.assign({
|
|
6291
6294
|
opacity: 1,
|
|
@@ -9945,6 +9948,12 @@
|
|
|
9945
9948
|
}();
|
|
9946
9949
|
RafBasedSTO.TimeOut = 1e3 / 60;
|
|
9947
9950
|
var rafBasedSto = new RafBasedSTO();
|
|
9951
|
+
var calculateLineHeight = function calculateLineHeight(lineHeight, fontSize) {
|
|
9952
|
+
if (isString$1(lineHeight) && "%" === lineHeight[lineHeight.length - 1]) {
|
|
9953
|
+
return fontSize * (Number.parseFloat(lineHeight.substring(0, lineHeight.length - 1)) / 100);
|
|
9954
|
+
}
|
|
9955
|
+
return lineHeight;
|
|
9956
|
+
};
|
|
9948
9957
|
|
|
9949
9958
|
var IncreaseCount = /*#__PURE__*/function (_ACustomAnimate) {
|
|
9950
9959
|
_inherits(IncreaseCount, _ACustomAnimate);
|
|
@@ -14482,7 +14491,7 @@
|
|
|
14482
14491
|
return CanvasTextLayout;
|
|
14483
14492
|
}();
|
|
14484
14493
|
|
|
14485
|
-
var TEXT_UPDATE_TAG_KEY = ["text", "maxLineWidth", "fontSize", "fontFamily", "fontWeight", "ellipsis", "lineHeight", "direction", "wordBreak"].concat(_toConsumableArray(GRAPHIC_UPDATE_TAG_KEY));
|
|
14494
|
+
var TEXT_UPDATE_TAG_KEY = ["text", "maxLineWidth", "heightLimit", "lineClamp", "fontSize", "fontFamily", "fontWeight", "ellipsis", "lineHeight", "direction", "wordBreak"].concat(_toConsumableArray(GRAPHIC_UPDATE_TAG_KEY));
|
|
14486
14495
|
var Text = /*#__PURE__*/function (_Graphic) {
|
|
14487
14496
|
_inherits(Text, _Graphic);
|
|
14488
14497
|
var _super = _createSuper(Text);
|
|
@@ -14556,6 +14565,118 @@
|
|
|
14556
14565
|
paddingArray = parsePadding(boundsPadding);
|
|
14557
14566
|
return paddingArray && bounds.expand(paddingArray), this.clearUpdateBoundTag(), bounds;
|
|
14558
14567
|
}
|
|
14568
|
+
}, {
|
|
14569
|
+
key: "updateWrapAABBBounds",
|
|
14570
|
+
value: function updateWrapAABBBounds(text) {
|
|
14571
|
+
var _a, _b, _c;
|
|
14572
|
+
var textTheme = getTheme(this).text,
|
|
14573
|
+
_this$attribute = this.attribute,
|
|
14574
|
+
_this$attribute$fontF = _this$attribute.fontFamily,
|
|
14575
|
+
fontFamily = _this$attribute$fontF === void 0 ? textTheme.fontFamily : _this$attribute$fontF,
|
|
14576
|
+
_this$attribute$textA = _this$attribute.textAlign,
|
|
14577
|
+
textAlign = _this$attribute$textA === void 0 ? textTheme.textAlign : _this$attribute$textA,
|
|
14578
|
+
_this$attribute$textB = _this$attribute.textBaseline,
|
|
14579
|
+
textBaseline = _this$attribute$textB === void 0 ? textTheme.textBaseline : _this$attribute$textB,
|
|
14580
|
+
_this$attribute$fontS = _this$attribute.fontSize,
|
|
14581
|
+
fontSize = _this$attribute$fontS === void 0 ? textTheme.fontSize : _this$attribute$fontS,
|
|
14582
|
+
_this$attribute$lineH = _this$attribute.lineHeight,
|
|
14583
|
+
lineHeight = _this$attribute$lineH === void 0 ? calculateLineHeight(this.attribute.lineHeight || this.attribute.fontSize || textTheme.fontSize, this.attribute.fontSize || textTheme.fontSize) : _this$attribute$lineH,
|
|
14584
|
+
_this$attribute$ellip = _this$attribute.ellipsis,
|
|
14585
|
+
ellipsis = _this$attribute$ellip === void 0 ? textTheme.ellipsis : _this$attribute$ellip,
|
|
14586
|
+
maxLineWidth = _this$attribute.maxLineWidth,
|
|
14587
|
+
_this$attribute$strok = _this$attribute.stroke,
|
|
14588
|
+
stroke = _this$attribute$strok === void 0 ? textTheme.stroke : _this$attribute$strok,
|
|
14589
|
+
_this$attribute$lineW = _this$attribute.lineWidth,
|
|
14590
|
+
lineWidth = _this$attribute$lineW === void 0 ? textTheme.lineWidth : _this$attribute$lineW,
|
|
14591
|
+
_this$attribute$wordB = _this$attribute.wordBreak,
|
|
14592
|
+
wordBreak = _this$attribute$wordB === void 0 ? textTheme.wordBreak : _this$attribute$wordB,
|
|
14593
|
+
_this$attribute$fontW = _this$attribute.fontWeight,
|
|
14594
|
+
fontWeight = _this$attribute$fontW === void 0 ? textTheme.fontWeight : _this$attribute$fontW,
|
|
14595
|
+
_this$attribute$ignor = _this$attribute.ignoreBuf,
|
|
14596
|
+
ignoreBuf = _this$attribute$ignor === void 0 ? textTheme.ignoreBuf : _this$attribute$ignor,
|
|
14597
|
+
_this$attribute$heigh = _this$attribute.heightLimit,
|
|
14598
|
+
heightLimit = _this$attribute$heigh === void 0 ? 0 : _this$attribute$heigh,
|
|
14599
|
+
lineClamp = _this$attribute.lineClamp,
|
|
14600
|
+
buf = ignoreBuf ? 0 : 2;
|
|
14601
|
+
if (!this.shouldUpdateShape() && (null === (_a = this.cache) || void 0 === _a ? void 0 : _a.layoutData)) {
|
|
14602
|
+
var _bbox = this.cache.layoutData.bbox;
|
|
14603
|
+
return this._AABBBounds.set(_bbox.xOffset, _bbox.yOffset, _bbox.xOffset + _bbox.width, _bbox.yOffset + _bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
|
|
14604
|
+
}
|
|
14605
|
+
var textMeasure = application.graphicUtil.textMeasure,
|
|
14606
|
+
layoutObj = new CanvasTextLayout(fontFamily, {
|
|
14607
|
+
fontSize: fontSize,
|
|
14608
|
+
fontWeight: fontWeight,
|
|
14609
|
+
fontFamily: fontFamily
|
|
14610
|
+
}, textMeasure),
|
|
14611
|
+
lines = isArray$1(text) ? text.map(function (l) {
|
|
14612
|
+
return l.toString();
|
|
14613
|
+
}) : [text.toString()],
|
|
14614
|
+
linesLayout = [],
|
|
14615
|
+
bboxWH = [0, 0];
|
|
14616
|
+
var lineCountLimit = 1 / 0;
|
|
14617
|
+
if (heightLimit > 0 && (lineCountLimit = Math.max(Math.floor(heightLimit / lineHeight), 1)), lineClamp && (lineCountLimit = Math.min(lineCountLimit, lineClamp)), "number" == typeof maxLineWidth && maxLineWidth !== 1 / 0) {
|
|
14618
|
+
if (maxLineWidth > 0) for (var i = 0; i < lines.length; i++) {
|
|
14619
|
+
var str = lines[i];
|
|
14620
|
+
var needCut = !0;
|
|
14621
|
+
if (i === lineCountLimit - 1) {
|
|
14622
|
+
var _clip = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, !1);
|
|
14623
|
+
linesLayout.push({
|
|
14624
|
+
str: _clip.str,
|
|
14625
|
+
width: _clip.width
|
|
14626
|
+
});
|
|
14627
|
+
break;
|
|
14628
|
+
}
|
|
14629
|
+
var clip = layoutObj.textMeasure.clipText(str, layoutObj.textOptions, maxLineWidth, "break-word" === wordBreak);
|
|
14630
|
+
if ("" !== str && "" === clip.str) {
|
|
14631
|
+
if (ellipsis) {
|
|
14632
|
+
var clipEllipsis = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, !1);
|
|
14633
|
+
clip.str = null !== (_b = clipEllipsis.str) && void 0 !== _b ? _b : "", clip.width = null !== (_c = clipEllipsis.width) && void 0 !== _c ? _c : 0;
|
|
14634
|
+
} else clip.str = "", clip.width = 0;
|
|
14635
|
+
needCut = !1;
|
|
14636
|
+
}
|
|
14637
|
+
if (linesLayout.push({
|
|
14638
|
+
str: clip.str,
|
|
14639
|
+
width: clip.width
|
|
14640
|
+
}), clip.str.length === str.length) ;else if (needCut) {
|
|
14641
|
+
var newStr = str.substring(clip.str.length);
|
|
14642
|
+
lines.splice(i + 1, 0, newStr);
|
|
14643
|
+
}
|
|
14644
|
+
}
|
|
14645
|
+
var maxWidth = 0;
|
|
14646
|
+
linesLayout.forEach(function (layout) {
|
|
14647
|
+
maxWidth = Math.max(maxWidth, layout.width);
|
|
14648
|
+
}), bboxWH[0] = maxWidth;
|
|
14649
|
+
} else {
|
|
14650
|
+
var width,
|
|
14651
|
+
_text,
|
|
14652
|
+
_lineWidth = 0;
|
|
14653
|
+
for (var _i = 0, len = lines.length; _i < len; _i++) {
|
|
14654
|
+
if (_i === lineCountLimit - 1) {
|
|
14655
|
+
var _clip2 = layoutObj.textMeasure.clipTextWithSuffix(lines[_i], layoutObj.textOptions, maxLineWidth, ellipsis, !1);
|
|
14656
|
+
linesLayout.push({
|
|
14657
|
+
str: _clip2.str,
|
|
14658
|
+
width: _clip2.width
|
|
14659
|
+
}), _lineWidth = Math.max(_lineWidth, _clip2.width);
|
|
14660
|
+
break;
|
|
14661
|
+
}
|
|
14662
|
+
_text = lines[_i], width = layoutObj.textMeasure.measureTextWidth(_text, layoutObj.textOptions, "break-word" === wordBreak), _lineWidth = Math.max(_lineWidth, width), linesLayout.push({
|
|
14663
|
+
str: _text,
|
|
14664
|
+
width: width
|
|
14665
|
+
});
|
|
14666
|
+
}
|
|
14667
|
+
bboxWH[0] = _lineWidth;
|
|
14668
|
+
}
|
|
14669
|
+
bboxWH[1] = linesLayout.length * (lineHeight + buf);
|
|
14670
|
+
var bbox = {
|
|
14671
|
+
xOffset: 0,
|
|
14672
|
+
yOffset: 0,
|
|
14673
|
+
width: bboxWH[0],
|
|
14674
|
+
height: bboxWH[1]
|
|
14675
|
+
};
|
|
14676
|
+
layoutObj.LayoutBBox(bbox, textAlign, textBaseline);
|
|
14677
|
+
var layoutData = layoutObj.layoutWithBBox(bbox, linesLayout, textAlign, textBaseline, lineHeight);
|
|
14678
|
+
return this.cache.layoutData = layoutData, this.clearUpdateShapeTag(), this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
|
|
14679
|
+
}
|
|
14559
14680
|
}, {
|
|
14560
14681
|
key: "updateSingallineAABBBounds",
|
|
14561
14682
|
value: function updateSingallineAABBBounds(text) {
|
|
@@ -14602,9 +14723,13 @@
|
|
|
14602
14723
|
_attribute$wordBreak === void 0 ? textTheme.wordBreak : _attribute$wordBreak;
|
|
14603
14724
|
var _attribute$ignoreBuf = attribute.ignoreBuf,
|
|
14604
14725
|
ignoreBuf = _attribute$ignoreBuf === void 0 ? textTheme.ignoreBuf : _attribute$ignoreBuf,
|
|
14605
|
-
|
|
14726
|
+
_attribute$whiteSpace = attribute.whiteSpace,
|
|
14727
|
+
whiteSpace = _attribute$whiteSpace === void 0 ? textTheme.whiteSpace : _attribute$whiteSpace;
|
|
14728
|
+
if ("normal" === whiteSpace) return this.updateWrapAABBBounds(text);
|
|
14729
|
+
var buf = ignoreBuf ? 0 : Math.max(2, .075 * fontSize),
|
|
14730
|
+
textFontSize = attribute.fontSize || textTheme.fontSize,
|
|
14606
14731
|
_attribute$lineHeight = attribute.lineHeight,
|
|
14607
|
-
lineHeight = _attribute$lineHeight === void 0 ? null !== (_a = attribute.lineHeight) && void 0 !== _a ? _a :
|
|
14732
|
+
lineHeight = _attribute$lineHeight === void 0 ? calculateLineHeight(null !== (_a = attribute.lineHeight) && void 0 !== _a ? _a : textFontSize, textFontSize) + buf : _attribute$lineHeight;
|
|
14608
14733
|
if (!this.shouldUpdateShape() && this.cache) {
|
|
14609
14734
|
width = null !== (_b = this.cache.clipedWidth) && void 0 !== _b ? _b : 0;
|
|
14610
14735
|
var _dx = textDrawOffsetX(textAlign, width),
|
|
@@ -14675,7 +14800,7 @@
|
|
|
14675
14800
|
_attribute$stroke2 = attribute.stroke,
|
|
14676
14801
|
stroke = _attribute$stroke2 === void 0 ? textTheme.stroke : _attribute$stroke2,
|
|
14677
14802
|
_attribute$lineHeight2 = attribute.lineHeight,
|
|
14678
|
-
lineHeight = _attribute$lineHeight2 === void 0 ? null !== (_a = attribute.lineHeight) && void 0 !== _a ? _a :
|
|
14803
|
+
lineHeight = _attribute$lineHeight2 === void 0 ? calculateLineHeight(null !== (_a = attribute.lineHeight) && void 0 !== _a ? _a : attribute.fontSize || textTheme.fontSize, attribute.fontSize || textTheme.fontSize) + buf : _attribute$lineHeight2,
|
|
14679
14804
|
_attribute$lineWidth2 = attribute.lineWidth,
|
|
14680
14805
|
lineWidth = _attribute$lineWidth2 === void 0 ? textTheme.lineWidth : _attribute$lineWidth2,
|
|
14681
14806
|
_attribute$verticalMo = attribute.verticalMode,
|
|
@@ -14743,7 +14868,7 @@
|
|
|
14743
14868
|
_attribute$fontWeight3 = attribute.fontWeight,
|
|
14744
14869
|
fontWeight = _attribute$fontWeight3 === void 0 ? textTheme.fontWeight : _attribute$fontWeight3,
|
|
14745
14870
|
_attribute$lineHeight3 = attribute.lineHeight,
|
|
14746
|
-
lineHeight = _attribute$lineHeight3 === void 0 ? attribute.lineHeight || attribute.fontSize || textTheme.fontSize : _attribute$lineHeight3,
|
|
14871
|
+
lineHeight = _attribute$lineHeight3 === void 0 ? calculateLineHeight(attribute.lineHeight || attribute.fontSize || textTheme.fontSize, attribute.fontSize || textTheme.fontSize) : _attribute$lineHeight3,
|
|
14747
14872
|
_attribute$ellipsis3 = attribute.ellipsis,
|
|
14748
14873
|
ellipsis = _attribute$ellipsis3 === void 0 ? textTheme.ellipsis : _attribute$ellipsis3,
|
|
14749
14874
|
maxLineWidth = attribute.maxLineWidth,
|
|
@@ -14751,11 +14876,12 @@
|
|
|
14751
14876
|
stroke = _attribute$stroke3 === void 0 ? textTheme.stroke : _attribute$stroke3,
|
|
14752
14877
|
_attribute$lineWidth3 = attribute.lineWidth,
|
|
14753
14878
|
lineWidth = _attribute$lineWidth3 === void 0 ? textTheme.lineWidth : _attribute$lineWidth3,
|
|
14754
|
-
_attribute$
|
|
14755
|
-
_attribute$
|
|
14879
|
+
_attribute$whiteSpace2 = attribute.whiteSpace,
|
|
14880
|
+
whiteSpace = _attribute$whiteSpace2 === void 0 ? textTheme.whiteSpace : _attribute$whiteSpace2;
|
|
14881
|
+
if ("normal" === whiteSpace) return this.updateWrapAABBBounds(text);
|
|
14756
14882
|
if (!this.shouldUpdateShape() && (null === (_a = this.cache) || void 0 === _a ? void 0 : _a.layoutData)) {
|
|
14757
|
-
var
|
|
14758
|
-
return this._AABBBounds.set(
|
|
14883
|
+
var _bbox2 = this.cache.layoutData.bbox;
|
|
14884
|
+
return this._AABBBounds.set(_bbox2.xOffset, _bbox2.yOffset, _bbox2.xOffset + _bbox2.width, _bbox2.yOffset + _bbox2.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
|
|
14759
14885
|
}
|
|
14760
14886
|
var textMeasure = application.graphicUtil.textMeasure,
|
|
14761
14887
|
layoutData = new CanvasTextLayout(fontFamily, {
|
|
@@ -14790,7 +14916,7 @@
|
|
|
14790
14916
|
_attribute$stroke4 = attribute.stroke,
|
|
14791
14917
|
stroke = _attribute$stroke4 === void 0 ? textTheme.stroke : _attribute$stroke4,
|
|
14792
14918
|
_attribute$lineHeight4 = attribute.lineHeight,
|
|
14793
|
-
lineHeight = _attribute$lineHeight4 === void 0 ? null !== (_a = attribute.lineHeight) && void 0 !== _a ? _a :
|
|
14919
|
+
lineHeight = _attribute$lineHeight4 === void 0 ? calculateLineHeight(null !== (_a = attribute.lineHeight) && void 0 !== _a ? _a : attribute.fontSize || textTheme.fontSize, attribute.fontSize || textTheme.fontSize) + buf : _attribute$lineHeight4,
|
|
14794
14920
|
_attribute$lineWidth4 = attribute.lineWidth,
|
|
14795
14921
|
lineWidth = _attribute$lineWidth4 === void 0 ? textTheme.lineWidth : _attribute$lineWidth4,
|
|
14796
14922
|
_attribute$verticalMo2 = attribute.verticalMode,
|
|
@@ -14939,7 +15065,7 @@
|
|
|
14939
15065
|
_this$attribute$fontS = _this$attribute.fontSize,
|
|
14940
15066
|
fontSize = _this$attribute$fontS === void 0 ? textTheme.fontSize : _this$attribute$fontS,
|
|
14941
15067
|
_this$attribute$lineH = _this$attribute.lineHeight,
|
|
14942
|
-
lineHeight = _this$attribute$lineH === void 0 ? this.attribute.lineHeight || this.attribute.fontSize || textTheme.fontSize : _this$attribute$lineH,
|
|
15068
|
+
lineHeight = _this$attribute$lineH === void 0 ? calculateLineHeight(this.attribute.lineHeight || this.attribute.fontSize || textTheme.fontSize, this.attribute.fontSize || textTheme.fontSize) : _this$attribute$lineH,
|
|
14943
15069
|
_this$attribute$ellip = _this$attribute.ellipsis,
|
|
14944
15070
|
ellipsis = _this$attribute$ellip === void 0 ? textTheme.ellipsis : _this$attribute$ellip,
|
|
14945
15071
|
maxLineWidth = _this$attribute.maxLineWidth,
|
|
@@ -24842,6 +24968,11 @@
|
|
|
24842
24968
|
get: function get() {
|
|
24843
24969
|
return this.at(0);
|
|
24844
24970
|
}
|
|
24971
|
+
}, {
|
|
24972
|
+
key: "preventRender",
|
|
24973
|
+
value: function preventRender(prevent) {
|
|
24974
|
+
prevent ? this._skipRender = -1 / 0 : this.params && this.params.optimize && !1 !== this.params.optimize.skipRenderWithOutRange ? this._skipRender = this.window.isVisible() ? 0 : 1 : this._skipRender = 0;
|
|
24975
|
+
}
|
|
24845
24976
|
}, {
|
|
24846
24977
|
key: "optmize",
|
|
24847
24978
|
value: function optmize(params) {
|
|
@@ -24852,8 +24983,8 @@
|
|
|
24852
24983
|
value: function optmizeRender() {
|
|
24853
24984
|
var _this2 = this;
|
|
24854
24985
|
var skipRenderWithOutRange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
|
|
24855
|
-
skipRenderWithOutRange && (this._skipRender = this.window.isVisible() ? 0 : 1, this.window.onVisibleChange(function (visible) {
|
|
24856
|
-
visible ? (_this2.dirtyBounds && _this2.dirtyBounds.setValue(0, 0, _this2._viewBox.width(), _this2._viewBox.height()), _this2._skipRender > 1 && _this2.renderNextFrame(), _this2._skipRender = 0) : _this2._skipRender = 1;
|
|
24986
|
+
skipRenderWithOutRange && (this._skipRender = this._skipRender < 0 ? this._skipRender : this.window.isVisible() ? 0 : 1, this.window.onVisibleChange(function (visible) {
|
|
24987
|
+
_this2._skipRender < 0 || (visible ? (_this2.dirtyBounds && _this2.dirtyBounds.setValue(0, 0, _this2._viewBox.width(), _this2._viewBox.height()), _this2._skipRender > 1 && _this2.renderNextFrame(), _this2._skipRender = 0) : _this2._skipRender = 1);
|
|
24857
24988
|
}));
|
|
24858
24989
|
}
|
|
24859
24990
|
}, {
|
|
@@ -33329,6 +33460,13 @@
|
|
|
33329
33460
|
_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;
|
|
33330
33461
|
}
|
|
33331
33462
|
}
|
|
33463
|
+
}, {
|
|
33464
|
+
key: "measureText",
|
|
33465
|
+
value: function measureText(text) {
|
|
33466
|
+
var method = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : application.global.measureTextMethod;
|
|
33467
|
+
this.setTransform(1, 0, 0, 1, 0, 0, !0, application.global.devicePixelRatio);
|
|
33468
|
+
return _get(_getPrototypeOf(LynxContext2d.prototype), "measureText", this).call(this, text, method);
|
|
33469
|
+
}
|
|
33332
33470
|
}, {
|
|
33333
33471
|
key: "createPattern",
|
|
33334
33472
|
value: function createPattern(image, repetition) {
|
|
@@ -34495,7 +34633,7 @@
|
|
|
34495
34633
|
|
|
34496
34634
|
var roughModule = _roughModule;
|
|
34497
34635
|
|
|
34498
|
-
const version = "0.16.
|
|
34636
|
+
const version = "0.16.14-alpha.1";
|
|
34499
34637
|
loadAllModule(container);
|
|
34500
34638
|
|
|
34501
34639
|
exports.ACustomAnimate = ACustomAnimate;
|
|
@@ -34728,6 +34866,7 @@
|
|
|
34728
34866
|
exports.builtinSymbols = builtinSymbols;
|
|
34729
34867
|
exports.builtinSymbolsMap = builtinSymbolsMap;
|
|
34730
34868
|
exports.calcLineCache = calcLineCache$1;
|
|
34869
|
+
exports.calculateLineHeight = calculateLineHeight;
|
|
34731
34870
|
exports.centroidOfSubpath = centroidOfSubpath;
|
|
34732
34871
|
exports.circleBounds = circleBounds;
|
|
34733
34872
|
exports.clock = clock;
|