@visactor/vrender-components 0.16.18-alpha.0 → 0.16.18
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/cjs/legend/index.d.ts +1 -0
- package/cjs/legend/index.js +2 -1
- package/cjs/legend/index.js.map +1 -1
- package/dist/index.js +149 -34
- 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/es/legend/index.d.ts +1 -0
- package/es/legend/index.js +2 -0
- package/es/legend/index.js.map +1 -1
- package/package.json +5 -5
package/cjs/index.d.ts
CHANGED
package/cjs/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var __createBinding = this && this.__createBinding || (Object.create ? function(
|
|
|
17
17
|
|
|
18
18
|
Object.defineProperty(exports, "__esModule", {
|
|
19
19
|
value: !0
|
|
20
|
-
}), exports.version = void 0, exports.version = "0.16.18
|
|
20
|
+
}), exports.version = void 0, exports.version = "0.16.18", __exportStar(require("./core/base"), exports),
|
|
21
21
|
__exportStar(require("./scrollbar"), exports), __exportStar(require("./tag"), exports),
|
|
22
22
|
__exportStar(require("./poptip"), exports), __exportStar(require("./crosshair"), exports),
|
|
23
23
|
__exportStar(require("./label"), exports), __exportStar(require("./axis"), exports),
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,SAAS,CAAC;AAEjC,8CAA4B;AAC5B,8CAA4B;AAC5B,wCAAsB;AACtB,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB;AACxB,yCAAuB;AACvB,8CAA4B;AAC5B,4CAA0B;AAC1B,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,2CAAyB;AACzB,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,4CAA0B;AAC1B,8CAA4B;AAC5B,wCAAsB;AACtB,6CAA2B","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.16.18\";\n\nexport * from './core/base';\nexport * from './scrollbar';\nexport * from './tag';\nexport * from './poptip';\nexport * from './crosshair';\nexport * from './label';\nexport * from './axis';\nexport * from './axis/grid';\nexport * from './segment';\nexport * from './data-zoom';\nexport * from './marker';\nexport * from './pager';\nexport * from './legend';\nexport * from './title';\nexport * from './indicator';\nexport * from './slider';\nexport * from './link-path';\nexport * from './player';\nexport * from './brush';\nexport * from './tooltip';\nexport * from './interface';\nexport * from './jsx';\nexport * from './checkbox';\n"]}
|
package/cjs/legend/index.d.ts
CHANGED
package/cjs/legend/index.js
CHANGED
|
@@ -20,5 +20,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
20
20
|
}), __exportStar(require("./discrete/discrete"), exports), __exportStar(require("./discrete/type"), exports),
|
|
21
21
|
__exportStar(require("./color/color"), exports), __exportStar(require("./color/type"), exports),
|
|
22
22
|
__exportStar(require("./size/size"), exports), __exportStar(require("./size/type"), exports),
|
|
23
|
-
__exportStar(require("./type"), exports), __exportStar(require("./constant"), exports)
|
|
23
|
+
__exportStar(require("./type"), exports), __exportStar(require("./constant"), exports),
|
|
24
|
+
__exportStar(require("./util"), exports);
|
|
24
25
|
//# sourceMappingURL=index.js.map
|
package/cjs/legend/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/legend/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,kDAAgC;AAChC,gDAA8B;AAC9B,+CAA6B;AAC7B,8CAA4B;AAC5B,8CAA4B;AAC5B,yCAAuB;AACvB,6CAA2B","file":"index.js","sourcesContent":["export * from './discrete/discrete';\nexport * from './discrete/type';\nexport * from './color/color';\nexport * from './color/type';\nexport * from './size/size';\nexport * from './size/type';\nexport * from './type';\nexport * from './constant';\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/legend/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,kDAAgC;AAChC,gDAA8B;AAC9B,+CAA6B;AAC7B,8CAA4B;AAC5B,8CAA4B;AAC5B,yCAAuB;AACvB,6CAA2B;AAC3B,yCAAuB","file":"index.js","sourcesContent":["export * from './discrete/discrete';\nexport * from './discrete/type';\nexport * from './color/color';\nexport * from './color/type';\nexport * from './size/size';\nexport * from './size/type';\nexport * from './type';\nexport * from './constant';\nexport * from './util';\n"]}
|
package/dist/index.js
CHANGED
|
@@ -4473,7 +4473,8 @@
|
|
|
4473
4473
|
verticalMode: 0,
|
|
4474
4474
|
whiteSpace: "no-wrap",
|
|
4475
4475
|
heightLimit: 1 / 0,
|
|
4476
|
-
lineClamp: 1 / 0
|
|
4476
|
+
lineClamp: 1 / 0,
|
|
4477
|
+
suffixPosition: "end"
|
|
4477
4478
|
};
|
|
4478
4479
|
var DefaultStyle = Object.assign(Object.assign(Object.assign({
|
|
4479
4480
|
opacity: 1,
|
|
@@ -4568,7 +4569,7 @@
|
|
|
4568
4569
|
var DefaultPathAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
|
|
4569
4570
|
path: new CustomPath2D(),
|
|
4570
4571
|
customPath: function customPath() {
|
|
4571
|
-
|
|
4572
|
+
vutils.Logger.getInstance().warn("空函数");
|
|
4572
4573
|
}
|
|
4573
4574
|
});
|
|
4574
4575
|
var DefaultPolygonAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
|
|
@@ -4832,7 +4833,7 @@
|
|
|
4832
4833
|
i = 0;
|
|
4833
4834
|
for (; i < verticalList.length && length + verticalList[i].width < width; i++) length += verticalList[i].width, out.push(verticalList[i]);
|
|
4834
4835
|
if (verticalList[i] && verticalList[i].text.length > 1) {
|
|
4835
|
-
var clipedData = this._clipText(verticalList[i].text, options, width - length, 0, verticalList[i].text.length - 1);
|
|
4836
|
+
var clipedData = this._clipText(verticalList[i].text, options, width - length, 0, verticalList[i].text.length - 1, "end", !1);
|
|
4836
4837
|
if (wordBreak && clipedData.str !== verticalList[i].text) {
|
|
4837
4838
|
var text = "",
|
|
4838
4839
|
_length = 0;
|
|
@@ -4871,7 +4872,7 @@
|
|
|
4871
4872
|
str: "",
|
|
4872
4873
|
width: 0
|
|
4873
4874
|
};
|
|
4874
|
-
var data = this._clipText(text, options, width, 0, text.length - 1);
|
|
4875
|
+
var data = this._clipText(text, options, width, 0, text.length - 1, "end", !1);
|
|
4875
4876
|
if (wordBreak && data.str !== text) {
|
|
4876
4877
|
var index = testLetter(text, data.str.length);
|
|
4877
4878
|
index !== data.str.length && (data.str = text.substring(0, index), data.width = this.measureTextWidth(data.str, options));
|
|
@@ -4880,7 +4881,21 @@
|
|
|
4880
4881
|
}
|
|
4881
4882
|
}, {
|
|
4882
4883
|
key: "_clipText",
|
|
4883
|
-
value: function _clipText(text, options, width, leftIdx, rightIdx) {
|
|
4884
|
+
value: function _clipText(text, options, width, leftIdx, rightIdx, position, suffix) {
|
|
4885
|
+
var data;
|
|
4886
|
+
if ("end" === position) data = this._clipTextEnd(text, options, width, leftIdx, rightIdx), suffix && (data.result = data.str + suffix);else if ("start" === position) data = this._clipTextStart(text, options, width, leftIdx, rightIdx), suffix && (data.result = suffix + data.str);else if ("middle" === position) {
|
|
4887
|
+
var d = this._clipTextMiddle(text, options, width, "", "", 0, 0, 1);
|
|
4888
|
+
data = {
|
|
4889
|
+
str: "none",
|
|
4890
|
+
width: d.width,
|
|
4891
|
+
result: d.left + suffix + d.right
|
|
4892
|
+
};
|
|
4893
|
+
}
|
|
4894
|
+
return data;
|
|
4895
|
+
}
|
|
4896
|
+
}, {
|
|
4897
|
+
key: "_clipTextEnd",
|
|
4898
|
+
value: function _clipTextEnd(text, options, width, leftIdx, rightIdx) {
|
|
4884
4899
|
var middleIdx = Math.floor((leftIdx + rightIdx) / 2),
|
|
4885
4900
|
subText = text.substring(0, middleIdx + 1),
|
|
4886
4901
|
strWidth = this.measureTextWidth(subText, options);
|
|
@@ -4894,7 +4909,7 @@
|
|
|
4894
4909
|
return length = this.measureTextWidth(str, options), length <= width ? {
|
|
4895
4910
|
str: str,
|
|
4896
4911
|
width: length
|
|
4897
|
-
} : this.
|
|
4912
|
+
} : this._clipTextEnd(text, options, width, leftIdx, middleIdx);
|
|
4898
4913
|
}
|
|
4899
4914
|
if (strWidth < width) {
|
|
4900
4915
|
if (middleIdx >= text.length - 1) return {
|
|
@@ -4905,16 +4920,68 @@
|
|
|
4905
4920
|
return length = this.measureTextWidth(_str, options), length >= width ? {
|
|
4906
4921
|
str: subText,
|
|
4907
4922
|
width: strWidth
|
|
4908
|
-
} : this.
|
|
4923
|
+
} : this._clipTextEnd(text, options, width, middleIdx, rightIdx);
|
|
4924
|
+
}
|
|
4925
|
+
return {
|
|
4926
|
+
str: subText,
|
|
4927
|
+
width: strWidth
|
|
4928
|
+
};
|
|
4929
|
+
}
|
|
4930
|
+
}, {
|
|
4931
|
+
key: "_clipTextStart",
|
|
4932
|
+
value: function _clipTextStart(text, options, width, leftIdx, rightIdx) {
|
|
4933
|
+
var middleIdx = Math.ceil((leftIdx + rightIdx) / 2),
|
|
4934
|
+
subText = text.substring(middleIdx - 1, text.length - 1),
|
|
4935
|
+
strWidth = this.measureTextWidth(subText, options);
|
|
4936
|
+
var length;
|
|
4937
|
+
if (strWidth > width) {
|
|
4938
|
+
if (subText.length <= 1) return {
|
|
4939
|
+
str: "",
|
|
4940
|
+
width: 0
|
|
4941
|
+
};
|
|
4942
|
+
var str = text.substring(middleIdx, text.length - 1);
|
|
4943
|
+
return length = this.measureTextWidth(str, options), length <= width ? {
|
|
4944
|
+
str: str,
|
|
4945
|
+
width: length
|
|
4946
|
+
} : this._clipTextStart(text, options, width, middleIdx, text.length - 1);
|
|
4947
|
+
}
|
|
4948
|
+
if (strWidth < width) {
|
|
4949
|
+
if (middleIdx <= 0) return {
|
|
4950
|
+
str: text,
|
|
4951
|
+
width: this.measureTextWidth(text, options)
|
|
4952
|
+
};
|
|
4953
|
+
var _str2 = text.substring(middleIdx - 2, text.length - 1);
|
|
4954
|
+
return length = this.measureTextWidth(_str2, options), length >= width ? {
|
|
4955
|
+
str: subText,
|
|
4956
|
+
width: strWidth
|
|
4957
|
+
} : this._clipTextStart(text, options, width, leftIdx, middleIdx);
|
|
4909
4958
|
}
|
|
4910
4959
|
return {
|
|
4911
4960
|
str: subText,
|
|
4912
4961
|
width: strWidth
|
|
4913
4962
|
};
|
|
4914
4963
|
}
|
|
4964
|
+
}, {
|
|
4965
|
+
key: "_clipTextMiddle",
|
|
4966
|
+
value: function _clipTextMiddle(text, options, width, left, right, leftW, rightW, buffer) {
|
|
4967
|
+
var subLeftText = text.substring(0, buffer),
|
|
4968
|
+
strLeftWidth = this.measureTextWidth(subLeftText, options);
|
|
4969
|
+
if (strLeftWidth + rightW > width) return {
|
|
4970
|
+
left: left,
|
|
4971
|
+
right: right,
|
|
4972
|
+
width: leftW + rightW
|
|
4973
|
+
};
|
|
4974
|
+
var subRightText = text.substring(text.length - buffer, text.length),
|
|
4975
|
+
strRightWidth = this.measureTextWidth(subRightText, options);
|
|
4976
|
+
return strLeftWidth + strRightWidth > width ? {
|
|
4977
|
+
left: subLeftText,
|
|
4978
|
+
right: right,
|
|
4979
|
+
width: strLeftWidth + rightW
|
|
4980
|
+
} : this._clipTextMiddle(text, options, width, subLeftText, subRightText, strLeftWidth, strRightWidth, buffer + 1);
|
|
4981
|
+
}
|
|
4915
4982
|
}, {
|
|
4916
4983
|
key: "clipTextWithSuffixVertical",
|
|
4917
|
-
value: function clipTextWithSuffixVertical(verticalList, options, width, suffix, wordBreak) {
|
|
4984
|
+
value: function clipTextWithSuffixVertical(verticalList, options, width, suffix, wordBreak, suffixPosition) {
|
|
4918
4985
|
if ("" === suffix) return this.clipTextVertical(verticalList, options, width, wordBreak);
|
|
4919
4986
|
if (0 === verticalList.length) return {
|
|
4920
4987
|
verticalList: verticalList,
|
|
@@ -4924,17 +4991,50 @@
|
|
|
4924
4991
|
if (output.verticalList.length === verticalList.length && output.verticalList[output.verticalList.length - 1].width === verticalList[verticalList.length - 1].width) return output;
|
|
4925
4992
|
var suffixWidth = this.measureTextWidth(suffix, options);
|
|
4926
4993
|
if (suffixWidth > width) return output;
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4994
|
+
var out;
|
|
4995
|
+
if (width -= suffixWidth, "start" === suffixPosition) {
|
|
4996
|
+
var nextVerticalList = this.revertVerticalList(verticalList);
|
|
4997
|
+
out = this.clipTextVertical(nextVerticalList, options, width, wordBreak);
|
|
4998
|
+
var v = this.revertVerticalList(out.verticalList);
|
|
4999
|
+
v.unshift({
|
|
5000
|
+
text: suffix,
|
|
5001
|
+
direction: 1,
|
|
5002
|
+
width: suffixWidth
|
|
5003
|
+
}), out.verticalList = v;
|
|
5004
|
+
} else if ("middle" === suffixPosition) {
|
|
5005
|
+
var leftOut = this.clipTextVertical(verticalList, options, width / 2, wordBreak),
|
|
5006
|
+
_nextVerticalList = this.revertVerticalList(verticalList),
|
|
5007
|
+
rightOut = this.clipTextVertical(_nextVerticalList, options, width / 2, wordBreak);
|
|
5008
|
+
leftOut.verticalList.push({
|
|
5009
|
+
text: suffix,
|
|
5010
|
+
direction: 1,
|
|
5011
|
+
width: suffixWidth
|
|
5012
|
+
}), this.revertVerticalList(rightOut.verticalList).forEach(function (v) {
|
|
5013
|
+
return leftOut.verticalList.push(v);
|
|
5014
|
+
}), out = {
|
|
5015
|
+
verticalList: leftOut.verticalList,
|
|
5016
|
+
width: leftOut.width + rightOut.width
|
|
5017
|
+
};
|
|
5018
|
+
} else out = this.clipTextVertical(verticalList, options, width, wordBreak), out.verticalList.push({
|
|
4930
5019
|
text: suffix,
|
|
4931
5020
|
direction: 1,
|
|
4932
5021
|
width: suffixWidth
|
|
4933
|
-
})
|
|
5022
|
+
});
|
|
5023
|
+
return out.width += suffixWidth, out;
|
|
5024
|
+
}
|
|
5025
|
+
}, {
|
|
5026
|
+
key: "revertVerticalList",
|
|
5027
|
+
value: function revertVerticalList(verticalList) {
|
|
5028
|
+
return verticalList.reverse().map(function (l) {
|
|
5029
|
+
var t = l.text.split("").reverse().join("");
|
|
5030
|
+
return Object.assign(Object.assign({}, l), {
|
|
5031
|
+
text: t
|
|
5032
|
+
});
|
|
5033
|
+
});
|
|
4934
5034
|
}
|
|
4935
5035
|
}, {
|
|
4936
5036
|
key: "clipTextWithSuffix",
|
|
4937
|
-
value: function clipTextWithSuffix(text, options, width, suffix, wordBreak) {
|
|
5037
|
+
value: function clipTextWithSuffix(text, options, width, suffix, wordBreak, position) {
|
|
4938
5038
|
if ("" === suffix) return this.clipText(text, options, width, wordBreak);
|
|
4939
5039
|
if (0 === text.length) return {
|
|
4940
5040
|
str: "",
|
|
@@ -4951,12 +5051,12 @@
|
|
|
4951
5051
|
width: 0
|
|
4952
5052
|
};
|
|
4953
5053
|
width -= suffixWidth;
|
|
4954
|
-
var data = this._clipText(text, options, width, 0, text.length - 1);
|
|
5054
|
+
var data = this._clipText(text, options, width, 0, text.length - 1, position, suffix);
|
|
4955
5055
|
if (wordBreak && data.str !== text) {
|
|
4956
5056
|
var index = testLetter(text, data.str.length);
|
|
4957
5057
|
index !== data.str.length && (data.str = text.substring(0, index), data.width = this.measureTextWidth(data.str, options));
|
|
4958
5058
|
}
|
|
4959
|
-
return data.str
|
|
5059
|
+
return data.str = data.result, data.width += suffixWidth, data;
|
|
4960
5060
|
}
|
|
4961
5061
|
}]);
|
|
4962
5062
|
return ATextMeasure;
|
|
@@ -5592,7 +5692,7 @@
|
|
|
5592
5692
|
var parentTheme = parentGroup.theme;
|
|
5593
5693
|
(parentTheme.dirty || force) && parentTheme.applyTheme(parentGroup, pt, !0), this.userTheme ? combineTheme(this.userTheme, parentTheme.userTheme, !1) : this.userTheme = vutils.clone(parentTheme.userTheme), combineTheme(pt, parentTheme.userTheme);
|
|
5594
5694
|
}
|
|
5595
|
-
this.userTheme ? this.doCombine(pt) : (parentGroup ? this.combinedTheme = parentGroup.theme.combinedTheme : (this.combinedTheme = this._defaultTheme,
|
|
5695
|
+
this.userTheme ? this.doCombine(pt) : (parentGroup ? this.combinedTheme = parentGroup.theme.combinedTheme : (this.combinedTheme = this._defaultTheme, vutils.Logger.getInstance().warn("未知错误,走到不应该走的区域里")), this.dirty = !1);
|
|
5596
5696
|
}
|
|
5597
5697
|
return this.combinedTheme;
|
|
5598
5698
|
}
|
|
@@ -5864,7 +5964,7 @@
|
|
|
5864
5964
|
}, {
|
|
5865
5965
|
key: "insertInto",
|
|
5866
5966
|
value: function insertInto(newNode, idx) {
|
|
5867
|
-
if (!this._ignoreWarn && this._nodeList &&
|
|
5967
|
+
if (!this._ignoreWarn && this._nodeList && vutils.Logger.getInstance().warn("insertIntoKeepIdx和insertInto混用可能会存在错误"), idx >= this.childrenCount) return this.appendChild(newNode);
|
|
5868
5968
|
if (this._uid === newNode._uid) return null;
|
|
5869
5969
|
if (newNode.isAncestorsOf(this)) throw new Error("【Node::insertBefore】不能将父辈元素insert为子元素");
|
|
5870
5970
|
if (newNode.parent && newNode.parent.removeChild(newNode), newNode.parent = this, 0 === idx) newNode._next = this._firstChild, this._firstChild && (this._firstChild._prev = newNode), newNode._prev = null, this._firstChild = newNode;else {
|
|
@@ -6516,7 +6616,7 @@
|
|
|
6516
6616
|
handler = new ManualTickHandler();
|
|
6517
6617
|
break;
|
|
6518
6618
|
default:
|
|
6519
|
-
|
|
6619
|
+
vutils.Logger.getInstance().warn("非法的计时器模式"), handler = new RAFTickHandler();
|
|
6520
6620
|
}
|
|
6521
6621
|
return !!handler.avaliable() && (this.tickerHandler && this.tickerHandler.release(), this.tickerHandler = handler, !0);
|
|
6522
6622
|
}
|
|
@@ -7311,7 +7411,7 @@
|
|
|
7311
7411
|
}
|
|
7312
7412
|
lastStep = lastStep.prev;
|
|
7313
7413
|
}
|
|
7314
|
-
return
|
|
7414
|
+
return vutils.Logger.getInstance().warn("未知错误,step中找不到属性"), step.props[name];
|
|
7315
7415
|
}
|
|
7316
7416
|
}, {
|
|
7317
7417
|
key: "updateTarget",
|
|
@@ -8417,6 +8517,7 @@
|
|
|
8417
8517
|
if (!animate.validAttr(key)) return;
|
|
8418
8518
|
var nextStepVal = nextProps[key],
|
|
8419
8519
|
lastStepVal = null !== (_a = lastProps && lastProps[key]) && void 0 !== _a ? _a : subAnimate.getLastPropByName(key, step);
|
|
8520
|
+
if (null == nextStepVal || null == lastStepVal) return void (nextAttributes[key] = nextStepVal);
|
|
8420
8521
|
var match;
|
|
8421
8522
|
match = animate.interpolateFunc && animate.interpolateFunc(key, ratio, lastStepVal, nextStepVal, nextAttributes), match || (match = animate.customInterpolate(key, ratio, lastStepVal, nextStepVal, _this7, nextAttributes), match || _this7.defaultInterpolate(nextStepVal, lastStepVal, key, nextAttributes, nextParsedProps, ratio) || _this7._interpolate(key, ratio, lastStepVal, nextStepVal, nextAttributes));
|
|
8422
8523
|
}), step.parsedProps = nextParsedProps;
|
|
@@ -9898,12 +9999,12 @@
|
|
|
9898
9999
|
}
|
|
9899
10000
|
}, {
|
|
9900
10001
|
key: "GetLayout",
|
|
9901
|
-
value: function GetLayout(str, width, height, textAlign, textBaseline, lineHeight, suffix, wordBreak,
|
|
10002
|
+
value: function GetLayout(str, width, height, textAlign, textBaseline, lineHeight, suffix, wordBreak, suffixPosition) {
|
|
9902
10003
|
var linesLayout = [],
|
|
9903
10004
|
bboxWH = [width, height],
|
|
9904
10005
|
bboxOffset = [0, 0];
|
|
9905
10006
|
for (; str.length > 0;) {
|
|
9906
|
-
var _this$textMeasure$cli = this.textMeasure.clipTextWithSuffix(str, this.textOptions, width, suffix, wordBreak),
|
|
10007
|
+
var _this$textMeasure$cli = this.textMeasure.clipTextWithSuffix(str, this.textOptions, width, suffix, wordBreak, suffixPosition),
|
|
9907
10008
|
clipText = _this$textMeasure$cli.str;
|
|
9908
10009
|
linesLayout.push({
|
|
9909
10010
|
str: clipText,
|
|
@@ -9925,6 +10026,7 @@
|
|
|
9925
10026
|
var suffix = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "";
|
|
9926
10027
|
var wordBreak = arguments.length > 5 ? arguments[5] : undefined;
|
|
9927
10028
|
var lineWidth = arguments.length > 6 ? arguments[6] : undefined;
|
|
10029
|
+
var suffixPosition = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : "end";
|
|
9928
10030
|
lines = lines.map(function (l) {
|
|
9929
10031
|
return l.toString();
|
|
9930
10032
|
});
|
|
@@ -9933,7 +10035,7 @@
|
|
|
9933
10035
|
if ("number" == typeof lineWidth && lineWidth !== 1 / 0) {
|
|
9934
10036
|
var width;
|
|
9935
10037
|
for (var i = 0, len = lines.length; i < len; i++) width = Math.min(this.textMeasure.measureTextWidth(lines[i], this.textOptions), lineWidth), linesLayout.push({
|
|
9936
|
-
str: this.textMeasure.clipTextWithSuffix(lines[i], this.textOptions, width, suffix, wordBreak).str,
|
|
10038
|
+
str: this.textMeasure.clipTextWithSuffix(lines[i], this.textOptions, width, suffix, wordBreak, suffixPosition).str,
|
|
9937
10039
|
width: width
|
|
9938
10040
|
});
|
|
9939
10041
|
bboxWH[0] = lineWidth;
|
|
@@ -10211,12 +10313,12 @@
|
|
|
10211
10313
|
stroke = _attribute$stroke === void 0 ? textTheme.stroke : _attribute$stroke,
|
|
10212
10314
|
_attribute$lineWidth = attribute.lineWidth,
|
|
10213
10315
|
lineWidth = _attribute$lineWidth === void 0 ? textTheme.lineWidth : _attribute$lineWidth,
|
|
10214
|
-
_attribute$
|
|
10215
|
-
_attribute$wordBreak === void 0 ? textTheme.wordBreak : _attribute$wordBreak;
|
|
10216
|
-
var _attribute$ignoreBuf = attribute.ignoreBuf,
|
|
10316
|
+
_attribute$ignoreBuf = attribute.ignoreBuf,
|
|
10217
10317
|
ignoreBuf = _attribute$ignoreBuf === void 0 ? textTheme.ignoreBuf : _attribute$ignoreBuf,
|
|
10218
10318
|
_attribute$whiteSpace = attribute.whiteSpace,
|
|
10219
|
-
whiteSpace = _attribute$whiteSpace === void 0 ? textTheme.whiteSpace : _attribute$whiteSpace
|
|
10319
|
+
whiteSpace = _attribute$whiteSpace === void 0 ? textTheme.whiteSpace : _attribute$whiteSpace,
|
|
10320
|
+
_attribute$suffixPosi = attribute.suffixPosition,
|
|
10321
|
+
suffixPosition = _attribute$suffixPosi === void 0 ? textTheme.suffixPosition : _attribute$suffixPosi;
|
|
10220
10322
|
if ("normal" === whiteSpace) return this.updateWrapAABBBounds(text);
|
|
10221
10323
|
var buf = ignoreBuf ? 0 : Math.max(2, .075 * fontSize),
|
|
10222
10324
|
textFontSize = attribute.fontSize || textTheme.fontSize,
|
|
@@ -10234,7 +10336,7 @@
|
|
|
10234
10336
|
fontSize: fontSize,
|
|
10235
10337
|
fontWeight: fontWeight,
|
|
10236
10338
|
fontFamily: fontFamily
|
|
10237
|
-
}, maxLineWidth, strEllipsis, !1);
|
|
10339
|
+
}, maxLineWidth, strEllipsis, !1, suffixPosition);
|
|
10238
10340
|
str = data.str, width = data.width;
|
|
10239
10341
|
} else {
|
|
10240
10342
|
var _data = textMeasure.clipText(text.toString(), {
|
|
@@ -10294,6 +10396,8 @@
|
|
|
10294
10396
|
lineWidth = _attribute$lineWidth2 === void 0 ? textTheme.lineWidth : _attribute$lineWidth2,
|
|
10295
10397
|
_attribute$verticalMo = attribute.verticalMode,
|
|
10296
10398
|
verticalMode = _attribute$verticalMo === void 0 ? textTheme.verticalMode : _attribute$verticalMo,
|
|
10399
|
+
_attribute$suffixPosi2 = attribute.suffixPosition,
|
|
10400
|
+
suffixPosition = _attribute$suffixPosi2 === void 0 ? textTheme.suffixPosition : _attribute$suffixPosi2,
|
|
10297
10401
|
lineHeight = null !== (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf;
|
|
10298
10402
|
var _attribute$textAlign2 = attribute.textAlign,
|
|
10299
10403
|
textAlign = _attribute$textAlign2 === void 0 ? textTheme.textAlign : _attribute$textAlign2,
|
|
@@ -10317,7 +10421,7 @@
|
|
|
10317
10421
|
fontSize: fontSize,
|
|
10318
10422
|
fontWeight: fontWeight,
|
|
10319
10423
|
fontFamily: fontFamily
|
|
10320
|
-
}, maxLineWidth, strEllipsis, !1);
|
|
10424
|
+
}, maxLineWidth, strEllipsis, !1, suffixPosition);
|
|
10321
10425
|
verticalList = [data.verticalList], width = data.width;
|
|
10322
10426
|
} else {
|
|
10323
10427
|
var _data2 = textMeasure.clipTextVertical(verticalList[0], {
|
|
@@ -10366,6 +10470,8 @@
|
|
|
10366
10470
|
lineWidth = _attribute$lineWidth3 === void 0 ? textTheme.lineWidth : _attribute$lineWidth3,
|
|
10367
10471
|
_attribute$whiteSpace2 = attribute.whiteSpace,
|
|
10368
10472
|
whiteSpace = _attribute$whiteSpace2 === void 0 ? textTheme.whiteSpace : _attribute$whiteSpace2,
|
|
10473
|
+
_attribute$suffixPosi3 = attribute.suffixPosition,
|
|
10474
|
+
suffixPosition = _attribute$suffixPosi3 === void 0 ? textTheme.suffixPosition : _attribute$suffixPosi3,
|
|
10369
10475
|
lineHeight = null !== (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : attribute.fontSize || textTheme.fontSize;
|
|
10370
10476
|
if ("normal" === whiteSpace) return this.updateWrapAABBBounds(text);
|
|
10371
10477
|
if (!this.shouldUpdateShape() && (null === (_b = this.cache) || void 0 === _b ? void 0 : _b.layoutData)) {
|
|
@@ -10377,7 +10483,7 @@
|
|
|
10377
10483
|
fontSize: fontSize,
|
|
10378
10484
|
fontWeight: fontWeight,
|
|
10379
10485
|
fontFamily: fontFamily
|
|
10380
|
-
}, textMeasure).GetLayoutByLines(text, textAlign, textBaseline, lineHeight, !0 === ellipsis ? textTheme.ellipsis : ellipsis || void 0, !1, maxLineWidth),
|
|
10486
|
+
}, textMeasure).GetLayoutByLines(text, textAlign, textBaseline, lineHeight, !0 === ellipsis ? textTheme.ellipsis : ellipsis || void 0, !1, maxLineWidth, suffixPosition),
|
|
10381
10487
|
bbox = layoutData.bbox;
|
|
10382
10488
|
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;
|
|
10383
10489
|
}
|
|
@@ -10408,6 +10514,8 @@
|
|
|
10408
10514
|
lineWidth = _attribute$lineWidth4 === void 0 ? textTheme.lineWidth : _attribute$lineWidth4,
|
|
10409
10515
|
_attribute$verticalMo2 = attribute.verticalMode,
|
|
10410
10516
|
verticalMode = _attribute$verticalMo2 === void 0 ? textTheme.verticalMode : _attribute$verticalMo2,
|
|
10517
|
+
_attribute$suffixPosi4 = attribute.suffixPosition,
|
|
10518
|
+
suffixPosition = _attribute$suffixPosi4 === void 0 ? textTheme.suffixPosition : _attribute$suffixPosi4,
|
|
10411
10519
|
lineHeight = null !== (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf;
|
|
10412
10520
|
var _attribute$textAlign4 = attribute.textAlign,
|
|
10413
10521
|
textAlign = _attribute$textAlign4 === void 0 ? textTheme.textAlign : _attribute$textAlign4,
|
|
@@ -10440,7 +10548,7 @@
|
|
|
10440
10548
|
fontSize: fontSize,
|
|
10441
10549
|
fontWeight: fontWeight,
|
|
10442
10550
|
fontFamily: fontFamily
|
|
10443
|
-
}, maxLineWidth, strEllipsis, !1);
|
|
10551
|
+
}, maxLineWidth, strEllipsis, !1, suffixPosition);
|
|
10444
10552
|
verticalLists[i] = data.verticalList, width = data.width;
|
|
10445
10553
|
} else {
|
|
10446
10554
|
var _data3 = textMeasure.clipTextVertical(verticalData, {
|
|
@@ -11576,6 +11684,7 @@
|
|
|
11576
11684
|
}, {
|
|
11577
11685
|
key: "_isValid",
|
|
11578
11686
|
value: function _isValid() {
|
|
11687
|
+
if (this.pathProxy) return !0;
|
|
11579
11688
|
var _this$attribute = this.attribute,
|
|
11580
11689
|
points = _this$attribute.points,
|
|
11581
11690
|
segments = _this$attribute.segments;
|
|
@@ -12711,6 +12820,7 @@
|
|
|
12711
12820
|
}, {
|
|
12712
12821
|
key: "_isValid",
|
|
12713
12822
|
value: function _isValid() {
|
|
12823
|
+
if (this.pathProxy) return !0;
|
|
12714
12824
|
var _this$attribute = this.attribute,
|
|
12715
12825
|
points = _this$attribute.points,
|
|
12716
12826
|
segments = _this$attribute.segments;
|
|
@@ -13945,8 +14055,12 @@
|
|
|
13945
14055
|
boundStroke(tb1, scaledHalfLineWidth, miter, strokeBoundsBuffer), aabbBounds.union(tb1), tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);
|
|
13946
14056
|
}
|
|
13947
14057
|
if (shadowBlur) {
|
|
13948
|
-
var
|
|
13949
|
-
|
|
14058
|
+
var _attribute$shadowOffs = attribute.shadowOffsetX,
|
|
14059
|
+
shadowOffsetX = _attribute$shadowOffs === void 0 ? theme.shadowOffsetX : _attribute$shadowOffs,
|
|
14060
|
+
_attribute$shadowOffs2 = attribute.shadowOffsetY,
|
|
14061
|
+
shadowOffsetY = _attribute$shadowOffs2 === void 0 ? theme.shadowOffsetY : _attribute$shadowOffs2,
|
|
14062
|
+
shadowBlurWidth = shadowBlur / Math.abs(scaleX + scaleY) * 2 + Math.max(shadowOffsetX, shadowOffsetY);
|
|
14063
|
+
boundStroke(tb1, shadowBlurWidth, miter, strokeBoundsBuffer + 1), aabbBounds.union(tb1);
|
|
13950
14064
|
}
|
|
13951
14065
|
this.combindShadowAABBBounds(aabbBounds, graphic), vutils.transformBoundsWithMatrix(aabbBounds, aabbBounds, graphic.transMatrix);
|
|
13952
14066
|
}
|
|
@@ -18007,7 +18121,7 @@
|
|
|
18007
18121
|
}, {
|
|
18008
18122
|
key: "selectRenderByType",
|
|
18009
18123
|
value: function selectRenderByType(type) {
|
|
18010
|
-
return
|
|
18124
|
+
return vutils.Logger.getInstance().warn("未知错误,不应该走到这里"), null;
|
|
18011
18125
|
}
|
|
18012
18126
|
}, {
|
|
18013
18127
|
key: "selectRenderByNumberType",
|
|
@@ -31738,7 +31852,7 @@
|
|
|
31738
31852
|
}
|
|
31739
31853
|
};
|
|
31740
31854
|
|
|
31741
|
-
const version = "0.16.18
|
|
31855
|
+
const version = "0.16.18";
|
|
31742
31856
|
|
|
31743
31857
|
exports.AbstractComponent = AbstractComponent;
|
|
31744
31858
|
exports.ArcInfo = ArcInfo;
|
|
@@ -31795,6 +31909,7 @@
|
|
|
31795
31909
|
exports.Tooltip = Tooltip;
|
|
31796
31910
|
exports.VTag = VTag;
|
|
31797
31911
|
exports.getHorizontalPath = getHorizontalPath;
|
|
31912
|
+
exports.getSizeHandlerPath = getSizeHandlerPath;
|
|
31798
31913
|
exports.getVerticalPath = getVerticalPath;
|
|
31799
31914
|
exports.loadPoptip = loadPoptip;
|
|
31800
31915
|
exports.loadScrollbar = loadScrollbar;
|