reke-ui 0.5.2 → 0.5.4
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/custom-elements.json +764 -3
- package/dist/components/reke-bar-chart/reke-bar-chart.d.ts +99 -0
- package/dist/components/reke-bar-chart/reke-bar-chart.d.ts.map +1 -0
- package/dist/components/reke-bar-chart/reke-bar-chart.js +319 -0
- package/dist/components/reke-bar-chart/reke-bar-chart.styles.d.ts +2 -0
- package/dist/components/reke-bar-chart/reke-bar-chart.styles.d.ts.map +1 -0
- package/dist/components/reke-bar-chart/reke-bar-chart.styles.js +36 -0
- package/dist/components/reke-dialog/reke-dialog.d.ts +19 -0
- package/dist/components/reke-dialog/reke-dialog.d.ts.map +1 -1
- package/dist/components/reke-dialog/reke-dialog.js +40 -15
- package/dist/components/reke-dialog/reke-dialog.styles.d.ts.map +1 -1
- package/dist/components/reke-dialog/reke-dialog.styles.js +110 -0
- package/dist/components/reke-pie-chart/reke-pie-chart.d.ts +52 -1
- package/dist/components/reke-pie-chart/reke-pie-chart.d.ts.map +1 -1
- package/dist/components/reke-pie-chart/reke-pie-chart.js +181 -42
- package/dist/components/reke-pie-chart/reke-pie-chart.styles.d.ts.map +1 -1
- package/dist/components/reke-pie-chart/reke-pie-chart.styles.js +47 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -20
- package/dist/node_modules/echarts/lib/chart/bar/BarSeries.js +50 -0
- package/dist/node_modules/echarts/lib/chart/bar/BarView.js +431 -0
- package/dist/node_modules/echarts/lib/chart/bar/BaseBarSeries.js +65 -0
- package/dist/node_modules/echarts/lib/chart/bar/install.js +22 -0
- package/dist/node_modules/echarts/lib/chart/helper/Symbol.js +142 -0
- package/dist/node_modules/echarts/lib/chart/helper/SymbolDraw.js +99 -0
- package/dist/node_modules/echarts/lib/chart/helper/axisSnippets.js +19 -0
- package/dist/node_modules/echarts/lib/chart/helper/createClipPathFromCoordSys.js +50 -0
- package/dist/node_modules/echarts/lib/chart/helper/createSeriesData.js +55 -0
- package/dist/node_modules/echarts/lib/chart/helper/createSeriesDataSimply.js +3 -3
- package/dist/node_modules/echarts/lib/chart/helper/labelHelper.js +24 -0
- package/dist/node_modules/echarts/lib/chart/line/LineSeries.js +60 -0
- package/dist/node_modules/echarts/lib/chart/line/LineView.js +471 -0
- package/dist/node_modules/echarts/lib/chart/line/helper.js +34 -0
- package/dist/node_modules/echarts/lib/chart/line/install.js +16 -0
- package/dist/node_modules/echarts/lib/chart/line/lineAnimationDiff.js +59 -0
- package/dist/node_modules/echarts/lib/chart/line/poly.js +135 -0
- package/dist/node_modules/echarts/lib/chart/pie/PieSeries.js +32 -32
- package/dist/node_modules/echarts/lib/chart/pie/PieView.js +69 -69
- package/dist/node_modules/echarts/lib/chart/pie/labelLayout.js +25 -25
- package/dist/node_modules/echarts/lib/chart/pie/pieLayout.js +16 -16
- package/dist/node_modules/echarts/lib/component/axis/AxisBuilder.js +153 -153
- package/dist/node_modules/echarts/lib/component/axis/AxisView.js +13 -13
- package/dist/node_modules/echarts/lib/component/axis/CartesianAxisView.js +106 -0
- package/dist/node_modules/echarts/lib/component/axis/axisSplitHelper.js +50 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/BaseAxisPointer.js +20 -20
- package/dist/node_modules/echarts/lib/component/axisPointer/CartesianAxisPointer.js +30 -30
- package/dist/node_modules/echarts/lib/component/axisPointer/viewHelper.js +13 -13
- package/dist/node_modules/echarts/lib/component/dataZoom/AxisProxy.js +114 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/DataZoomModel.js +189 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/DataZoomView.js +15 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/InsideZoomModel.js +21 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/InsideZoomView.js +67 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/SliderZoomModel.js +75 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/SliderZoomView.js +465 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/dataZoomAction.js +17 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/dataZoomProcessor.js +55 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/helper.js +88 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/installCommon.js +14 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/installDataZoomInside.js +10 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/installDataZoomSlider.js +9 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/roams.js +132 -0
- package/dist/node_modules/echarts/lib/component/grid/install.js +9 -0
- package/dist/node_modules/echarts/lib/component/grid/installSimple.js +32 -0
- package/dist/node_modules/echarts/lib/component/helper/RoamController.js +172 -0
- package/dist/node_modules/echarts/lib/component/helper/cursorHelper.js +17 -0
- package/dist/node_modules/echarts/lib/component/helper/interactionMutex.js +15 -0
- package/dist/node_modules/echarts/lib/component/helper/sliderMove.js +29 -0
- package/dist/node_modules/echarts/lib/component/legend/LegendModel.js +31 -31
- package/dist/node_modules/echarts/lib/component/legend/LegendView.js +61 -61
- package/dist/node_modules/echarts/lib/component/legend/ScrollableLegendView.js +29 -29
- package/dist/node_modules/echarts/lib/component/tooltip/TooltipRichContent.js +4 -4
- package/dist/node_modules/echarts/lib/component/tooltip/TooltipView.js +105 -105
- package/dist/node_modules/echarts/lib/coord/Axis.js +92 -0
- package/dist/node_modules/echarts/lib/coord/CoordinateSystem.js +6 -0
- package/dist/node_modules/echarts/lib/coord/axisAlignTicks.js +76 -0
- package/dist/node_modules/echarts/lib/coord/axisCommonTypes.js +9 -0
- package/dist/node_modules/echarts/lib/coord/axisDefault.js +124 -0
- package/dist/node_modules/echarts/lib/coord/axisHelper.js +123 -14
- package/dist/node_modules/echarts/lib/coord/axisModelCommonMixin.js +9 -0
- package/dist/node_modules/echarts/lib/coord/axisModelCreator.js +39 -0
- package/dist/node_modules/echarts/lib/coord/axisNiceTicks.js +64 -0
- package/dist/node_modules/echarts/lib/coord/axisStatistics.js +101 -22
- package/dist/node_modules/echarts/lib/coord/axisStatisticsMetricsImpl.js +43 -0
- package/dist/node_modules/echarts/lib/coord/axisTickLabelBuilder.js +151 -5
- package/dist/node_modules/echarts/lib/coord/cartesian/Axis2D.js +24 -0
- package/dist/node_modules/echarts/lib/coord/cartesian/AxisModel.js +18 -0
- package/dist/node_modules/echarts/lib/coord/cartesian/Cartesian.js +23 -0
- package/dist/node_modules/echarts/lib/coord/cartesian/Cartesian2D.js +69 -0
- package/dist/node_modules/echarts/lib/coord/cartesian/Grid.js +314 -0
- package/dist/node_modules/echarts/lib/coord/cartesian/GridModel.js +40 -0
- package/dist/node_modules/echarts/lib/coord/cartesian/cartesianAxisHelper.js +43 -12
- package/dist/node_modules/echarts/lib/coord/scaleRawExtentInfo.js +175 -0
- package/dist/node_modules/echarts/lib/core/CoordinateSystem.js +39 -16
- package/dist/node_modules/echarts/lib/core/echarts.js +421 -421
- package/dist/node_modules/echarts/lib/data/OrdinalMeta.js +30 -0
- package/dist/node_modules/echarts/lib/data/SeriesData.js +18 -18
- package/dist/node_modules/echarts/lib/data/helper/createDimensions.js +6 -6
- package/dist/node_modules/echarts/lib/data/helper/dataStackHelper.js +59 -0
- package/dist/node_modules/echarts/lib/data/helper/dataValueHelper.js +13 -13
- package/dist/node_modules/echarts/lib/data/helper/dimensionHelper.js +7 -4
- package/dist/node_modules/echarts/lib/data/helper/sourceHelper.js +40 -8
- package/dist/node_modules/echarts/lib/data/helper/sourceManager.js +3 -3
- package/dist/node_modules/echarts/lib/data/helper/transform.js +8 -8
- package/dist/node_modules/echarts/lib/extension.js +10 -10
- package/dist/node_modules/echarts/lib/label/labelGuideHelper.js +10 -10
- package/dist/node_modules/echarts/lib/label/labelStyle.js +34 -25
- package/dist/node_modules/echarts/lib/label/sectorLabel.js +83 -0
- package/dist/node_modules/echarts/lib/layout/barCommon.js +19 -0
- package/dist/node_modules/echarts/lib/layout/barGrid.js +165 -0
- package/dist/node_modules/echarts/lib/layout/points.js +37 -0
- package/dist/node_modules/echarts/lib/loading/default.js +6 -6
- package/dist/node_modules/echarts/lib/model/Component.js +39 -39
- package/dist/node_modules/echarts/lib/model/Global.js +122 -122
- package/dist/node_modules/echarts/lib/model/Series.js +78 -78
- package/dist/node_modules/echarts/lib/model/referHelper.js +58 -0
- package/dist/node_modules/echarts/lib/processor/dataSample.js +43 -0
- package/dist/node_modules/echarts/lib/scale/Interval.js +68 -0
- package/dist/node_modules/echarts/lib/scale/Log.js +100 -0
- package/dist/node_modules/echarts/lib/scale/Ordinal.js +92 -0
- package/dist/node_modules/echarts/lib/scale/Scale.js +13 -0
- package/dist/node_modules/echarts/lib/scale/Time.js +242 -0
- package/dist/node_modules/echarts/lib/scale/break.js +10 -2
- package/dist/node_modules/echarts/lib/scale/helper.js +61 -3
- package/dist/node_modules/echarts/lib/scale/minorTicks.js +22 -0
- package/dist/node_modules/echarts/lib/scale/scaleMapper.js +89 -7
- package/dist/node_modules/echarts/lib/util/clazz.js +35 -35
- package/dist/node_modules/echarts/lib/util/component.js +16 -16
- package/dist/node_modules/echarts/lib/util/cycleCache.js +4 -1
- package/dist/node_modules/echarts/lib/util/decal.js +11 -11
- package/dist/node_modules/echarts/lib/util/format.js +1 -1
- package/dist/node_modules/echarts/lib/util/graphic.js +170 -170
- package/dist/node_modules/echarts/lib/util/layout.js +23 -23
- package/dist/node_modules/echarts/lib/util/model.js +128 -68
- package/dist/node_modules/echarts/lib/util/number.js +55 -37
- package/dist/node_modules/echarts/lib/util/shape/sausage.js +25 -0
- package/dist/node_modules/echarts/lib/util/states.js +96 -82
- package/dist/node_modules/echarts/lib/util/styleCompat.js +10 -0
- package/dist/node_modules/echarts/lib/util/symbol.js +24 -21
- package/dist/node_modules/echarts/lib/util/time.js +154 -18
- package/dist/node_modules/echarts/lib/util/vendor.js +26 -0
- package/dist/node_modules/echarts/lib/view/Chart.js +19 -19
- package/dist/node_modules/echarts/lib/view/Component.js +7 -7
- package/dist/node_modules/echarts/lib/visual/style.js +5 -5
- package/dist/node_modules/zrender/lib/Element.js +35 -35
- package/dist/node_modules/zrender/lib/canvas/graphic.js +36 -36
- package/dist/node_modules/zrender/lib/core/PathProxy.js +25 -25
- package/dist/node_modules/zrender/lib/core/event.js +4 -1
- package/dist/node_modules/zrender/lib/core/util.js +69 -64
- package/dist/node_modules/zrender/lib/graphic/TSpan.js +7 -7
- package/dist/node_modules/zrender/lib/graphic/Text.js +37 -37
- package/dist/node_modules/zrender/lib/graphic/helper/parseText.js +59 -59
- package/dist/node_modules/zrender/lib/tool/color.js +60 -41
- package/dist/react.d.ts +10 -0
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +85 -73
- package/dist/shared/tailwind.js +1 -1
- package/dist/tokens/reke-tokens.css +1 -0
- package/package.json +5 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { max as e, min as t } from "./vector.js";
|
|
2
|
-
import
|
|
3
|
-
import o from "./
|
|
2
|
+
import n from "./BoundingRect.js";
|
|
3
|
+
import { cubicLength as r, cubicSubdivide as i, quadraticLength as a, quadraticSubdivide as o } from "./curve.js";
|
|
4
4
|
import { devicePixelRatio as s } from "../config.js";
|
|
5
5
|
import { fromArc as c, fromCubic as l, fromLine as u, fromQuadratic as d } from "./bbox.js";
|
|
6
6
|
//#region node_modules/zrender/lib/core/PathProxy.js
|
|
@@ -111,42 +111,42 @@ var A = function() {
|
|
|
111
111
|
}
|
|
112
112
|
}, w.prototype.getBoundingRect = function() {
|
|
113
113
|
h[0] = h[1] = _[0] = _[1] = Number.MAX_VALUE, g[0] = g[1] = v[0] = v[1] = -Number.MAX_VALUE;
|
|
114
|
-
var
|
|
114
|
+
var r = this.data, i = 0, a = 0, o = 0, s = 0, p;
|
|
115
115
|
for (p = 0; p < this._len;) {
|
|
116
|
-
var m =
|
|
117
|
-
switch (y && (
|
|
116
|
+
var m = r[p++], y = p === 1;
|
|
117
|
+
switch (y && (i = r[p], a = r[p + 1], o = i, s = a), m) {
|
|
118
118
|
case f.M:
|
|
119
|
-
|
|
119
|
+
i = o = r[p++], a = s = r[p++], _[0] = o, _[1] = s, v[0] = o, v[1] = s;
|
|
120
120
|
break;
|
|
121
121
|
case f.L:
|
|
122
|
-
u(
|
|
122
|
+
u(i, a, r[p], r[p + 1], _, v), i = r[p++], a = r[p++];
|
|
123
123
|
break;
|
|
124
124
|
case f.C:
|
|
125
|
-
l(
|
|
125
|
+
l(i, a, r[p++], r[p++], r[p++], r[p++], r[p], r[p + 1], _, v), i = r[p++], a = r[p++];
|
|
126
126
|
break;
|
|
127
127
|
case f.Q:
|
|
128
|
-
d(
|
|
128
|
+
d(i, a, r[p++], r[p++], r[p], r[p + 1], _, v), i = r[p++], a = r[p++];
|
|
129
129
|
break;
|
|
130
130
|
case f.A:
|
|
131
|
-
var b =
|
|
131
|
+
var b = r[p++], C = r[p++], w = r[p++], T = r[p++], E = r[p++], D = r[p++] + E;
|
|
132
132
|
p += 1;
|
|
133
|
-
var O = !
|
|
134
|
-
y && (
|
|
133
|
+
var O = !r[p++];
|
|
134
|
+
y && (o = x(E) * w + b, s = S(E) * T + C), c(b, C, w, T, E, D, O, _, v), i = x(D) * w + b, a = S(D) * T + C;
|
|
135
135
|
break;
|
|
136
136
|
case f.R:
|
|
137
|
-
|
|
138
|
-
var k =
|
|
139
|
-
u(
|
|
137
|
+
o = i = r[p++], s = a = r[p++];
|
|
138
|
+
var k = r[p++], A = r[p++];
|
|
139
|
+
u(o, s, o + k, s + A, _, v);
|
|
140
140
|
break;
|
|
141
141
|
case f.Z:
|
|
142
|
-
|
|
142
|
+
i = o, a = s;
|
|
143
143
|
break;
|
|
144
144
|
}
|
|
145
145
|
t(h, h, _), e(g, g, v);
|
|
146
146
|
}
|
|
147
|
-
return p === 0 && (h[0] = h[1] = g[0] = g[1] = 0), new
|
|
147
|
+
return p === 0 && (h[0] = h[1] = g[0] = g[1] = 0), new n(h[0], h[1], g[0] - h[0], g[1] - h[1]);
|
|
148
148
|
}, w.prototype._calculateLength = function() {
|
|
149
|
-
var e = this.data, t = this._len,
|
|
149
|
+
var e = this.data, t = this._len, n = this._ux, i = this._uy, o = 0, s = 0, c = 0, l = 0;
|
|
150
150
|
this._pathSegLen ||= [];
|
|
151
151
|
for (var u = this._pathSegLen, d = 0, p = 0, m = 0; m < t;) {
|
|
152
152
|
var h = e[m++], g = m === 1;
|
|
@@ -158,15 +158,15 @@ var A = function() {
|
|
|
158
158
|
break;
|
|
159
159
|
case f.L:
|
|
160
160
|
var v = e[m++], w = e[m++], E = v - o, D = w - s;
|
|
161
|
-
(C(E) >
|
|
161
|
+
(C(E) > n || C(D) > i || m === t - 1) && (_ = Math.sqrt(E * E + D * D), o = v, s = w);
|
|
162
162
|
break;
|
|
163
163
|
case f.C:
|
|
164
164
|
var O = e[m++], k = e[m++], v = e[m++], w = e[m++], A = e[m++], j = e[m++];
|
|
165
|
-
_ =
|
|
165
|
+
_ = r(o, s, O, k, v, w, A, j, 10), o = A, s = j;
|
|
166
166
|
break;
|
|
167
167
|
case f.Q:
|
|
168
168
|
var O = e[m++], k = e[m++], v = e[m++], w = e[m++];
|
|
169
|
-
_ =
|
|
169
|
+
_ = a(o, s, O, k, v, w, 10), o = v, s = w;
|
|
170
170
|
break;
|
|
171
171
|
case f.A:
|
|
172
172
|
var M = e[m++], N = e[m++], P = e[m++], F = e[m++], I = e[m++], L = e[m++], R = L + I;
|
|
@@ -186,7 +186,7 @@ var A = function() {
|
|
|
186
186
|
}
|
|
187
187
|
return this._pathLen = d, d;
|
|
188
188
|
}, w.prototype.rebuildPath = function(e, t) {
|
|
189
|
-
var n = this.data,
|
|
189
|
+
var n = this.data, r = this._ux, a = this._uy, s = this._len, c, l, u, d, h, g, _ = t < 1, v, w, T = 0, E = 0, D, O = 0, k, A;
|
|
190
190
|
if (!(_ && (this._pathSegLen || this._calculateLength(), v = this._pathSegLen, w = this._pathLen, D = t * w, !D))) lo: for (var j = 0; j < s;) {
|
|
191
191
|
var M = n[j++], N = j === 1;
|
|
192
192
|
switch (N && (u = n[j], d = n[j + 1], c = u, l = d), M !== f.L && O > 0 && (e.lineTo(k, A), O = 0), M) {
|
|
@@ -196,7 +196,7 @@ var A = function() {
|
|
|
196
196
|
case f.L:
|
|
197
197
|
h = n[j++], g = n[j++];
|
|
198
198
|
var P = C(h - u), F = C(g - d);
|
|
199
|
-
if (P >
|
|
199
|
+
if (P > r || F > a) {
|
|
200
200
|
if (_) {
|
|
201
201
|
var I = v[E++];
|
|
202
202
|
if (T + I > D) {
|
|
@@ -218,7 +218,7 @@ var A = function() {
|
|
|
218
218
|
var I = v[E++];
|
|
219
219
|
if (T + I > D) {
|
|
220
220
|
var L = (D - T) / I;
|
|
221
|
-
|
|
221
|
+
i(u, z, V, U, L, p), i(d, B, H, W, L, m), e.bezierCurveTo(p[1], m[1], p[2], m[2], p[3], m[3]);
|
|
222
222
|
break lo;
|
|
223
223
|
}
|
|
224
224
|
T += I;
|
|
@@ -231,7 +231,7 @@ var A = function() {
|
|
|
231
231
|
var I = v[E++];
|
|
232
232
|
if (T + I > D) {
|
|
233
233
|
var L = (D - T) / I;
|
|
234
|
-
|
|
234
|
+
o(u, z, V, L, p), o(d, B, H, L, m), e.quadraticCurveTo(p[1], m[1], p[2], m[2]);
|
|
235
235
|
break lo;
|
|
236
236
|
}
|
|
237
237
|
T += I;
|
|
@@ -54,5 +54,8 @@ function f(e, t, n, r) {
|
|
|
54
54
|
var p = function(e) {
|
|
55
55
|
e.preventDefault(), e.stopPropagation(), e.cancelBubble = !0;
|
|
56
56
|
};
|
|
57
|
+
function m(e) {
|
|
58
|
+
return e.which === 2 || e.which === 3;
|
|
59
|
+
}
|
|
57
60
|
//#endregion
|
|
58
|
-
export { d as addEventListener, o as clientToLocal, c as getNativeEvent, l as normalizeEvent, f as removeEventListener, p as stop };
|
|
61
|
+
export { d as addEventListener, o as clientToLocal, c as getNativeEvent, m as isMiddleOrRightButtonOnMouseUpDown, l as normalizeEvent, f as removeEventListener, p as stop };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { platformApi as e } from "./platform.js";
|
|
2
2
|
//#region node_modules/zrender/lib/core/util.js
|
|
3
|
-
var t =
|
|
3
|
+
var t = E([
|
|
4
4
|
"Function",
|
|
5
5
|
"RegExp",
|
|
6
6
|
"Date",
|
|
@@ -11,7 +11,7 @@ var t = T([
|
|
|
11
11
|
"Canvas"
|
|
12
12
|
], function(e, t) {
|
|
13
13
|
return e["[object " + t + "]"] = !0, e;
|
|
14
|
-
}, {}), n =
|
|
14
|
+
}, {}), n = E([
|
|
15
15
|
"Int8",
|
|
16
16
|
"Uint8",
|
|
17
17
|
"Uint8Clamped",
|
|
@@ -48,14 +48,14 @@ function h(e) {
|
|
|
48
48
|
for (var o = 0, s = e.length; o < s; o++) i[o] = e[o];
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
} else if (!t[a] && !Z(e) && !
|
|
51
|
+
} else if (!t[a] && !Z(e) && !z(e)) for (var l in i = {}, e) e.hasOwnProperty(l) && l !== d && (i[l] = h(e[l]));
|
|
52
52
|
return i;
|
|
53
53
|
}
|
|
54
54
|
function g(e, t, n) {
|
|
55
|
-
if (!
|
|
55
|
+
if (!I(t) || !I(e)) return n ? h(t) : e;
|
|
56
56
|
for (var r in t) if (t.hasOwnProperty(r) && r !== d) {
|
|
57
57
|
var i = e[r], a = t[r];
|
|
58
|
-
|
|
58
|
+
I(a) && I(i) && !j(a) && !j(i) && !z(a) && !z(i) && !L(a) && !L(i) && !Z(a) && !Z(i) ? g(i, a, n) : (n || !(r in e)) && (e[r] = h(t[r]));
|
|
59
59
|
}
|
|
60
60
|
return e;
|
|
61
61
|
}
|
|
@@ -64,7 +64,7 @@ function _(e, t) {
|
|
|
64
64
|
else for (var n in t) t.hasOwnProperty(n) && n !== d && (e[n] = t[n]);
|
|
65
65
|
return e;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function v(e, t, n) {
|
|
68
68
|
e ||= {};
|
|
69
69
|
for (var r = 0; r < n.length; r++) {
|
|
70
70
|
var i = n[r];
|
|
@@ -72,136 +72,141 @@ function te(e, t, n) {
|
|
|
72
72
|
}
|
|
73
73
|
return e;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
for (var r =
|
|
75
|
+
function y(e, t, n) {
|
|
76
|
+
for (var r = D(t), i = 0, a = r.length; i < a; i++) {
|
|
77
77
|
var o = r[i];
|
|
78
78
|
(n ? t[o] != null : e[o] == null) && (e[o] = t[o]);
|
|
79
79
|
}
|
|
80
80
|
return e;
|
|
81
81
|
}
|
|
82
82
|
e.createCanvas;
|
|
83
|
-
function
|
|
83
|
+
function b(e, t) {
|
|
84
84
|
if (e) {
|
|
85
85
|
if (e.indexOf) return e.indexOf(t);
|
|
86
86
|
for (var n = 0, r = e.length; n < r; n++) if (e[n] === t) return n;
|
|
87
87
|
}
|
|
88
88
|
return -1;
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function x(e, t) {
|
|
91
91
|
var n = e.prototype;
|
|
92
92
|
function r() {}
|
|
93
93
|
for (var i in r.prototype = t.prototype, e.prototype = new r(), n) n.hasOwnProperty(i) && (e.prototype[i] = n[i]);
|
|
94
94
|
e.prototype.constructor = e, e.superClass = t;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function S(e, t, n) {
|
|
97
97
|
if (e = "prototype" in e ? e.prototype : e, t = "prototype" in t ? t.prototype : t, Object.getOwnPropertyNames) for (var r = Object.getOwnPropertyNames(t), i = 0; i < r.length; i++) {
|
|
98
98
|
var a = r[i];
|
|
99
99
|
a !== "constructor" && (n ? t[a] != null : e[a] == null) && (e[a] = t[a]);
|
|
100
100
|
}
|
|
101
|
-
else
|
|
101
|
+
else y(e, t, n);
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function C(e) {
|
|
104
104
|
return !e || typeof e == "string" ? !1 : typeof e.length == "number";
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function w(e, t, n) {
|
|
107
107
|
if (e && t) if (e.forEach && e.forEach === a) e.forEach(t, n);
|
|
108
108
|
else if (e.length === +e.length) for (var r = 0, i = e.length; r < i; r++) t.call(n, e[r], r, e);
|
|
109
109
|
else for (var o in e) e.hasOwnProperty(o) && t.call(n, e[o], o, e);
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function T(e, t, n) {
|
|
112
112
|
if (!e) return [];
|
|
113
|
-
if (!t) return
|
|
113
|
+
if (!t) return K(e);
|
|
114
114
|
if (e.map && e.map === c) return e.map(t, n);
|
|
115
115
|
for (var r = [], i = 0, a = e.length; i < a; i++) r.push(t.call(n, e[i], i, e));
|
|
116
116
|
return r;
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function E(e, t, n, r) {
|
|
119
119
|
if (e && t) {
|
|
120
120
|
for (var i = 0, a = e.length; i < a; i++) n = t.call(r, n, e[i], i, e);
|
|
121
121
|
return n;
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function te(e, t, n) {
|
|
125
125
|
if (!e) return [];
|
|
126
|
-
if (!t) return
|
|
126
|
+
if (!t) return K(e);
|
|
127
127
|
if (e.filter && e.filter === o) return e.filter(t, n);
|
|
128
128
|
for (var r = [], i = 0, a = e.length; i < a; i++) t.call(n, e[i], i, e) && r.push(e[i]);
|
|
129
129
|
return r;
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function ne(e, t, n) {
|
|
132
|
+
if (e && t) {
|
|
133
|
+
for (var r = 0, i = e.length; r < i; r++) if (t.call(n, e[r], r, e)) return e[r];
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
function D(e) {
|
|
132
137
|
if (!e) return [];
|
|
133
138
|
if (Object.keys) return Object.keys(e);
|
|
134
139
|
var t = [];
|
|
135
140
|
for (var n in e) e.hasOwnProperty(n) && t.push(n);
|
|
136
141
|
return t;
|
|
137
142
|
}
|
|
138
|
-
function
|
|
143
|
+
function O(e, t) {
|
|
139
144
|
var n = [...arguments].slice(2);
|
|
140
145
|
return function() {
|
|
141
146
|
return e.apply(t, n.concat(s.call(arguments)));
|
|
142
147
|
};
|
|
143
148
|
}
|
|
144
|
-
var
|
|
145
|
-
function
|
|
149
|
+
var k = u && M(u.bind) ? u.call.bind(u.bind) : O;
|
|
150
|
+
function A(e) {
|
|
146
151
|
var t = [...arguments].slice(1);
|
|
147
152
|
return function() {
|
|
148
153
|
return e.apply(this, t.concat(s.call(arguments)));
|
|
149
154
|
};
|
|
150
155
|
}
|
|
151
|
-
function
|
|
156
|
+
function j(e) {
|
|
152
157
|
return Array.isArray ? Array.isArray(e) : r.call(e) === "[object Array]";
|
|
153
158
|
}
|
|
154
|
-
function
|
|
159
|
+
function M(e) {
|
|
155
160
|
return typeof e == "function";
|
|
156
161
|
}
|
|
157
|
-
function
|
|
162
|
+
function N(e) {
|
|
158
163
|
return typeof e == "string";
|
|
159
164
|
}
|
|
160
|
-
function
|
|
165
|
+
function P(e) {
|
|
161
166
|
return r.call(e) === "[object String]";
|
|
162
167
|
}
|
|
163
|
-
function
|
|
168
|
+
function F(e) {
|
|
164
169
|
return typeof e == "number";
|
|
165
170
|
}
|
|
166
|
-
function
|
|
171
|
+
function I(e) {
|
|
167
172
|
var t = typeof e;
|
|
168
173
|
return t === "function" || !!e && t === "object";
|
|
169
174
|
}
|
|
170
|
-
function
|
|
175
|
+
function L(e) {
|
|
171
176
|
return !!t[r.call(e)];
|
|
172
177
|
}
|
|
173
|
-
function
|
|
178
|
+
function R(e) {
|
|
174
179
|
return !!n[r.call(e)];
|
|
175
180
|
}
|
|
176
|
-
function
|
|
181
|
+
function z(e) {
|
|
177
182
|
return typeof e == "object" && typeof e.nodeType == "number" && typeof e.ownerDocument == "object";
|
|
178
183
|
}
|
|
179
|
-
function
|
|
184
|
+
function B(e) {
|
|
180
185
|
return e.colorStops != null;
|
|
181
186
|
}
|
|
182
|
-
function
|
|
187
|
+
function V(e) {
|
|
183
188
|
return e.image != null;
|
|
184
189
|
}
|
|
185
|
-
function
|
|
190
|
+
function H(e) {
|
|
186
191
|
return r.call(e) === "[object RegExp]";
|
|
187
192
|
}
|
|
188
|
-
function
|
|
193
|
+
function re(e) {
|
|
189
194
|
return e !== e;
|
|
190
195
|
}
|
|
191
|
-
function
|
|
196
|
+
function U() {
|
|
192
197
|
for (var e = [...arguments], t = 0, n = e.length; t < n; t++) if (e[t] != null) return e[t];
|
|
193
198
|
}
|
|
194
|
-
function
|
|
199
|
+
function W(e, t) {
|
|
195
200
|
return e ?? t;
|
|
196
201
|
}
|
|
197
|
-
function
|
|
202
|
+
function G(e, t, n) {
|
|
198
203
|
return e ?? t ?? n;
|
|
199
204
|
}
|
|
200
|
-
function
|
|
205
|
+
function K(e) {
|
|
201
206
|
var t = [...arguments].slice(1);
|
|
202
207
|
return s.apply(e, t);
|
|
203
208
|
}
|
|
204
|
-
function
|
|
209
|
+
function q(e) {
|
|
205
210
|
if (typeof e == "number") return [
|
|
206
211
|
e,
|
|
207
212
|
e,
|
|
@@ -221,20 +226,20 @@ function K(e) {
|
|
|
221
226
|
e[1]
|
|
222
227
|
] : e;
|
|
223
228
|
}
|
|
224
|
-
function
|
|
229
|
+
function J(e, t) {
|
|
225
230
|
if (!e) throw Error(t);
|
|
226
231
|
}
|
|
227
|
-
function
|
|
232
|
+
function Y(e) {
|
|
228
233
|
return e == null ? null : typeof e.trim == "function" ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
229
234
|
}
|
|
230
|
-
var
|
|
231
|
-
function
|
|
232
|
-
e[
|
|
235
|
+
var X = "__ec_primitive__";
|
|
236
|
+
function ie(e) {
|
|
237
|
+
e[X] = !0;
|
|
233
238
|
}
|
|
234
239
|
function Z(e) {
|
|
235
|
-
return e[
|
|
240
|
+
return e[X];
|
|
236
241
|
}
|
|
237
|
-
var
|
|
242
|
+
var ae = function() {
|
|
238
243
|
function e() {
|
|
239
244
|
this.data = {};
|
|
240
245
|
}
|
|
@@ -248,21 +253,21 @@ var ie = function() {
|
|
|
248
253
|
}, e.prototype.set = function(e, t) {
|
|
249
254
|
return this.data[e] = t, this;
|
|
250
255
|
}, e.prototype.keys = function() {
|
|
251
|
-
return
|
|
256
|
+
return D(this.data);
|
|
252
257
|
}, e.prototype.forEach = function(e) {
|
|
253
258
|
var t = this.data;
|
|
254
259
|
for (var n in t) t.hasOwnProperty(n) && e(t[n], n);
|
|
255
260
|
}, e;
|
|
256
261
|
}(), Q = typeof Map == "function";
|
|
257
|
-
function
|
|
258
|
-
return Q ? /* @__PURE__ */ new Map() : new
|
|
262
|
+
function oe() {
|
|
263
|
+
return Q ? /* @__PURE__ */ new Map() : new ae();
|
|
259
264
|
}
|
|
260
|
-
var
|
|
265
|
+
var se = function() {
|
|
261
266
|
function e(t) {
|
|
262
|
-
var n =
|
|
263
|
-
this.data =
|
|
267
|
+
var n = j(t);
|
|
268
|
+
this.data = oe();
|
|
264
269
|
var r = this;
|
|
265
|
-
t instanceof e ? t.each(i) : t &&
|
|
270
|
+
t instanceof e ? t.each(i) : t && w(t, i);
|
|
266
271
|
function i(e, t) {
|
|
267
272
|
n ? r.set(e, t) : r.set(t, e);
|
|
268
273
|
}
|
|
@@ -284,15 +289,15 @@ var oe = function() {
|
|
|
284
289
|
this.data.delete(e);
|
|
285
290
|
}, e;
|
|
286
291
|
}();
|
|
287
|
-
function
|
|
288
|
-
return new
|
|
292
|
+
function ce(e) {
|
|
293
|
+
return new se(e);
|
|
289
294
|
}
|
|
290
|
-
function
|
|
295
|
+
function le(e, t) {
|
|
291
296
|
for (var n = new e.constructor(e.length + t.length), r = 0; r < e.length; r++) n[r] = e[r];
|
|
292
297
|
for (var i = e.length, r = 0; r < t.length; r++) n[r + i] = t[r];
|
|
293
298
|
return n;
|
|
294
299
|
}
|
|
295
|
-
function
|
|
300
|
+
function $(e, t) {
|
|
296
301
|
var n;
|
|
297
302
|
if (Object.create) n = Object.create(e);
|
|
298
303
|
else {
|
|
@@ -301,14 +306,14 @@ function ce(e, t) {
|
|
|
301
306
|
}
|
|
302
307
|
return t && _(n, t), n;
|
|
303
308
|
}
|
|
304
|
-
function
|
|
309
|
+
function ue(e) {
|
|
305
310
|
var t = e.style;
|
|
306
311
|
t.webkitUserSelect = "none", t.userSelect = "none", t.webkitTapHighlightColor = "rgba(0,0,0,0)", t["-webkit-touch-callout"] = "none";
|
|
307
312
|
}
|
|
308
|
-
function
|
|
313
|
+
function de(e, t) {
|
|
309
314
|
return e.hasOwnProperty(t);
|
|
310
315
|
}
|
|
311
|
-
function
|
|
312
|
-
var
|
|
316
|
+
function fe() {}
|
|
317
|
+
var pe = 180 / Math.PI;
|
|
313
318
|
//#endregion
|
|
314
|
-
export {
|
|
319
|
+
export { pe as RADIAN_TO_DEGREE, J as assert, v as assignProps, k as bind, h as clone, le as concatArray, ce as createHashMap, $ as createObject, A as curry, y as defaults, ue as disableUserSelect, w as each, re as eqNaN, _ as extend, te as filter, ne as find, m as guid, de as hasOwn, b as indexOf, x as inherits, j as isArray, C as isArrayLike, z as isDom, M as isFunction, B as isGradientObject, V as isImagePatternObject, F as isNumber, I as isObject, H as isRegExp, N as isString, P as isStringSafe, R as isTypedArray, D as keys, ee as logError, T as map, g as merge, S as mixin, fe as noop, q as normalizeCssArray, E as reduce, U as retrieve, W as retrieve2, G as retrieve3, ie as setAsPrimitive, K as slice, Y as trim };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DEFAULT_FONT as e } from "../core/platform.js";
|
|
2
2
|
import { createObject as t, defaults as n } from "../core/util.js";
|
|
3
3
|
import { __extends as r } from "../../node_modules/tslib/tslib.es6.js";
|
|
4
|
-
import i from "./
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
4
|
+
import { tSpanCreateBoundingRect as i, tSpanHasStroke as a } from "./helper/parseText.js";
|
|
5
|
+
import o from "./Displayable.js";
|
|
6
|
+
import { DEFAULT_PATH_STYLE as s } from "./Path.js";
|
|
7
7
|
//#region node_modules/zrender/lib/graphic/TSpan.js
|
|
8
8
|
var c = n({
|
|
9
9
|
strokeFirst: !0,
|
|
@@ -13,13 +13,13 @@ var c = n({
|
|
|
13
13
|
textAlign: "left",
|
|
14
14
|
textBaseline: "top",
|
|
15
15
|
miterLimit: 2
|
|
16
|
-
},
|
|
16
|
+
}, s), l = function(e) {
|
|
17
17
|
r(n, e);
|
|
18
18
|
function n() {
|
|
19
19
|
return e !== null && e.apply(this, arguments) || this;
|
|
20
20
|
}
|
|
21
21
|
return n.prototype.hasStroke = function() {
|
|
22
|
-
return
|
|
22
|
+
return a(this.style);
|
|
23
23
|
}, n.prototype.hasFill = function() {
|
|
24
24
|
var e = this.style.fill;
|
|
25
25
|
return e != null && e !== "none";
|
|
@@ -28,12 +28,12 @@ var c = n({
|
|
|
28
28
|
}, n.prototype.setBoundingRect = function(e) {
|
|
29
29
|
this._rect = e;
|
|
30
30
|
}, n.prototype.getBoundingRect = function() {
|
|
31
|
-
return this._rect ||=
|
|
31
|
+
return this._rect ||= i(this.style), this._rect;
|
|
32
32
|
}, n.initDefaultProps = (function() {
|
|
33
33
|
var e = n.prototype;
|
|
34
34
|
e.dirtyRectTolerance = 10;
|
|
35
35
|
})(), n;
|
|
36
|
-
}(
|
|
36
|
+
}(o);
|
|
37
37
|
l.prototype.type = "tspan";
|
|
38
38
|
//#endregion
|
|
39
39
|
export { l as default };
|
|
@@ -3,10 +3,10 @@ import { defaults as e, each as t, extend as n, keys as r, normalizeCssArray as
|
|
|
3
3
|
import { __extends as c } from "../../node_modules/tslib/tslib.es6.js";
|
|
4
4
|
import l from "../core/BoundingRect.js";
|
|
5
5
|
import { adjustTextX as u, adjustTextY as d } from "../contain/text.js";
|
|
6
|
-
import f,
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import y from "./
|
|
6
|
+
import { calcInnerTextOverflowArea as f, parsePlainText as p, parseRichText as m, tSpanCreateBoundingRect2 as h } from "./helper/parseText.js";
|
|
7
|
+
import g, { DEFAULT_COMMON_ANIMATION_PROPS as _ } from "./Displayable.js";
|
|
8
|
+
import v from "./TSpan.js";
|
|
9
|
+
import y from "./Image.js";
|
|
10
10
|
import b from "./shape/Rect.js";
|
|
11
11
|
//#region node_modules/zrender/lib/graphic/Text.js
|
|
12
12
|
var x = { fill: "#000" }, S = 2, C = {}, w = { style: e({
|
|
@@ -28,7 +28,7 @@ var x = { fill: "#000" }, S = 2, C = {}, w = { style: e({
|
|
|
28
28
|
borderColor: !0,
|
|
29
29
|
borderWidth: !0,
|
|
30
30
|
borderRadius: !0
|
|
31
|
-
},
|
|
31
|
+
}, _.style) }, T = function(e) {
|
|
32
32
|
c(t, e);
|
|
33
33
|
function t(t) {
|
|
34
34
|
var n = e.call(this) || this;
|
|
@@ -87,32 +87,32 @@ var x = { fill: "#000" }, S = 2, C = {}, w = { style: e({
|
|
|
87
87
|
return (!t || !(t instanceof e)) && (t = new e()), this._children[this._childCursor++] = t, t.__zr = this.__zr, t.parent = this, t;
|
|
88
88
|
}, t.prototype._updatePlainTexts = function() {
|
|
89
89
|
var e = this.style, t = e.font || "12px sans-serif", n = e.padding, r = this._defaultStyle, i = e.x || 0, a = e.y || 0, o = e.align || r.align || "left", s = e.verticalAlign || r.verticalAlign || "top";
|
|
90
|
-
|
|
91
|
-
var c =
|
|
90
|
+
f(C, r.overflowRect, i, a, o, s), i = C.baseX, a = C.baseY;
|
|
91
|
+
var c = p(L(e), e, C.outerWidth, C.outerHeight), l = R(e), m = !!e.backgroundColor, g = c.outerHeight, _ = c.outerWidth, y = c.lines, b = c.lineHeight;
|
|
92
92
|
this.isTruncated = !!c.isTruncated;
|
|
93
93
|
var x = i, w = d(a, c.contentHeight, s);
|
|
94
94
|
if (l || n) {
|
|
95
|
-
var T = u(i,
|
|
96
|
-
l && this._renderBackground(e, e, T, E,
|
|
95
|
+
var T = u(i, _, o), E = d(a, g, s);
|
|
96
|
+
l && this._renderBackground(e, e, T, E, _, g);
|
|
97
97
|
}
|
|
98
98
|
w += b / 2, n && (x = I(i, o, n), s === "top" ? w += n[0] : s === "bottom" && (w -= n[2]));
|
|
99
|
-
for (var D = 0, O = !1, k = !1, j = F("fill" in e ? e.fill : (k = !0, r.fill)), M = P("stroke" in e ? e.stroke : !
|
|
100
|
-
var B = this._getOrCreateChild(
|
|
101
|
-
B.useStyle(V), V.text =
|
|
99
|
+
for (var D = 0, O = !1, k = !1, j = F("fill" in e ? e.fill : (k = !0, r.fill)), M = P("stroke" in e ? e.stroke : !m && (!r.autoStroke || k) ? (D = S, O = !0, r.stroke) : null), N = e.textShadowBlur > 0, z = 0; z < y.length; z++) {
|
|
100
|
+
var B = this._getOrCreateChild(v), V = B.createStyle();
|
|
101
|
+
B.useStyle(V), V.text = y[z], V.x = x, V.y = w, o && (V.textAlign = o), V.textBaseline = "middle", V.opacity = e.opacity, V.strokeFirst = !0, N && (V.shadowBlur = e.textShadowBlur || 0, V.shadowColor = e.textShadowColor || "transparent", V.shadowOffsetX = e.textShadowOffsetX || 0, V.shadowOffsetY = e.textShadowOffsetY || 0), V.stroke = M, V.fill = j, M && (V.lineWidth = e.lineWidth || D, V.lineDash = e.lineDash, V.lineDashOffset = e.lineDashOffset || 0), V.font = t, A(V, e), w += b, B.setBoundingRect(h(V, c.contentWidth, c.calculatedLineHeight, O ? 0 : null));
|
|
102
102
|
}
|
|
103
103
|
}, t.prototype._updateRichTexts = function() {
|
|
104
104
|
var e = this.style, t = this._defaultStyle, n = e.align || t.align, r = e.verticalAlign || t.verticalAlign, i = e.x || 0, a = e.y || 0;
|
|
105
|
-
|
|
106
|
-
var o =
|
|
105
|
+
f(C, t.overflowRect, i, a, n, r), i = C.baseX, a = C.baseY;
|
|
106
|
+
var o = m(L(e), e, C.outerWidth, C.outerHeight, n), s = o.width, c = o.outerWidth, l = o.outerHeight, p = e.padding;
|
|
107
107
|
this.isTruncated = !!o.isTruncated;
|
|
108
|
-
var
|
|
109
|
-
|
|
110
|
-
var y =
|
|
111
|
-
R(e) && this._renderBackground(e, e,
|
|
108
|
+
var h = u(i, c, n), g = d(a, l, r), _ = h, v = g;
|
|
109
|
+
p && (_ += p[3], v += p[0]);
|
|
110
|
+
var y = _ + s;
|
|
111
|
+
R(e) && this._renderBackground(e, e, h, g, c, l);
|
|
112
112
|
for (var b = !!e.backgroundColor, x = 0; x < o.lines.length; x++) {
|
|
113
|
-
for (var S = o.lines[x], w = S.tokens, T = w.length, E = S.lineHeight, D = S.width, O = 0, k =
|
|
113
|
+
for (var S = o.lines[x], w = S.tokens, T = w.length, E = S.lineHeight, D = S.width, O = 0, k = _, A = y, j = T - 1, M = void 0; O < T && (M = w[O], !M.align || M.align === "left");) this._placeToken(M, e, E, v, k, "left", b), D -= M.width, k += M.width, O++;
|
|
114
114
|
for (; j >= 0 && (M = w[j], M.align === "right");) this._placeToken(M, e, E, v, A, "right", b), D -= M.width, A -= M.width, j--;
|
|
115
|
-
for (k += (s - (k -
|
|
115
|
+
for (k += (s - (k - _) - (y - A) - D) / 2; O <= j;) M = w[O], this._placeToken(M, e, E, v, k + M.width / 2, "center", b), k += M.width, O++;
|
|
116
116
|
v += E;
|
|
117
117
|
}
|
|
118
118
|
}, t.prototype._placeToken = function(e, t, n, r, i, s, c) {
|
|
@@ -122,32 +122,32 @@ var x = { fill: "#000" }, S = 2, C = {}, w = { style: e({
|
|
|
122
122
|
u === "top" ? d = r + e.height / 2 : u === "bottom" && (d = r + n - e.height / 2), !e.isLineHolder && R(l) && this._renderBackground(l, t, s === "right" ? i - e.width : s === "center" ? i - e.width / 2 : i, d - e.height / 2, e.width, e.height);
|
|
123
123
|
var f = !!l.backgroundColor, p = e.textPadding;
|
|
124
124
|
p && (i = I(i, s, p), d -= e.height / 2 - p[0] - e.innerHeight / 2);
|
|
125
|
-
var m = this._getOrCreateChild(
|
|
126
|
-
m.useStyle(
|
|
127
|
-
var
|
|
128
|
-
|
|
125
|
+
var m = this._getOrCreateChild(v), g = m.createStyle();
|
|
126
|
+
m.useStyle(g);
|
|
127
|
+
var _ = this._defaultStyle, y = !1, b = 0, x = !1, C = F("fill" in l ? l.fill : "fill" in t ? t.fill : (y = !0, _.fill)), w = P("stroke" in l ? l.stroke : "stroke" in t ? t.stroke : !f && !c && (!_.autoStroke || y) ? (b = S, x = !0, _.stroke) : null), T = l.textShadowBlur > 0 || t.textShadowBlur > 0;
|
|
128
|
+
g.text = e.text, g.x = i, g.y = d, T && (g.shadowBlur = l.textShadowBlur || t.textShadowBlur || 0, g.shadowColor = l.textShadowColor || t.textShadowColor || "transparent", g.shadowOffsetX = l.textShadowOffsetX || t.textShadowOffsetX || 0, g.shadowOffsetY = l.textShadowOffsetY || t.textShadowOffsetY || 0), g.textAlign = s, g.textBaseline = "middle", g.font = e.font || "12px sans-serif", g.opacity = o(l.opacity, t.opacity, 1), A(g, l), w && (g.lineWidth = o(l.lineWidth, t.lineWidth, b), g.lineDash = a(l.lineDash, t.lineDash), g.lineDashOffset = t.lineDashOffset || 0, g.stroke = w), C && (g.fill = C), m.setBoundingRect(h(g, e.contentWidth, e.contentHeight, x ? 0 : null));
|
|
129
129
|
}, t.prototype._renderBackground = function(e, t, n, r, i, s) {
|
|
130
|
-
var c = e.backgroundColor, l = e.borderWidth, u = e.borderColor, d = c && c.image, f = c && !d, p = e.borderRadius,
|
|
130
|
+
var c = e.backgroundColor, l = e.borderWidth, u = e.borderColor, d = c && c.image, f = c && !d, p = e.borderRadius, m = this, h, g;
|
|
131
131
|
if (f || e.lineHeight || l && u) {
|
|
132
|
-
|
|
133
|
-
var
|
|
134
|
-
|
|
132
|
+
h = this._getOrCreateChild(b), h.useStyle(h.createStyle()), h.style.fill = null;
|
|
133
|
+
var _ = h.shape;
|
|
134
|
+
_.x = n, _.y = r, _.width = i, _.height = s, _.r = p, h.dirtyShape();
|
|
135
135
|
}
|
|
136
136
|
if (f) {
|
|
137
|
-
var
|
|
138
|
-
|
|
137
|
+
var v = h.style;
|
|
138
|
+
v.fill = c || null, v.fillOpacity = a(e.fillOpacity, 1);
|
|
139
139
|
} else if (d) {
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
g = this._getOrCreateChild(y), g.onload = function() {
|
|
141
|
+
m.dirtyStyle();
|
|
142
142
|
};
|
|
143
|
-
var x =
|
|
143
|
+
var x = g.style;
|
|
144
144
|
x.image = c.image, x.x = n, x.y = r, x.width = i, x.height = s;
|
|
145
145
|
}
|
|
146
146
|
if (l && u) {
|
|
147
|
-
var
|
|
148
|
-
|
|
147
|
+
var v = h.style;
|
|
148
|
+
v.lineWidth = l, v.stroke = u, v.strokeOpacity = a(e.strokeOpacity, 1), v.lineDash = e.borderDash, v.lineDashOffset = e.borderDashOffset || 0, h.strokeContainThreshold = 0, h.hasFill() && h.hasStroke() && (v.strokeFirst = !0, v.lineWidth *= 2);
|
|
149
149
|
}
|
|
150
|
-
var S = (
|
|
150
|
+
var S = (h || g).style;
|
|
151
151
|
S.shadowBlur = e.shadowBlur || 0, S.shadowColor = e.shadowColor || "transparent", S.shadowOffsetX = e.shadowOffsetX || 0, S.shadowOffsetY = e.shadowOffsetY || 0, S.opacity = o(e.opacity, t.opacity, 1);
|
|
152
152
|
}, t.makeFont = function(e) {
|
|
153
153
|
var t = "";
|
|
@@ -158,7 +158,7 @@ var x = { fill: "#000" }, S = 2, C = {}, w = { style: e({
|
|
|
158
158
|
e.fontFamily || "sans-serif"
|
|
159
159
|
].join(" ")), t && s(t) || e.textFont || e.font;
|
|
160
160
|
}, t;
|
|
161
|
-
}(
|
|
161
|
+
}(g), E = {
|
|
162
162
|
left: !0,
|
|
163
163
|
right: 1,
|
|
164
164
|
center: 1
|