@visactor/vrender-components 0.14.6-alpha.9 → 0.14.7
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/axis/animate/group-fade.js.map +1 -1
- package/cjs/axis/animate/group-transition.js.map +1 -1
- package/cjs/axis/animate/index.js.map +1 -1
- package/cjs/axis/base.js.map +1 -1
- package/cjs/axis/circle.js.map +1 -1
- package/cjs/axis/config.js.map +1 -1
- package/cjs/axis/constant.js.map +1 -1
- package/cjs/axis/grid.js.map +1 -1
- package/cjs/axis/index.js.map +1 -1
- package/cjs/axis/line.js +50 -1
- package/cjs/axis/line.js.map +1 -1
- package/cjs/axis/overlap/auto-hide.js.map +1 -1
- package/cjs/axis/overlap/auto-limit.js.map +1 -1
- package/cjs/axis/overlap/auto-rotate.js +2 -2
- package/cjs/axis/overlap/auto-rotate.js.map +1 -1
- package/cjs/axis/type.d.ts +1 -0
- package/cjs/axis/type.js.map +1 -1
- package/cjs/brush/brush.d.ts +1 -0
- package/cjs/brush/brush.js +5 -0
- package/cjs/brush/brush.js.map +1 -1
- package/cjs/brush/config.js.map +1 -1
- package/cjs/brush/index.js.map +1 -1
- package/cjs/brush/type.js.map +1 -1
- package/cjs/constant.js.map +1 -1
- package/cjs/core/base.js.map +1 -1
- package/cjs/core/type.js.map +1 -1
- package/cjs/crosshair/base.js.map +1 -1
- package/cjs/crosshair/circle.js.map +1 -1
- package/cjs/crosshair/index.js.map +1 -1
- package/cjs/crosshair/line.js.map +1 -1
- package/cjs/crosshair/polygon.js.map +1 -1
- package/cjs/crosshair/rect.js.map +1 -1
- package/cjs/crosshair/sector.js.map +1 -1
- package/cjs/crosshair/type.js.map +1 -1
- package/cjs/data-zoom/config.js.map +1 -1
- package/cjs/data-zoom/data-zoom.js.map +1 -1
- package/cjs/data-zoom/index.js.map +1 -1
- package/cjs/data-zoom/type.js.map +1 -1
- package/cjs/index.d.ts +1 -2
- package/cjs/index.js +2 -2
- package/cjs/index.js.map +1 -1
- package/cjs/indicator/config.js.map +1 -1
- package/cjs/indicator/index.js.map +1 -1
- package/cjs/indicator/indicator.js.map +1 -1
- package/cjs/indicator/type.js.map +1 -1
- package/cjs/interface.js.map +1 -1
- package/cjs/label/animate/animate.js.map +1 -1
- package/cjs/label/animate/index.js.map +1 -1
- package/cjs/label/arc.d.ts +6 -3
- package/cjs/label/arc.js +38 -5
- package/cjs/label/arc.js.map +1 -1
- package/cjs/label/base.d.ts +12 -9
- package/cjs/label/base.js +118 -135
- package/cjs/label/base.js.map +1 -1
- package/cjs/label/dataLabel.js +4 -4
- package/cjs/label/dataLabel.js.map +1 -1
- package/cjs/label/index.js.map +1 -1
- package/cjs/label/line.js.map +1 -1
- package/cjs/label/overlap/bitmap.js.map +1 -1
- package/cjs/label/overlap/index.js.map +1 -1
- package/cjs/label/overlap/place.d.ts +2 -2
- package/cjs/label/overlap/place.js +15 -8
- package/cjs/label/overlap/place.js.map +1 -1
- package/cjs/label/overlap/scaler.js.map +1 -1
- package/cjs/label/polygon.d.ts +12 -0
- package/cjs/label/polygon.js +35 -0
- package/cjs/label/polygon.js.map +1 -0
- package/cjs/label/rect.js.map +1 -1
- package/cjs/label/symbol.js.map +1 -1
- package/cjs/label/type.d.ts +5 -2
- package/cjs/label/type.js.map +1 -1
- package/cjs/label/util.js.map +1 -1
- package/cjs/legend/base.js.map +1 -1
- package/cjs/legend/color/color.js.map +1 -1
- package/cjs/legend/color/index.js.map +1 -1
- package/cjs/legend/color/type.js.map +1 -1
- package/cjs/legend/constant.js.map +1 -1
- package/cjs/legend/discrete/discrete.js.map +1 -1
- package/cjs/legend/discrete/index.js.map +1 -1
- package/cjs/legend/discrete/type.js.map +1 -1
- package/cjs/legend/index.js.map +1 -1
- package/cjs/legend/size/index.js.map +1 -1
- package/cjs/legend/size/size.js.map +1 -1
- package/cjs/legend/size/type.js.map +1 -1
- package/cjs/legend/type.js.map +1 -1
- package/cjs/link-path/index.js +2 -1
- package/cjs/link-path/index.js.map +1 -1
- package/cjs/link-path/link-path.js +1 -2
- package/cjs/link-path/link-path.js.map +1 -1
- package/cjs/link-path/type.js.map +1 -1
- package/cjs/marker/area.js.map +1 -1
- package/cjs/marker/base.js.map +1 -1
- package/cjs/marker/config.js.map +1 -1
- package/cjs/marker/index.js.map +1 -1
- package/cjs/marker/line.js.map +1 -1
- package/cjs/marker/point.js +1 -1
- package/cjs/marker/point.js.map +1 -1
- package/cjs/marker/type.js.map +1 -1
- package/cjs/pager/index.js.map +1 -1
- package/cjs/pager/pager.js.map +1 -1
- package/cjs/pager/type.js.map +1 -1
- package/cjs/player/base-player.d.ts +9 -1
- package/cjs/player/base-player.js +25 -22
- package/cjs/player/base-player.js.map +1 -1
- package/cjs/player/constant.d.ts +1 -0
- package/cjs/player/constant.js +1 -0
- package/cjs/player/constant.js.map +1 -1
- package/cjs/player/continuous-player.js +6 -6
- package/cjs/player/continuous-player.js.map +1 -1
- package/cjs/player/controller/assets/index.js.map +1 -1
- package/cjs/player/controller/constant.js.map +1 -1
- package/cjs/player/controller/controller.d.ts +2 -2
- package/cjs/player/controller/controller.js +15 -7
- package/cjs/player/controller/controller.js.map +1 -1
- package/cjs/player/controller/icon/icon.js.map +1 -1
- package/cjs/player/controller/icon/index.js.map +1 -1
- package/cjs/player/controller/icon/type.js.map +1 -1
- package/cjs/player/controller/index.js.map +1 -1
- package/cjs/player/controller/type.d.ts +14 -6
- package/cjs/player/controller/type.js.map +1 -1
- package/cjs/player/discrete-player.js +11 -11
- package/cjs/player/discrete-player.js.map +1 -1
- package/cjs/player/index.js.map +1 -1
- package/cjs/player/type/base.js.map +1 -1
- package/cjs/player/type/continuous-player.d.ts +2 -2
- package/cjs/player/type/continuous-player.js.map +1 -1
- package/cjs/player/type/direction.js.map +1 -1
- package/cjs/player/type/discrete-player.js.map +1 -1
- package/cjs/player/type/event.d.ts +12 -6
- package/cjs/player/type/event.js +5 -3
- package/cjs/player/type/event.js.map +1 -1
- package/cjs/player/type/index.js.map +1 -1
- package/cjs/player/type/layout.d.ts +5 -2
- package/cjs/player/type/layout.js.map +1 -1
- package/cjs/player/utils.js.map +1 -1
- package/cjs/poptip/contribution.js.map +1 -1
- package/cjs/poptip/index.js.map +1 -1
- package/cjs/poptip/poptip-plugin.js.map +1 -1
- package/cjs/poptip/poptip.js +9 -6
- package/cjs/poptip/poptip.js.map +1 -1
- package/cjs/poptip/register.js +4 -6
- package/cjs/poptip/register.js.map +1 -1
- package/cjs/poptip/theme.js.map +1 -1
- package/cjs/poptip/type.d.ts +1 -0
- package/cjs/poptip/type.js.map +1 -1
- package/cjs/scrollbar/index.js.map +1 -1
- package/cjs/scrollbar/scrollbar.js.map +1 -1
- package/cjs/scrollbar/type.js.map +1 -1
- package/cjs/segment/index.js.map +1 -1
- package/cjs/segment/segment.js.map +1 -1
- package/cjs/segment/type.js.map +1 -1
- package/cjs/slider/constant.js.map +1 -1
- package/cjs/slider/index.js.map +1 -1
- package/cjs/slider/slider.js.map +1 -1
- package/cjs/slider/type.js.map +1 -1
- package/cjs/tag/index.js.map +1 -1
- package/cjs/tag/tag.js.map +1 -1
- package/cjs/tag/type.js.map +1 -1
- package/cjs/title/index.js.map +1 -1
- package/cjs/title/title.js.map +1 -1
- package/cjs/title/type.js.map +1 -1
- package/cjs/tooltip/config.js.map +1 -1
- package/cjs/tooltip/index.js.map +1 -1
- package/cjs/tooltip/tooltip.js.map +1 -1
- package/cjs/tooltip/type.js.map +1 -1
- package/cjs/tooltip/util.js.map +1 -1
- package/cjs/util/align.js.map +1 -1
- package/cjs/util/common.js.map +1 -1
- package/cjs/util/index.js.map +1 -1
- package/cjs/util/labelSmartInvert.d.ts +1 -0
- package/cjs/util/labelSmartInvert.js +20 -2
- package/cjs/util/labelSmartInvert.js.map +1 -1
- package/cjs/util/matrix.js.map +1 -1
- package/cjs/util/text.js +3 -3
- package/cjs/util/text.js.map +1 -1
- package/dist/index.js +390 -267
- package/dist/index.min.js +1 -1
- package/es/axis/animate/group-fade.js.map +1 -1
- package/es/axis/animate/group-transition.js.map +1 -1
- package/es/axis/animate/index.js.map +1 -1
- package/es/axis/base.js.map +1 -1
- package/es/axis/circle.js.map +1 -1
- package/es/axis/config.js.map +1 -1
- package/es/axis/constant.js.map +1 -1
- package/es/axis/grid.js.map +1 -1
- package/es/axis/index.js.map +1 -1
- package/es/axis/line.js +50 -2
- package/es/axis/line.js.map +1 -1
- package/es/axis/overlap/auto-hide.js.map +1 -1
- package/es/axis/overlap/auto-limit.js.map +1 -1
- package/es/axis/overlap/auto-rotate.js +2 -2
- package/es/axis/overlap/auto-rotate.js.map +1 -1
- package/es/axis/type.d.ts +1 -0
- package/es/axis/type.js.map +1 -1
- package/es/brush/brush.d.ts +1 -0
- package/es/brush/brush.js +5 -0
- package/es/brush/brush.js.map +1 -1
- package/es/brush/config.js.map +1 -1
- package/es/brush/index.js.map +1 -1
- package/es/brush/type.js.map +1 -1
- package/es/constant.js.map +1 -1
- package/es/core/base.js.map +1 -1
- package/es/core/type.js.map +1 -1
- package/es/crosshair/base.js.map +1 -1
- package/es/crosshair/circle.js.map +1 -1
- package/es/crosshair/index.js.map +1 -1
- package/es/crosshair/line.js.map +1 -1
- package/es/crosshair/polygon.js.map +1 -1
- package/es/crosshair/rect.js.map +1 -1
- package/es/crosshair/sector.js.map +1 -1
- package/es/crosshair/type.js.map +1 -1
- package/es/data-zoom/config.js.map +1 -1
- package/es/data-zoom/data-zoom.js.map +1 -1
- package/es/data-zoom/index.js.map +1 -1
- package/es/data-zoom/type.js.map +1 -1
- package/es/index.d.ts +1 -2
- package/es/index.js +1 -3
- package/es/index.js.map +1 -1
- package/es/indicator/config.js.map +1 -1
- package/es/indicator/index.js.map +1 -1
- package/es/indicator/indicator.js.map +1 -1
- package/es/indicator/type.js.map +1 -1
- package/es/interface.js.map +1 -1
- package/es/label/animate/animate.js.map +1 -1
- package/es/label/animate/index.js.map +1 -1
- package/es/label/arc.d.ts +6 -3
- package/es/label/arc.js +38 -4
- package/es/label/arc.js.map +1 -1
- package/es/label/base.d.ts +12 -9
- package/es/label/base.js +119 -133
- package/es/label/base.js.map +1 -1
- package/es/label/dataLabel.js +5 -3
- package/es/label/dataLabel.js.map +1 -1
- package/es/label/index.js.map +1 -1
- package/es/label/line.js.map +1 -1
- package/es/label/overlap/bitmap.js.map +1 -1
- package/es/label/overlap/index.js.map +1 -1
- package/es/label/overlap/place.d.ts +2 -2
- package/es/label/overlap/place.js +15 -8
- package/es/label/overlap/place.js.map +1 -1
- package/es/label/overlap/scaler.js.map +1 -1
- package/es/label/polygon.d.ts +12 -0
- package/es/label/polygon.js +31 -0
- package/es/label/polygon.js.map +1 -0
- package/es/label/rect.js.map +1 -1
- package/es/label/symbol.js.map +1 -1
- package/es/label/type.d.ts +5 -2
- package/es/label/type.js.map +1 -1
- package/es/label/util.js.map +1 -1
- package/es/legend/base.js.map +1 -1
- package/es/legend/color/color.js.map +1 -1
- package/es/legend/color/index.js.map +1 -1
- package/es/legend/color/type.js.map +1 -1
- package/es/legend/constant.js.map +1 -1
- package/es/legend/discrete/discrete.js.map +1 -1
- package/es/legend/discrete/index.js.map +1 -1
- package/es/legend/discrete/type.js.map +1 -1
- package/es/legend/index.js.map +1 -1
- package/es/legend/size/index.js.map +1 -1
- package/es/legend/size/size.js.map +1 -1
- package/es/legend/size/type.js.map +1 -1
- package/es/legend/type.js.map +1 -1
- package/es/link-path/index.js +2 -1
- package/es/link-path/index.js.map +1 -1
- package/es/link-path/link-path.js +1 -2
- package/es/link-path/link-path.js.map +1 -1
- package/es/link-path/type.js.map +1 -1
- package/es/marker/area.js.map +1 -1
- package/es/marker/base.js.map +1 -1
- package/es/marker/config.js.map +1 -1
- package/es/marker/index.js.map +1 -1
- package/es/marker/line.js.map +1 -1
- package/es/marker/point.js +1 -1
- package/es/marker/point.js.map +1 -1
- package/es/marker/type.js.map +1 -1
- package/es/pager/index.js.map +1 -1
- package/es/pager/pager.js.map +1 -1
- package/es/pager/type.js.map +1 -1
- package/es/player/base-player.d.ts +9 -1
- package/es/player/base-player.js +25 -22
- package/es/player/base-player.js.map +1 -1
- package/es/player/constant.d.ts +1 -0
- package/es/player/constant.js +1 -0
- package/es/player/constant.js.map +1 -1
- package/es/player/continuous-player.js +6 -6
- package/es/player/continuous-player.js.map +1 -1
- package/es/player/controller/assets/index.js.map +1 -1
- package/es/player/controller/constant.js.map +1 -1
- package/es/player/controller/controller.d.ts +2 -2
- package/es/player/controller/controller.js +15 -7
- package/es/player/controller/controller.js.map +1 -1
- package/es/player/controller/icon/icon.js.map +1 -1
- package/es/player/controller/icon/index.js.map +1 -1
- package/es/player/controller/icon/type.js.map +1 -1
- package/es/player/controller/index.js.map +1 -1
- package/es/player/controller/type.d.ts +14 -6
- package/es/player/controller/type.js.map +1 -1
- package/es/player/discrete-player.js +10 -10
- package/es/player/discrete-player.js.map +1 -1
- package/es/player/index.js.map +1 -1
- package/es/player/type/base.js.map +1 -1
- package/es/player/type/continuous-player.d.ts +2 -2
- package/es/player/type/continuous-player.js.map +1 -1
- package/es/player/type/direction.js.map +1 -1
- package/es/player/type/discrete-player.js.map +1 -1
- package/es/player/type/event.d.ts +12 -6
- package/es/player/type/event.js +5 -3
- package/es/player/type/event.js.map +1 -1
- package/es/player/type/index.js.map +1 -1
- package/es/player/type/layout.d.ts +5 -2
- package/es/player/type/layout.js.map +1 -1
- package/es/player/utils.js.map +1 -1
- package/es/poptip/contribution.js.map +1 -1
- package/es/poptip/index.js.map +1 -1
- package/es/poptip/poptip-plugin.js.map +1 -1
- package/es/poptip/poptip.js +11 -6
- package/es/poptip/poptip.js.map +1 -1
- package/es/poptip/register.js +4 -6
- package/es/poptip/register.js.map +1 -1
- package/es/poptip/theme.js.map +1 -1
- package/es/poptip/type.d.ts +1 -0
- package/es/poptip/type.js.map +1 -1
- package/es/scrollbar/index.js.map +1 -1
- package/es/scrollbar/scrollbar.js.map +1 -1
- package/es/scrollbar/type.js.map +1 -1
- package/es/segment/index.js.map +1 -1
- package/es/segment/segment.js.map +1 -1
- package/es/segment/type.js.map +1 -1
- package/es/slider/constant.js.map +1 -1
- package/es/slider/index.js.map +1 -1
- package/es/slider/slider.js.map +1 -1
- package/es/slider/type.js.map +1 -1
- package/es/tag/index.js.map +1 -1
- package/es/tag/tag.js.map +1 -1
- package/es/tag/type.js.map +1 -1
- package/es/title/index.js.map +1 -1
- package/es/title/title.js.map +1 -1
- package/es/title/type.js.map +1 -1
- package/es/tooltip/config.js.map +1 -1
- package/es/tooltip/index.js.map +1 -1
- package/es/tooltip/tooltip.js.map +1 -1
- package/es/tooltip/type.js.map +1 -1
- package/es/tooltip/util.js.map +1 -1
- package/es/util/align.js.map +1 -1
- package/es/util/common.js.map +1 -1
- package/es/util/index.js.map +1 -1
- package/es/util/labelSmartInvert.d.ts +1 -0
- package/es/util/labelSmartInvert.js +17 -0
- package/es/util/labelSmartInvert.js.map +1 -1
- package/es/util/matrix.js.map +1 -1
- package/es/util/text.js +3 -3
- package/es/util/text.js.map +1 -1
- package/package.json +4 -4
- package/cjs/jsx/component-type.d.ts +0 -4
- package/cjs/jsx/component-type.js +0 -14
- package/cjs/jsx/component-type.js.map +0 -1
- package/cjs/jsx/index.d.ts +0 -1
- package/cjs/jsx/index.js +0 -21
- package/cjs/jsx/index.js.map +0 -1
- package/es/jsx/component-type.d.ts +0 -4
- package/es/jsx/component-type.js +0 -6
- package/es/jsx/component-type.js.map +0 -1
- package/es/jsx/index.d.ts +0 -1
- package/es/jsx/index.js +0 -2
- package/es/jsx/index.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -310,14 +310,14 @@
|
|
|
310
310
|
scrollRange: [0, 1]
|
|
311
311
|
};
|
|
312
312
|
|
|
313
|
-
function _typeof(
|
|
313
|
+
function _typeof(o) {
|
|
314
314
|
"@babel/helpers - typeof";
|
|
315
315
|
|
|
316
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
317
|
-
return typeof
|
|
318
|
-
} : function (
|
|
319
|
-
return
|
|
320
|
-
}, _typeof(
|
|
316
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
317
|
+
return typeof o;
|
|
318
|
+
} : function (o) {
|
|
319
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
320
|
+
}, _typeof(o);
|
|
321
321
|
}
|
|
322
322
|
|
|
323
323
|
function __rest(s, e) {
|
|
@@ -495,6 +495,20 @@
|
|
|
495
495
|
const { r, g, b } = c.color;
|
|
496
496
|
return '#' + vutils.ColorUtil.rgbToHex(r, g, b);
|
|
497
497
|
}
|
|
498
|
+
function smartInvertStrategy(fillStrategy, baseColor, invertColor, similarColor) {
|
|
499
|
+
let result;
|
|
500
|
+
switch (fillStrategy) {
|
|
501
|
+
case 'base':
|
|
502
|
+
result = baseColor;
|
|
503
|
+
break;
|
|
504
|
+
case 'invertBase':
|
|
505
|
+
result = invertColor;
|
|
506
|
+
break;
|
|
507
|
+
case 'similarBase':
|
|
508
|
+
result = similarColor;
|
|
509
|
+
}
|
|
510
|
+
return result;
|
|
511
|
+
}
|
|
498
512
|
|
|
499
513
|
function scale(vector, scale) {
|
|
500
514
|
return [vector[0] * scale, vector[1] * scale];
|
|
@@ -561,16 +575,16 @@
|
|
|
561
575
|
}, getTextBounds: useNaiveCanvas ? undefined : vrender.getTextBounds, specialCharSet: '-/: .,@%\'"~' + vutils.TextMeasure.ALPHABET_CHAR_SET + vutils.TextMeasure.ALPHABET_CHAR_SET.toUpperCase() }, (option !== null && option !== void 0 ? option : {})), textSpec);
|
|
562
576
|
};
|
|
563
577
|
function measureTextSize(text, textSpec) {
|
|
564
|
-
var _a;
|
|
578
|
+
var _a, _b;
|
|
565
579
|
if (!text) {
|
|
566
580
|
return { width: 0, height: 0 };
|
|
567
581
|
}
|
|
568
582
|
const bounds = vrender.getTextBounds({
|
|
569
583
|
text,
|
|
570
|
-
fontFamily: textSpec.fontFamily,
|
|
584
|
+
fontFamily: (_a = textSpec.fontFamily) !== null && _a !== void 0 ? _a : '',
|
|
571
585
|
fontSize: textSpec.fontSize || 12,
|
|
572
586
|
fontWeight: textSpec.fontWeight,
|
|
573
|
-
textAlign: (
|
|
587
|
+
textAlign: (_b = textSpec.textAlign) !== null && _b !== void 0 ? _b : 'center',
|
|
574
588
|
textBaseline: textSpec.textBaseline,
|
|
575
589
|
ellipsis: !!textSpec.ellipsis,
|
|
576
590
|
maxLineWidth: textSpec.maxLineWidth || Infinity,
|
|
@@ -696,6 +710,7 @@
|
|
|
696
710
|
}
|
|
697
711
|
};
|
|
698
712
|
|
|
713
|
+
const _tBounds = new vutils.AABBBounds();
|
|
699
714
|
class PopTip extends AbstractComponent {
|
|
700
715
|
constructor(attributes) {
|
|
701
716
|
super(vutils.merge({}, PopTip.defaultAttributes, attributes));
|
|
@@ -703,8 +718,8 @@
|
|
|
703
718
|
this.positionList = ['top', 'tl', 'tr', 'bottom', 'bl', 'br', 'left', 'lt', 'lb', 'right', 'rt', 'rb'];
|
|
704
719
|
}
|
|
705
720
|
render() {
|
|
706
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
707
|
-
const { title = '', titleStyle = {}, position, content = '', contentStyle = {}, panel = {}, space = 4, minWidth = 0, maxWidth = Infinity, padding = 4, visible, state, dx = 0, dy = 0 } = this.attribute;
|
|
721
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
722
|
+
const { title = '', titleStyle = {}, position, content = '', contentStyle = {}, panel = {}, space = 4, minWidth = 0, maxWidth = Infinity, padding = 4, maxWidthPercent, visible, state, dx = 0, dy = 0 } = this.attribute;
|
|
708
723
|
const parsedPadding = vutils.normalizePadding(padding);
|
|
709
724
|
const group = this.createOrUpdateChild('poptip-content', { x: 0, y: 0, zIndex: 1 }, 'group');
|
|
710
725
|
const maxLineWidth = maxWidth - parsedPadding[1] - parsedPadding[3];
|
|
@@ -755,10 +770,11 @@
|
|
|
755
770
|
: undefined;
|
|
756
771
|
if (range) {
|
|
757
772
|
const b = this.AABBBounds;
|
|
758
|
-
const leftWidth = b.x1;
|
|
773
|
+
const leftWidth = (_h = this.attribute.x) !== null && _h !== void 0 ? _h : b.x1;
|
|
759
774
|
const rightWidth = range[0] - b.x1;
|
|
760
775
|
let maxSpace = Math.max(leftWidth, rightWidth);
|
|
761
|
-
|
|
776
|
+
const buf = (vutils.isArray(symbolSize) ? symbolSize[0] : 12) + 3;
|
|
777
|
+
maxSpace = Math.min(maxSpace - buf, maxSpace * maxWidthPercent);
|
|
762
778
|
if (maxSpace < popTipWidth) {
|
|
763
779
|
popTipWidth = maxSpace;
|
|
764
780
|
const buf = parsedPadding[1] + parsedPadding[3];
|
|
@@ -793,7 +809,8 @@
|
|
|
793
809
|
y: -offset[1] + dy
|
|
794
810
|
});
|
|
795
811
|
if (layout && range) {
|
|
796
|
-
|
|
812
|
+
_tBounds.setValue(0, 0, popTipWidth, poptipHeight).transformWithMatrix(group.globalTransMatrix);
|
|
813
|
+
const b = _tBounds;
|
|
797
814
|
const stageBounds = new vutils.Bounds().setValue(0, 0, range[0], range[1]);
|
|
798
815
|
if (vutils.rectInsideAnotherRect(b, stageBounds, false)) {
|
|
799
816
|
break;
|
|
@@ -871,6 +888,7 @@
|
|
|
871
888
|
textAlign: 'left',
|
|
872
889
|
textBaseline: 'top'
|
|
873
890
|
},
|
|
891
|
+
maxWidthPercent: 0.8,
|
|
874
892
|
space: 8,
|
|
875
893
|
padding: 10
|
|
876
894
|
};
|
|
@@ -1077,20 +1095,13 @@
|
|
|
1077
1095
|
injectable()
|
|
1078
1096
|
], PopTipForClipedTextPlugin);
|
|
1079
1097
|
|
|
1080
|
-
const popTipModule = new ContainerModule(
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
bind(vrender.AutoEnablePlugins).toService(PopTipForClipedTextPlugin);
|
|
1088
|
-
}
|
|
1089
|
-
else {
|
|
1090
|
-
rebind(PopTipRenderContribution).toSelf().inSingletonScope();
|
|
1091
|
-
rebind(PopTipPlugin).toSelf();
|
|
1092
|
-
rebind(PopTipForClipedTextPlugin).toSelf();
|
|
1093
|
-
}
|
|
1098
|
+
const popTipModule = new ContainerModule(bind => {
|
|
1099
|
+
bind(PopTipRenderContribution).toSelf().inSingletonScope();
|
|
1100
|
+
bind(vrender.InteractiveSubRenderContribution).toService(PopTipRenderContribution);
|
|
1101
|
+
bind(PopTipPlugin).toSelf().inSingletonScope();
|
|
1102
|
+
bind(vrender.AutoEnablePlugins).toService(PopTipPlugin);
|
|
1103
|
+
bind(PopTipForClipedTextPlugin).toSelf().inSingletonScope();
|
|
1104
|
+
bind(vrender.AutoEnablePlugins).toService(PopTipForClipedTextPlugin);
|
|
1094
1105
|
});
|
|
1095
1106
|
function loadPoptip(defaultPoptipTheme) {
|
|
1096
1107
|
vutils.merge(theme.poptip, defaultPoptipTheme);
|
|
@@ -1423,26 +1434,29 @@
|
|
|
1423
1434
|
};
|
|
1424
1435
|
}
|
|
1425
1436
|
|
|
1426
|
-
function canPlace($, bitmap, bound, checkBound = true) {
|
|
1427
|
-
|
|
1437
|
+
function canPlace($, bitmap, bound, checkBound = true, pad = 0) {
|
|
1438
|
+
let range = bound;
|
|
1439
|
+
if (pad > 0) {
|
|
1440
|
+
range = {
|
|
1441
|
+
x1: bound.x1 - pad,
|
|
1442
|
+
x2: bound.x2 + pad,
|
|
1443
|
+
y1: bound.y1 - pad,
|
|
1444
|
+
y2: bound.y2 + pad
|
|
1445
|
+
};
|
|
1446
|
+
}
|
|
1447
|
+
range = boundToRange($, range);
|
|
1428
1448
|
const outOfBounds = checkBound && bitmap.outOfBounds(range);
|
|
1429
1449
|
if (outOfBounds) {
|
|
1430
1450
|
return false;
|
|
1431
1451
|
}
|
|
1432
1452
|
return !bitmap.getRange(range);
|
|
1433
1453
|
}
|
|
1434
|
-
function
|
|
1435
|
-
if (!textBound || !shapeBound) {
|
|
1436
|
-
return false;
|
|
1437
|
-
}
|
|
1438
|
-
return shapeBound.encloses(textBound);
|
|
1439
|
-
}
|
|
1440
|
-
function placeToCandidates($, bitmap, text, candidates = [], clampForce = true) {
|
|
1454
|
+
function placeToCandidates($, bitmap, text, candidates = [], clampForce = true, pad = 0) {
|
|
1441
1455
|
for (let i = 0; i < candidates.length; i++) {
|
|
1442
1456
|
const tempText = text.clone();
|
|
1443
1457
|
tempText.setAttributes(candidates[i]);
|
|
1444
1458
|
tempText.update();
|
|
1445
|
-
if (canPlace($, bitmap, boundToRange($, tempText.AABBBounds), clampForce)) {
|
|
1459
|
+
if (canPlace($, bitmap, boundToRange($, tempText.AABBBounds), clampForce, pad)) {
|
|
1446
1460
|
bitmap.setRange(boundToRange($, tempText.AABBBounds, true));
|
|
1447
1461
|
return candidates[i];
|
|
1448
1462
|
}
|
|
@@ -1450,13 +1464,15 @@
|
|
|
1450
1464
|
return false;
|
|
1451
1465
|
}
|
|
1452
1466
|
function place($, bitmap, s, attrs, text, bounds, labeling) {
|
|
1453
|
-
var _a, _b
|
|
1467
|
+
var _a, _b;
|
|
1468
|
+
const clampForce = (_a = attrs.overlap) === null || _a === void 0 ? void 0 : _a.clampForce;
|
|
1469
|
+
const overlapPadding = (_b = attrs.overlap) === null || _b === void 0 ? void 0 : _b.overlapPadding;
|
|
1454
1470
|
if (s.type === 'bound' || s.type === 'position') {
|
|
1455
1471
|
if (vutils.isFunction(labeling)) {
|
|
1456
1472
|
const userPosition = vutils.isFunction(s.position) ? s.position(text.attribute) : s.position;
|
|
1457
1473
|
const positions = (userPosition || defaultLabelPosition(attrs.type));
|
|
1458
1474
|
const candidates = positions.map(p => labeling(text.AABBBounds, bounds, p, attrs.offset));
|
|
1459
|
-
return placeToCandidates($, bitmap, text, candidates,
|
|
1475
|
+
return placeToCandidates($, bitmap, text, candidates, clampForce, overlapPadding);
|
|
1460
1476
|
}
|
|
1461
1477
|
return false;
|
|
1462
1478
|
}
|
|
@@ -1465,14 +1481,14 @@
|
|
|
1465
1481
|
const candidates = offset.map(dy => {
|
|
1466
1482
|
return { x: text.attribute.x, y: text.attribute.y + dy };
|
|
1467
1483
|
});
|
|
1468
|
-
return placeToCandidates($, bitmap, text, candidates,
|
|
1484
|
+
return placeToCandidates($, bitmap, text, candidates, clampForce, overlapPadding);
|
|
1469
1485
|
}
|
|
1470
1486
|
if (s.type === 'moveX') {
|
|
1471
1487
|
const offset = s.offset ? (vutils.isFunction(s.offset) ? s.offset(text.attribute) : s.offset) : [];
|
|
1472
1488
|
const candidates = offset.map(dx => {
|
|
1473
1489
|
return { x: text.attribute.x + dx, y: text.attribute.y };
|
|
1474
1490
|
});
|
|
1475
|
-
return placeToCandidates($, bitmap, text, candidates,
|
|
1491
|
+
return placeToCandidates($, bitmap, text, candidates, clampForce, overlapPadding);
|
|
1476
1492
|
}
|
|
1477
1493
|
return false;
|
|
1478
1494
|
}
|
|
@@ -1560,8 +1576,14 @@
|
|
|
1560
1576
|
};
|
|
1561
1577
|
|
|
1562
1578
|
class LabelBase extends AbstractComponent {
|
|
1563
|
-
|
|
1564
|
-
|
|
1579
|
+
setBitmap(bitmap) {
|
|
1580
|
+
this._bitmap = bitmap;
|
|
1581
|
+
}
|
|
1582
|
+
setBitmapTool(bmpTool) {
|
|
1583
|
+
this._bmpTool = bmpTool;
|
|
1584
|
+
}
|
|
1585
|
+
constructor(attributes) {
|
|
1586
|
+
super(vutils.merge({}, LabelBase.defaultAttributes, attributes));
|
|
1565
1587
|
this.name = 'label';
|
|
1566
1588
|
this._onHover = (e) => {
|
|
1567
1589
|
const target = e.target;
|
|
@@ -1609,18 +1631,17 @@
|
|
|
1609
1631
|
}
|
|
1610
1632
|
};
|
|
1611
1633
|
}
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
}
|
|
1615
|
-
setBitmapTool(bmpTool) {
|
|
1616
|
-
this._bmpTool = bmpTool;
|
|
1634
|
+
labeling(textBounds, graphicBounds, position, offset) {
|
|
1635
|
+
return;
|
|
1617
1636
|
}
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
return arcs;
|
|
1637
|
+
_labelLine(text) {
|
|
1638
|
+
return;
|
|
1621
1639
|
}
|
|
1622
1640
|
render() {
|
|
1623
1641
|
this._prepare();
|
|
1642
|
+
if (vutils.isNil(this._idToGraphic)) {
|
|
1643
|
+
return;
|
|
1644
|
+
}
|
|
1624
1645
|
const { overlap, smartInvert, dataFilter, customLayoutFunc, customOverlapFunc } = this.attribute;
|
|
1625
1646
|
let data = this.attribute.data;
|
|
1626
1647
|
if (vutils.isFunction(dataFilter)) {
|
|
@@ -1631,14 +1652,14 @@
|
|
|
1631
1652
|
labels = customLayoutFunc(data, (d) => this._idToGraphic.get(d.id));
|
|
1632
1653
|
}
|
|
1633
1654
|
else {
|
|
1634
|
-
labels = this.
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1655
|
+
labels = this._layout(data);
|
|
1656
|
+
}
|
|
1657
|
+
if (vutils.isFunction(customOverlapFunc)) {
|
|
1658
|
+
labels = customOverlapFunc(labels, (d) => this._idToGraphic.get(d.id));
|
|
1659
|
+
}
|
|
1660
|
+
else {
|
|
1661
|
+
if (overlap !== false) {
|
|
1662
|
+
labels = this._overlapping(labels);
|
|
1642
1663
|
}
|
|
1643
1664
|
}
|
|
1644
1665
|
if (smartInvert !== false) {
|
|
@@ -1707,49 +1728,24 @@
|
|
|
1707
1728
|
}
|
|
1708
1729
|
}
|
|
1709
1730
|
}
|
|
1710
|
-
|
|
1731
|
+
_layout(data = []) {
|
|
1711
1732
|
const { textStyle = {}, position, offset } = this.attribute;
|
|
1712
1733
|
const labels = [];
|
|
1713
|
-
const textBoundsArray = [];
|
|
1714
1734
|
for (let i = 0; i < data.length; i++) {
|
|
1715
1735
|
const textData = data[i];
|
|
1716
1736
|
const baseMark = this._idToGraphic.get(textData.id);
|
|
1717
1737
|
const labelAttribute = Object.assign(Object.assign({ fill: baseMark.attribute.fill }, textStyle), textData);
|
|
1718
1738
|
const text = this._createLabelText(labelAttribute);
|
|
1719
1739
|
const textBounds = this.getGraphicBounds(text);
|
|
1720
|
-
textBoundsArray.push(textBounds);
|
|
1721
1740
|
const graphicBounds = this.getGraphicBounds(baseMark, { x: textData.x, y: textData.y });
|
|
1722
1741
|
const textLocation = this.labeling(textBounds, graphicBounds, vutils.isFunction(position) ? position(textData) : position, offset);
|
|
1723
|
-
if (
|
|
1724
|
-
|
|
1742
|
+
if (textLocation) {
|
|
1743
|
+
labelAttribute.x = textLocation.x;
|
|
1744
|
+
labelAttribute.y = textLocation.y;
|
|
1745
|
+
text.setAttributes(textLocation);
|
|
1725
1746
|
}
|
|
1726
|
-
labelAttribute.x = textLocation.x;
|
|
1727
|
-
labelAttribute.y = textLocation.y;
|
|
1728
|
-
text.setAttributes(textLocation);
|
|
1729
1747
|
labels.push(text);
|
|
1730
1748
|
}
|
|
1731
|
-
if (this.attribute.type === 'arc') {
|
|
1732
|
-
const ellipsisLabelAttribute = Object.assign(Object.assign({}, this.attribute.textStyle), { text: '...' });
|
|
1733
|
-
const ellipsisText = this._createLabelText(ellipsisLabelAttribute);
|
|
1734
|
-
const ellipsisTextBounds = this.getGraphicBounds(ellipsisText);
|
|
1735
|
-
const ellipsisWidth = ellipsisTextBounds.x2 - ellipsisTextBounds.x1;
|
|
1736
|
-
const arcs = this.layoutArcLabels(position, this.attribute, Array.from(this._idToGraphic.values()), data, textBoundsArray, ellipsisWidth);
|
|
1737
|
-
for (let i = 0; i < data.length; i++) {
|
|
1738
|
-
const textData = data[i];
|
|
1739
|
-
const basedArc = arcs.find(arc => arc.refDatum.id === textData.id);
|
|
1740
|
-
const labelAttribute = {
|
|
1741
|
-
visible: basedArc.labelVisible,
|
|
1742
|
-
x: basedArc.labelPosition.x,
|
|
1743
|
-
y: basedArc.labelPosition.y,
|
|
1744
|
-
angle: basedArc.angle,
|
|
1745
|
-
maxLineWidth: basedArc.labelLimit,
|
|
1746
|
-
points: (basedArc === null || basedArc === void 0 ? void 0 : basedArc.pointA) && (basedArc === null || basedArc === void 0 ? void 0 : basedArc.pointB) && (basedArc === null || basedArc === void 0 ? void 0 : basedArc.pointC)
|
|
1747
|
-
? [basedArc.pointA, basedArc.pointB, basedArc.pointC]
|
|
1748
|
-
: undefined
|
|
1749
|
-
};
|
|
1750
|
-
labels[i].setAttributes(labelAttribute);
|
|
1751
|
-
}
|
|
1752
|
-
}
|
|
1753
1749
|
return labels;
|
|
1754
1750
|
}
|
|
1755
1751
|
_overlapping(labels) {
|
|
@@ -1767,7 +1763,7 @@
|
|
|
1767
1763
|
if (size.width === 0 || size.height === 0) {
|
|
1768
1764
|
return labels;
|
|
1769
1765
|
}
|
|
1770
|
-
const { avoidBaseMark, strategy = [], hideOnHit = true, clampForce = true, avoidMarks = [] } = option;
|
|
1766
|
+
const { avoidBaseMark, strategy = [], hideOnHit = true, clampForce = true, avoidMarks = [], overlapPadding } = option;
|
|
1771
1767
|
const bmpTool = this._bmpTool || bitmapTool(size.width, size.height);
|
|
1772
1768
|
const bitmap = this._bitmap || bmpTool.bitmap();
|
|
1773
1769
|
const checkBounds = strategy.some(s => s.type === 'bound');
|
|
@@ -1795,13 +1791,16 @@
|
|
|
1795
1791
|
const text = labels[i];
|
|
1796
1792
|
const baseMark = this._idToGraphic.get(text.attribute.id);
|
|
1797
1793
|
text.update();
|
|
1798
|
-
if (
|
|
1794
|
+
if (!vutils.isRectIntersect(baseMark.AABBBounds, { x1: 0, x2: bmpTool.width, y1: 0, y2: bmpTool.height }, true)) {
|
|
1795
|
+
continue;
|
|
1796
|
+
}
|
|
1797
|
+
if (canPlace(bmpTool, bitmap, text.AABBBounds, clampForce, overlapPadding)) {
|
|
1799
1798
|
if (!checkBounds) {
|
|
1800
1799
|
bitmap.setRange(boundToRange(bmpTool, text.AABBBounds, true));
|
|
1801
1800
|
result.push(text);
|
|
1802
1801
|
continue;
|
|
1803
1802
|
}
|
|
1804
|
-
if (checkBounds && (baseMark === null || baseMark === void 0 ? void 0 : baseMark.AABBBounds) &&
|
|
1803
|
+
if (checkBounds && (baseMark === null || baseMark === void 0 ? void 0 : baseMark.AABBBounds) && this._canPlaceInside(text.AABBBounds, baseMark === null || baseMark === void 0 ? void 0 : baseMark.AABBBounds)) {
|
|
1805
1804
|
bitmap.setRange(boundToRange(bmpTool, text.AABBBounds, true));
|
|
1806
1805
|
result.push(text);
|
|
1807
1806
|
continue;
|
|
@@ -1824,7 +1823,7 @@
|
|
|
1824
1823
|
x2: text.AABBBounds.x2 + dx,
|
|
1825
1824
|
y1: text.AABBBounds.y1 + dy,
|
|
1826
1825
|
y2: text.AABBBounds.y2 + dy
|
|
1827
|
-
})) {
|
|
1826
|
+
}, undefined, overlapPadding)) {
|
|
1828
1827
|
text.setAttributes({ x: text.attribute.x + dx, y: text.attribute.y + dy });
|
|
1829
1828
|
bitmap.setRange(boundToRange(bmpTool, text.AABBBounds, true));
|
|
1830
1829
|
result.push(text);
|
|
@@ -1855,9 +1854,17 @@
|
|
|
1855
1854
|
});
|
|
1856
1855
|
}
|
|
1857
1856
|
_renderLabels(labels) {
|
|
1857
|
+
const disableAnimation = this._enableAnimation === false || this.attribute.animation === false;
|
|
1858
|
+
if (disableAnimation) {
|
|
1859
|
+
this._renderWithOutAnimation(labels);
|
|
1860
|
+
}
|
|
1861
|
+
else {
|
|
1862
|
+
this._renderWithAnimation(labels);
|
|
1863
|
+
}
|
|
1864
|
+
}
|
|
1865
|
+
_renderWithAnimation(labels) {
|
|
1858
1866
|
var _a, _b, _c, _d, _e;
|
|
1859
1867
|
const animationConfig = ((_a = this.attribute.animation) !== null && _a !== void 0 ? _a : {});
|
|
1860
|
-
const disableAnimation = this._enableAnimation === false || animationConfig === false;
|
|
1861
1868
|
const mode = (_b = animationConfig.mode) !== null && _b !== void 0 ? _b : DefaultLabelAnimation.mode;
|
|
1862
1869
|
const duration = (_c = animationConfig.duration) !== null && _c !== void 0 ? _c : DefaultLabelAnimation.duration;
|
|
1863
1870
|
const easing = (_d = animationConfig.easing) !== null && _d !== void 0 ? _d : DefaultLabelAnimation.easing;
|
|
@@ -1866,27 +1873,18 @@
|
|
|
1866
1873
|
const prevTextMap = this._graphicToText || new Map();
|
|
1867
1874
|
const texts = [];
|
|
1868
1875
|
labels.forEach((text, index) => {
|
|
1869
|
-
var _a
|
|
1870
|
-
const labelLine = (
|
|
1871
|
-
? vrender.createLine({
|
|
1872
|
-
visible: (_c = (_b = text.attribute) === null || _b === void 0 ? void 0 : _b.visible) !== null && _c !== void 0 ? _c : true,
|
|
1873
|
-
stroke: (_f = (_e = (_d = text.attribute) === null || _d === void 0 ? void 0 : _d.line) === null || _e === void 0 ? void 0 : _e.stroke) !== null && _f !== void 0 ? _f : (_g = text.attribute) === null || _g === void 0 ? void 0 : _g.fill,
|
|
1874
|
-
lineWidth: (_k = (_j = (_h = text.attribute) === null || _h === void 0 ? void 0 : _h.line) === null || _j === void 0 ? void 0 : _j.lineWidth) !== null && _k !== void 0 ? _k : 1,
|
|
1875
|
-
points: (_l = text.attribute) === null || _l === void 0 ? void 0 : _l.points
|
|
1876
|
-
})
|
|
1877
|
-
: undefined;
|
|
1876
|
+
var _a;
|
|
1877
|
+
const labelLine = this._labelLine(text);
|
|
1878
1878
|
const relatedGraphic = this._idToGraphic.get(text.attribute.id);
|
|
1879
1879
|
const state = (prevTextMap === null || prevTextMap === void 0 ? void 0 : prevTextMap.get(relatedGraphic)) ? 'update' : 'enter';
|
|
1880
1880
|
if (state === 'enter') {
|
|
1881
1881
|
texts.push(text);
|
|
1882
1882
|
currentTextMap.set(relatedGraphic, labelLine ? { text, labelLine } : { text });
|
|
1883
|
-
if (
|
|
1883
|
+
if (relatedGraphic) {
|
|
1884
1884
|
const { from, to } = getAnimationAttributes(text.attribute, 'fadeIn');
|
|
1885
1885
|
this.add(text);
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
}
|
|
1889
|
-
relatedGraphic.onAnimateBind = () => {
|
|
1886
|
+
labelLine && this.add(labelLine);
|
|
1887
|
+
relatedGraphic.once('animate-bind', () => {
|
|
1890
1888
|
text.setAttributes(from);
|
|
1891
1889
|
const listener = this._afterRelatedGraphicAttributeUpdate(text, texts, index, relatedGraphic, {
|
|
1892
1890
|
mode,
|
|
@@ -1896,58 +1894,69 @@
|
|
|
1896
1894
|
delay
|
|
1897
1895
|
});
|
|
1898
1896
|
relatedGraphic.on('afterAttributeUpdate', listener);
|
|
1899
|
-
};
|
|
1900
|
-
}
|
|
1901
|
-
else {
|
|
1902
|
-
this.add(text);
|
|
1903
|
-
if (labelLine) {
|
|
1904
|
-
this.add(labelLine);
|
|
1905
|
-
}
|
|
1897
|
+
});
|
|
1906
1898
|
}
|
|
1907
1899
|
}
|
|
1908
|
-
if (state === 'update') {
|
|
1900
|
+
else if (state === 'update') {
|
|
1909
1901
|
const prevLabel = prevTextMap.get(relatedGraphic);
|
|
1910
1902
|
prevTextMap.delete(relatedGraphic);
|
|
1911
1903
|
currentTextMap.set(relatedGraphic, prevLabel);
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
}), duration, easing);
|
|
1919
|
-
}
|
|
1920
|
-
if (animationConfig.increaseEffect !== false &&
|
|
1921
|
-
prevText.attribute.text !== text.attribute.text &&
|
|
1922
|
-
vutils.isValidNumber(Number(prevText.attribute.text) * Number(text.attribute.text))) {
|
|
1923
|
-
prevText
|
|
1924
|
-
.animate()
|
|
1925
|
-
.play(new vrender.IncreaseCount({ text: prevText.attribute.text }, { text: text.attribute.text }, duration, easing));
|
|
1926
|
-
}
|
|
1904
|
+
const prevText = prevLabel.text;
|
|
1905
|
+
prevText.animate().to(text.attribute, duration, easing);
|
|
1906
|
+
if (prevLabel.labelLine) {
|
|
1907
|
+
prevLabel.labelLine.animate().to(vutils.merge({}, prevLabel.labelLine.attribute, {
|
|
1908
|
+
points: (_a = text.attribute) === null || _a === void 0 ? void 0 : _a.points
|
|
1909
|
+
}), duration, easing);
|
|
1927
1910
|
}
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1911
|
+
if (animationConfig.increaseEffect !== false &&
|
|
1912
|
+
prevText.attribute.text !== text.attribute.text &&
|
|
1913
|
+
vutils.isValidNumber(Number(prevText.attribute.text) * Number(text.attribute.text))) {
|
|
1914
|
+
prevText
|
|
1915
|
+
.animate()
|
|
1916
|
+
.play(new vrender.IncreaseCount({ text: prevText.attribute.text }, { text: text.attribute.text }, duration, easing));
|
|
1933
1917
|
}
|
|
1934
1918
|
}
|
|
1935
1919
|
});
|
|
1936
1920
|
prevTextMap.forEach(label => {
|
|
1937
1921
|
var _a;
|
|
1938
|
-
|
|
1922
|
+
(_a = label.text) === null || _a === void 0 ? void 0 : _a.animate().to(getAnimationAttributes(label.text.attribute, 'fadeOut').to, duration, easing).onEnd(() => {
|
|
1939
1923
|
this.removeChild(label.text);
|
|
1940
1924
|
if (label === null || label === void 0 ? void 0 : label.labelLine) {
|
|
1941
1925
|
this.removeChild(label.labelLine);
|
|
1942
1926
|
}
|
|
1927
|
+
});
|
|
1928
|
+
});
|
|
1929
|
+
this._graphicToText = currentTextMap;
|
|
1930
|
+
}
|
|
1931
|
+
_renderWithOutAnimation(labels) {
|
|
1932
|
+
const currentTextMap = new Map();
|
|
1933
|
+
const prevTextMap = this._graphicToText || new Map();
|
|
1934
|
+
labels.forEach(text => {
|
|
1935
|
+
var _a;
|
|
1936
|
+
const labelLine = this._labelLine(text);
|
|
1937
|
+
const relatedGraphic = this._idToGraphic.get(text.attribute.id);
|
|
1938
|
+
const state = (prevTextMap === null || prevTextMap === void 0 ? void 0 : prevTextMap.get(relatedGraphic)) ? 'update' : 'enter';
|
|
1939
|
+
if (state === 'enter') {
|
|
1940
|
+
currentTextMap.set(relatedGraphic, labelLine ? { text, labelLine } : { text });
|
|
1941
|
+
this.add(text);
|
|
1942
|
+
if (labelLine) {
|
|
1943
|
+
this.add(labelLine);
|
|
1944
|
+
}
|
|
1943
1945
|
}
|
|
1944
|
-
else {
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1946
|
+
else if (state === 'update') {
|
|
1947
|
+
const prevLabel = prevTextMap.get(relatedGraphic);
|
|
1948
|
+
prevTextMap.delete(relatedGraphic);
|
|
1949
|
+
currentTextMap.set(relatedGraphic, prevLabel);
|
|
1950
|
+
prevLabel.text.setAttributes(text.attribute);
|
|
1951
|
+
if (prevLabel === null || prevLabel === void 0 ? void 0 : prevLabel.labelLine) {
|
|
1952
|
+
prevLabel.labelLine.setAttributes({ points: (_a = text.attribute) === null || _a === void 0 ? void 0 : _a.points });
|
|
1953
|
+
}
|
|
1954
|
+
}
|
|
1955
|
+
});
|
|
1956
|
+
prevTextMap.forEach(label => {
|
|
1957
|
+
this.removeChild(label.text);
|
|
1958
|
+
if (label === null || label === void 0 ? void 0 : label.labelLine) {
|
|
1959
|
+
this.removeChild(label.labelLine);
|
|
1951
1960
|
}
|
|
1952
1961
|
});
|
|
1953
1962
|
this._graphicToText = currentTextMap;
|
|
@@ -2018,21 +2027,20 @@
|
|
|
2018
2027
|
continue;
|
|
2019
2028
|
}
|
|
2020
2029
|
const baseMark = this._idToGraphic.get(label.attribute.id);
|
|
2021
|
-
|
|
2022
|
-
if (this.attribute.type === 'arc') {
|
|
2023
|
-
isInside = this.attribute.position === 'inside';
|
|
2024
|
-
}
|
|
2030
|
+
const isInside = this._canPlaceInside(label.AABBBounds, baseMark === null || baseMark === void 0 ? void 0 : baseMark.AABBBounds);
|
|
2025
2031
|
const backgroundColor = baseMark.attribute.fill;
|
|
2026
2032
|
const foregroundColor = label.attribute.fill;
|
|
2027
2033
|
const baseColor = backgroundColor;
|
|
2028
2034
|
const invertColor = labelSmartInvert(foregroundColor, backgroundColor, textType, contrastRatiosThreshold, alternativeColors);
|
|
2029
|
-
const
|
|
2035
|
+
const similarColor = contrastAccessibilityChecker(invertColor, brightColor) ? brightColor : darkColor;
|
|
2030
2036
|
if (isInside) {
|
|
2031
|
-
|
|
2037
|
+
const fill = smartInvertStrategy(fillStrategy, baseColor, invertColor, similarColor);
|
|
2038
|
+
fill && label.setAttributes({ fill });
|
|
2032
2039
|
if (label.attribute.lineWidth === 0) {
|
|
2033
2040
|
continue;
|
|
2034
2041
|
}
|
|
2035
|
-
|
|
2042
|
+
const stroke = smartInvertStrategy(strokeStrategy, baseColor, invertColor, similarColor);
|
|
2043
|
+
stroke && label.setAttributes({ stroke });
|
|
2036
2044
|
}
|
|
2037
2045
|
else {
|
|
2038
2046
|
if (label.attribute.lineWidth === 0) {
|
|
@@ -2044,47 +2052,18 @@
|
|
|
2044
2052
|
});
|
|
2045
2053
|
continue;
|
|
2046
2054
|
}
|
|
2047
|
-
|
|
2048
|
-
|
|
2055
|
+
const fill = smartInvertStrategy(fillStrategy, baseColor, invertColor, similarColor);
|
|
2056
|
+
fill && label.setAttributes({ fill });
|
|
2057
|
+
const stroke = smartInvertStrategy(strokeStrategy, baseColor, invertColor, similarColor);
|
|
2058
|
+
stroke && label.setAttributes({ stroke });
|
|
2049
2059
|
}
|
|
2050
2060
|
}
|
|
2051
2061
|
}
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
label.setAttributes({
|
|
2056
|
-
fill: baseColor
|
|
2057
|
-
});
|
|
2058
|
-
break;
|
|
2059
|
-
case 'invertBase':
|
|
2060
|
-
label.setAttributes({
|
|
2061
|
-
fill: invertColor
|
|
2062
|
-
});
|
|
2063
|
-
break;
|
|
2064
|
-
case 'similarBase':
|
|
2065
|
-
label.setAttributes({
|
|
2066
|
-
fill: simialrColor
|
|
2067
|
-
});
|
|
2068
|
-
}
|
|
2069
|
-
}
|
|
2070
|
-
setStrokeStrategy(strokeStrategy, label, baseColor, invertColor, simialrColor) {
|
|
2071
|
-
switch (strokeStrategy) {
|
|
2072
|
-
case 'base':
|
|
2073
|
-
label.setAttributes({
|
|
2074
|
-
stroke: baseColor
|
|
2075
|
-
});
|
|
2076
|
-
break;
|
|
2077
|
-
case 'invertBase':
|
|
2078
|
-
label.setAttributes({
|
|
2079
|
-
stroke: invertColor
|
|
2080
|
-
});
|
|
2081
|
-
break;
|
|
2082
|
-
case 'similarBase':
|
|
2083
|
-
label.setAttributes({
|
|
2084
|
-
stroke: simialrColor
|
|
2085
|
-
});
|
|
2086
|
-
break;
|
|
2062
|
+
_canPlaceInside(textBound, shapeBound) {
|
|
2063
|
+
if (!textBound || !shapeBound) {
|
|
2064
|
+
return false;
|
|
2087
2065
|
}
|
|
2066
|
+
return shapeBound.encloses(textBound);
|
|
2088
2067
|
}
|
|
2089
2068
|
setLocation(point) {
|
|
2090
2069
|
this.translateTo(point.x, point.y);
|
|
@@ -2096,6 +2075,16 @@
|
|
|
2096
2075
|
this._enableAnimation = true;
|
|
2097
2076
|
}
|
|
2098
2077
|
}
|
|
2078
|
+
LabelBase.defaultAttributes = {
|
|
2079
|
+
textStyle: {
|
|
2080
|
+
fontSize: 12,
|
|
2081
|
+
textAlign: 'center',
|
|
2082
|
+
textBaseline: 'middle',
|
|
2083
|
+
boundsPadding: [-1, 0, -1, 0]
|
|
2084
|
+
},
|
|
2085
|
+
offset: 0,
|
|
2086
|
+
pickable: false
|
|
2087
|
+
};
|
|
2099
2088
|
|
|
2100
2089
|
class SymbolLabel extends LabelBase {
|
|
2101
2090
|
constructor(attributes) {
|
|
@@ -2450,18 +2439,46 @@
|
|
|
2450
2439
|
}
|
|
2451
2440
|
return { x: 0, y: 0 };
|
|
2452
2441
|
}
|
|
2442
|
+
_layout(data = []) {
|
|
2443
|
+
const labels = super._layout(data);
|
|
2444
|
+
const textBoundsArray = labels.map(label => this.getGraphicBounds(label));
|
|
2445
|
+
const ellipsisLabelAttribute = Object.assign(Object.assign({}, this.attribute.textStyle), { text: '...' });
|
|
2446
|
+
const ellipsisText = this._createLabelText(ellipsisLabelAttribute);
|
|
2447
|
+
const ellipsisTextBounds = this.getGraphicBounds(ellipsisText);
|
|
2448
|
+
const ellipsisWidth = ellipsisTextBounds.x2 - ellipsisTextBounds.x1;
|
|
2449
|
+
const arcs = this.layoutArcLabels(this.attribute.position, this.attribute, Array.from(this._idToGraphic.values()), data, textBoundsArray, ellipsisWidth);
|
|
2450
|
+
for (let i = 0; i < data.length; i++) {
|
|
2451
|
+
const textData = data[i];
|
|
2452
|
+
const basedArc = arcs.find(arc => arc.refDatum.id === textData.id);
|
|
2453
|
+
const labelAttribute = {
|
|
2454
|
+
visible: basedArc.labelVisible,
|
|
2455
|
+
x: basedArc.labelPosition.x,
|
|
2456
|
+
y: basedArc.labelPosition.y,
|
|
2457
|
+
angle: basedArc.angle,
|
|
2458
|
+
maxLineWidth: basedArc.labelLimit,
|
|
2459
|
+
points: (basedArc === null || basedArc === void 0 ? void 0 : basedArc.pointA) && (basedArc === null || basedArc === void 0 ? void 0 : basedArc.pointB) && (basedArc === null || basedArc === void 0 ? void 0 : basedArc.pointC)
|
|
2460
|
+
? [basedArc.pointA, basedArc.pointB, basedArc.pointC]
|
|
2461
|
+
: undefined
|
|
2462
|
+
};
|
|
2463
|
+
labels[i].setAttributes(labelAttribute);
|
|
2464
|
+
}
|
|
2465
|
+
return labels;
|
|
2466
|
+
}
|
|
2453
2467
|
layoutArcLabels(position, attribute, currentMarks, data, textBoundsArray, ellipsisWidth) {
|
|
2454
2468
|
var _a;
|
|
2455
2469
|
this._arcLeft.clear();
|
|
2456
2470
|
this._arcRight.clear();
|
|
2457
2471
|
this._ellipsisWidth = ellipsisWidth;
|
|
2458
|
-
const { width, height } = attribute;
|
|
2459
2472
|
const centerOffset = (_a = attribute === null || attribute === void 0 ? void 0 : attribute.centerOffset) !== null && _a !== void 0 ? _a : 0;
|
|
2473
|
+
let maxRadius = 0;
|
|
2474
|
+
currentMarks.forEach(currentMarks => {
|
|
2475
|
+
if (currentMarks.attribute.outerRadius > maxRadius) {
|
|
2476
|
+
maxRadius = currentMarks.attribute.outerRadius;
|
|
2477
|
+
}
|
|
2478
|
+
});
|
|
2460
2479
|
currentMarks.forEach((currentMark, index) => {
|
|
2461
2480
|
var _a, _b;
|
|
2462
2481
|
const graphicAttribute = currentMark.attribute;
|
|
2463
|
-
const radiusRatio = this.computeLayoutOuterRadius(graphicAttribute.outerRadius, width, height);
|
|
2464
|
-
const radius = this.computeRadius(radiusRatio, width, height, centerOffset);
|
|
2465
2482
|
const center = { x: (_a = graphicAttribute === null || graphicAttribute === void 0 ? void 0 : graphicAttribute.x) !== null && _a !== void 0 ? _a : 0, y: (_b = graphicAttribute === null || graphicAttribute === void 0 ? void 0 : graphicAttribute.y) !== null && _b !== void 0 ? _b : 0 };
|
|
2466
2483
|
const item = data[index];
|
|
2467
2484
|
const textBounds = textBoundsArray[index];
|
|
@@ -2469,7 +2486,7 @@
|
|
|
2469
2486
|
const intervalAngle = graphicAttribute.endAngle - graphicAttribute.startAngle;
|
|
2470
2487
|
const arcQuadrant = computeQuadrant(graphicAttribute.endAngle - intervalAngle / 2);
|
|
2471
2488
|
const arcMiddle = circlePoint(center.x, center.y, graphicAttribute.outerRadius, arcMiddleAngle);
|
|
2472
|
-
const outerArcMiddle = circlePoint(center.x, center.y,
|
|
2489
|
+
const outerArcMiddle = circlePoint(center.x, center.y, maxRadius + attribute.line.line1MinLength, arcMiddleAngle);
|
|
2473
2490
|
const arc = new ArcInfo(item, arcMiddle, outerArcMiddle, arcQuadrant, intervalAngle, arcMiddleAngle);
|
|
2474
2491
|
arc.pointA = circlePoint(center.x, center.y, this.computeDatumRadius(center.x * 2, center.y * 2, graphicAttribute.outerRadius, centerOffset), arc.middleAngle);
|
|
2475
2492
|
arc.labelSize = {
|
|
@@ -3016,6 +3033,18 @@
|
|
|
3016
3033
|
}
|
|
3017
3034
|
}
|
|
3018
3035
|
}
|
|
3036
|
+
_labelLine(text) {
|
|
3037
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
3038
|
+
const labelLine = ((_a = text.attribute) === null || _a === void 0 ? void 0 : _a.points)
|
|
3039
|
+
? vrender.createLine({
|
|
3040
|
+
visible: (_c = (_b = text.attribute) === null || _b === void 0 ? void 0 : _b.visible) !== null && _c !== void 0 ? _c : true,
|
|
3041
|
+
stroke: (_f = (_e = (_d = text.attribute) === null || _d === void 0 ? void 0 : _d.line) === null || _e === void 0 ? void 0 : _e.stroke) !== null && _f !== void 0 ? _f : (_g = text.attribute) === null || _g === void 0 ? void 0 : _g.fill,
|
|
3042
|
+
lineWidth: (_k = (_j = (_h = text.attribute) === null || _h === void 0 ? void 0 : _h.line) === null || _j === void 0 ? void 0 : _j.lineWidth) !== null && _k !== void 0 ? _k : 1,
|
|
3043
|
+
points: (_l = text.attribute) === null || _l === void 0 ? void 0 : _l.points
|
|
3044
|
+
})
|
|
3045
|
+
: undefined;
|
|
3046
|
+
return labelLine;
|
|
3047
|
+
}
|
|
3019
3048
|
computeRadius(r, width, height, centerOffset, k) {
|
|
3020
3049
|
var _a;
|
|
3021
3050
|
return ((_a = this.computeLayoutRadius(width ? width : 0, height ? height : 0) * r * (vutils.isNil(k) ? 1 : k) + centerOffset) !== null && _a !== void 0 ? _a : 0);
|
|
@@ -3023,6 +3052,9 @@
|
|
|
3023
3052
|
computeLayoutRadius(width, height) {
|
|
3024
3053
|
return Math.min(width / 2, height / 2);
|
|
3025
3054
|
}
|
|
3055
|
+
_canPlaceInside(textBound, shapeBound) {
|
|
3056
|
+
return this.attribute.position === 'inside';
|
|
3057
|
+
}
|
|
3026
3058
|
computeLayoutOuterRadius(r, width, height) {
|
|
3027
3059
|
return r / (Math.min(width, height) / 2);
|
|
3028
3060
|
}
|
|
@@ -3087,7 +3119,8 @@
|
|
|
3087
3119
|
const prevComponentMap = this._componentMap;
|
|
3088
3120
|
for (let i = 0; i < dataLabels.length; i++) {
|
|
3089
3121
|
const dataLabel = dataLabels[i];
|
|
3090
|
-
|
|
3122
|
+
const labelComponent = labelComponentMap[dataLabel.type] || LabelBase;
|
|
3123
|
+
if (labelComponent) {
|
|
3091
3124
|
const { baseMarkGroupName } = dataLabel;
|
|
3092
3125
|
let component = this._componentMap.get(baseMarkGroupName);
|
|
3093
3126
|
if (component) {
|
|
@@ -3097,7 +3130,7 @@
|
|
|
3097
3130
|
currentComponentMap.set(baseMarkGroupName, component);
|
|
3098
3131
|
}
|
|
3099
3132
|
else {
|
|
3100
|
-
component = new
|
|
3133
|
+
component = new labelComponent(dataLabel);
|
|
3101
3134
|
component.setBitmap(bitmap);
|
|
3102
3135
|
component.setBitmapTool(tool);
|
|
3103
3136
|
this.add(component);
|
|
@@ -4097,12 +4130,14 @@
|
|
|
4097
4130
|
}
|
|
4098
4131
|
function rotateYAxis(orient, items) {
|
|
4099
4132
|
items.forEach((item, i) => {
|
|
4100
|
-
item.
|
|
4133
|
+
item.attribute.angle &&
|
|
4134
|
+
item.setAttributes(Object.assign(Object.assign({}, getYAxisLabelAlign(orient, item.attribute.angle)), { angle: clampAngle(item.attribute.angle) }));
|
|
4101
4135
|
});
|
|
4102
4136
|
}
|
|
4103
4137
|
function rotateXAxis(orient, items) {
|
|
4104
4138
|
items.forEach(item => {
|
|
4105
|
-
item.
|
|
4139
|
+
item.attribute.angle &&
|
|
4140
|
+
item.setAttributes(Object.assign(Object.assign({}, getXAxisLabelAlign(orient, item.attribute.angle)), { angle: clampAngle(item.attribute.angle) }));
|
|
4106
4141
|
});
|
|
4107
4142
|
}
|
|
4108
4143
|
function getXAxisLabelAlign(orient, angle = 0) {
|
|
@@ -4568,6 +4603,92 @@
|
|
|
4568
4603
|
};
|
|
4569
4604
|
}
|
|
4570
4605
|
beforeLabelsOverlap(labelShapes, labelData, labelContainer, layer, layerCount) {
|
|
4606
|
+
const { flush = false } = this.attribute.label || {};
|
|
4607
|
+
if (flush) {
|
|
4608
|
+
const { orient, start, end } = this.attribute;
|
|
4609
|
+
const isX = orient === 'bottom' || orient === 'top';
|
|
4610
|
+
const first = labelShapes[0];
|
|
4611
|
+
const last = vutils.last(labelShapes);
|
|
4612
|
+
const isInverse = isX ? first.attribute.x > last.attribute.x : first.attribute.y < last.attribute.y;
|
|
4613
|
+
if (isX) {
|
|
4614
|
+
const width = Math.abs(start.x - end.x);
|
|
4615
|
+
if (isInverse) {
|
|
4616
|
+
const start = width;
|
|
4617
|
+
const end = 0;
|
|
4618
|
+
const startBound = first.AABBBounds.x2;
|
|
4619
|
+
const endBound = last.AABBBounds.x1;
|
|
4620
|
+
if (startBound > start) {
|
|
4621
|
+
first.setAttributes({
|
|
4622
|
+
x: start,
|
|
4623
|
+
textAlign: 'right'
|
|
4624
|
+
});
|
|
4625
|
+
}
|
|
4626
|
+
if (endBound < end) {
|
|
4627
|
+
last.setAttributes({
|
|
4628
|
+
x: end,
|
|
4629
|
+
textAlign: 'left'
|
|
4630
|
+
});
|
|
4631
|
+
}
|
|
4632
|
+
}
|
|
4633
|
+
else {
|
|
4634
|
+
const start = 0;
|
|
4635
|
+
const end = width;
|
|
4636
|
+
const startBound = first.AABBBounds.x1;
|
|
4637
|
+
const endBound = last.AABBBounds.x2;
|
|
4638
|
+
if (startBound < start) {
|
|
4639
|
+
first.setAttributes({
|
|
4640
|
+
x: start,
|
|
4641
|
+
textAlign: 'left'
|
|
4642
|
+
});
|
|
4643
|
+
}
|
|
4644
|
+
if (endBound > end) {
|
|
4645
|
+
last.setAttributes({
|
|
4646
|
+
x: end,
|
|
4647
|
+
textAlign: 'right'
|
|
4648
|
+
});
|
|
4649
|
+
}
|
|
4650
|
+
}
|
|
4651
|
+
}
|
|
4652
|
+
else {
|
|
4653
|
+
const height = Math.abs(start.y - end.y);
|
|
4654
|
+
if (isInverse) {
|
|
4655
|
+
const startBound = first.AABBBounds.y1;
|
|
4656
|
+
const endBound = last.AABBBounds.y2;
|
|
4657
|
+
const start = 0;
|
|
4658
|
+
const end = height;
|
|
4659
|
+
if (startBound < start) {
|
|
4660
|
+
first.setAttributes({
|
|
4661
|
+
y: start,
|
|
4662
|
+
textBaseline: 'top'
|
|
4663
|
+
});
|
|
4664
|
+
}
|
|
4665
|
+
if (endBound > end) {
|
|
4666
|
+
last.setAttributes({
|
|
4667
|
+
y: end,
|
|
4668
|
+
textBaseline: 'bottom'
|
|
4669
|
+
});
|
|
4670
|
+
}
|
|
4671
|
+
}
|
|
4672
|
+
else {
|
|
4673
|
+
const start = height;
|
|
4674
|
+
const end = 0;
|
|
4675
|
+
const startBound = first.AABBBounds.y2;
|
|
4676
|
+
const endBound = last.AABBBounds.y1;
|
|
4677
|
+
if (startBound > start) {
|
|
4678
|
+
first.setAttributes({
|
|
4679
|
+
y: start,
|
|
4680
|
+
textBaseline: 'bottom'
|
|
4681
|
+
});
|
|
4682
|
+
}
|
|
4683
|
+
if (endBound < end) {
|
|
4684
|
+
last.setAttributes({
|
|
4685
|
+
y: end,
|
|
4686
|
+
textBaseline: 'top'
|
|
4687
|
+
});
|
|
4688
|
+
}
|
|
4689
|
+
}
|
|
4690
|
+
}
|
|
4691
|
+
}
|
|
4571
4692
|
return;
|
|
4572
4693
|
}
|
|
4573
4694
|
handleLabelsOverlap(labelShapes, labelData, labelContainer, layer, layerCount) {
|
|
@@ -8759,16 +8880,16 @@
|
|
|
8759
8880
|
this._isPaused = true;
|
|
8760
8881
|
this.updateAttributes = () => {
|
|
8761
8882
|
this._startAttr = {
|
|
8762
|
-
style: Object.assign(Object.assign({ symbolType: iconPlay }, Controller.defaultControllerAttr), this.attribute.start.style)
|
|
8883
|
+
style: Object.assign(Object.assign(Object.assign({ symbolType: iconPlay }, Controller.defaultControllerAttr), { visible: this.attribute.start.visible }), this.attribute.start.style)
|
|
8763
8884
|
};
|
|
8764
8885
|
this._pauseAttr = {
|
|
8765
|
-
style: Object.assign(Object.assign({ symbolType: iconPause }, Controller.defaultControllerAttr), this.attribute.pause.style)
|
|
8886
|
+
style: Object.assign(Object.assign(Object.assign({ symbolType: iconPause }, Controller.defaultControllerAttr), { visible: this.attribute.pause.visible }), this.attribute.pause.style)
|
|
8766
8887
|
};
|
|
8767
8888
|
this._forwardAttr = {
|
|
8768
|
-
style: Object.assign(Object.assign({}, Controller.defaultControllerAttr), this.attribute.forward.style)
|
|
8889
|
+
style: Object.assign(Object.assign(Object.assign({}, Controller.defaultControllerAttr), { visible: this.attribute.forward.visible }), this.attribute.forward.style)
|
|
8769
8890
|
};
|
|
8770
8891
|
this._backwardAttr = {
|
|
8771
|
-
style: Object.assign(Object.assign({}, Controller.defaultControllerAttr), this.attribute.backward.style)
|
|
8892
|
+
style: Object.assign(Object.assign(Object.assign({}, Controller.defaultControllerAttr), { visible: this.attribute.backward.visible }), this.attribute.backward.style)
|
|
8772
8893
|
};
|
|
8773
8894
|
this.updateLayout();
|
|
8774
8895
|
};
|
|
@@ -8879,6 +9000,7 @@
|
|
|
8879
9000
|
}
|
|
8880
9001
|
}
|
|
8881
9002
|
Controller.defaultControllerAttr = {
|
|
9003
|
+
visible: true,
|
|
8882
9004
|
x: 0,
|
|
8883
9005
|
y: 0,
|
|
8884
9006
|
size: 20,
|
|
@@ -8887,7 +9009,6 @@
|
|
|
8887
9009
|
cursor: 'pointer'
|
|
8888
9010
|
};
|
|
8889
9011
|
Controller.defaultAttributes = {
|
|
8890
|
-
visible: true,
|
|
8891
9012
|
[ControllerTypeEnum.Start]: {},
|
|
8892
9013
|
[ControllerTypeEnum.Pause]: {},
|
|
8893
9014
|
[ControllerTypeEnum.Backward]: {},
|
|
@@ -8895,6 +9016,7 @@
|
|
|
8895
9016
|
};
|
|
8896
9017
|
|
|
8897
9018
|
const defaultControllerAttributes = {
|
|
9019
|
+
visible: true,
|
|
8898
9020
|
style: {
|
|
8899
9021
|
x: 0,
|
|
8900
9022
|
y: 0,
|
|
@@ -8915,12 +9037,18 @@
|
|
|
8915
9037
|
|
|
8916
9038
|
exports.PlayerEventEnum = void 0;
|
|
8917
9039
|
(function (PlayerEventEnum) {
|
|
8918
|
-
PlayerEventEnum["
|
|
8919
|
-
PlayerEventEnum["
|
|
8920
|
-
PlayerEventEnum["
|
|
8921
|
-
PlayerEventEnum["
|
|
8922
|
-
PlayerEventEnum["
|
|
8923
|
-
PlayerEventEnum["
|
|
9040
|
+
PlayerEventEnum["change"] = "change";
|
|
9041
|
+
PlayerEventEnum["play"] = "play";
|
|
9042
|
+
PlayerEventEnum["pause"] = "pause";
|
|
9043
|
+
PlayerEventEnum["backward"] = "backward";
|
|
9044
|
+
PlayerEventEnum["forward"] = "forward";
|
|
9045
|
+
PlayerEventEnum["end"] = "end";
|
|
9046
|
+
PlayerEventEnum["OnChange"] = "change";
|
|
9047
|
+
PlayerEventEnum["OnPlay"] = "play";
|
|
9048
|
+
PlayerEventEnum["OnPause"] = "pause";
|
|
9049
|
+
PlayerEventEnum["OnBackward"] = "backward";
|
|
9050
|
+
PlayerEventEnum["OnForward"] = "forward";
|
|
9051
|
+
PlayerEventEnum["OnEnd"] = "end";
|
|
8924
9052
|
})(exports.PlayerEventEnum || (exports.PlayerEventEnum = {}));
|
|
8925
9053
|
|
|
8926
9054
|
const isReachEndByDefault = ({ direction, maxIndex, dataIndex }) => {
|
|
@@ -8977,6 +9105,7 @@
|
|
|
8977
9105
|
handlerSize = vutils.max(this._handlerStyle.size[0], this._handlerStyle.size[1]);
|
|
8978
9106
|
}
|
|
8979
9107
|
const attrs = {
|
|
9108
|
+
visible: this._sliderVisible,
|
|
8980
9109
|
min: this._minIndex,
|
|
8981
9110
|
max: this._maxIndex,
|
|
8982
9111
|
value: (_a = this.attribute.dataIndex) !== null && _a !== void 0 ? _a : 0,
|
|
@@ -8989,7 +9118,6 @@
|
|
|
8989
9118
|
dy: this.attribute.slider.dy,
|
|
8990
9119
|
dx: this.attribute.slider.dx,
|
|
8991
9120
|
slidable: true,
|
|
8992
|
-
visible: true,
|
|
8993
9121
|
range: false,
|
|
8994
9122
|
handlerText: { visible: false },
|
|
8995
9123
|
startText: { visible: false },
|
|
@@ -9018,11 +9146,12 @@
|
|
|
9018
9146
|
this._initSlider = () => {
|
|
9019
9147
|
const attrs = this._updateSliderAttrs();
|
|
9020
9148
|
this._slider = new Slider(attrs);
|
|
9021
|
-
|
|
9149
|
+
if (this._sliderVisible) {
|
|
9150
|
+
this.add(this._slider);
|
|
9151
|
+
}
|
|
9022
9152
|
};
|
|
9023
9153
|
this._updateControllerAttrs = () => {
|
|
9024
9154
|
const attrs = {
|
|
9025
|
-
visible: true,
|
|
9026
9155
|
start: this._start,
|
|
9027
9156
|
pause: this._pause,
|
|
9028
9157
|
forward: this._forward,
|
|
@@ -9030,40 +9159,26 @@
|
|
|
9030
9159
|
};
|
|
9031
9160
|
if (isHorizontal(this._orient)) {
|
|
9032
9161
|
attrs.layout = 'horizontal';
|
|
9033
|
-
attrs.start = {
|
|
9034
|
-
|
|
9035
|
-
};
|
|
9036
|
-
attrs.
|
|
9037
|
-
style: Object.assign(Object.assign({}, attrs.pause.style), { x: this._layoutInfo.start.x, y: this._layoutInfo.start.y })
|
|
9038
|
-
};
|
|
9039
|
-
attrs.backward = {
|
|
9040
|
-
style: Object.assign(Object.assign({}, attrs.backward.style), { x: this._layoutInfo.backward.x, y: this._layoutInfo.backward.y })
|
|
9041
|
-
};
|
|
9042
|
-
attrs.forward = {
|
|
9043
|
-
style: Object.assign(Object.assign({}, attrs.forward.style), { x: this._layoutInfo.forward.x, y: this._layoutInfo.forward.y })
|
|
9044
|
-
};
|
|
9162
|
+
attrs.start = Object.assign(Object.assign({}, attrs.start), { style: Object.assign(Object.assign({}, attrs.start.style), { x: this._layoutInfo.start.x, y: this._layoutInfo.start.y }) });
|
|
9163
|
+
attrs.pause = Object.assign(Object.assign({}, attrs.pause), { style: Object.assign(Object.assign({}, attrs.pause.style), { x: this._layoutInfo.start.x, y: this._layoutInfo.start.y }) });
|
|
9164
|
+
attrs.backward = Object.assign(Object.assign({}, attrs.backward), { style: Object.assign(Object.assign({}, attrs.backward.style), { x: this._layoutInfo.backward.x, y: this._layoutInfo.backward.y }) });
|
|
9165
|
+
attrs.forward = Object.assign(Object.assign({}, attrs.forward), { style: Object.assign(Object.assign({}, attrs.forward.style), { x: this._layoutInfo.forward.x, y: this._layoutInfo.forward.y }) });
|
|
9045
9166
|
}
|
|
9046
9167
|
else {
|
|
9047
9168
|
attrs.layout = 'vertical';
|
|
9048
|
-
attrs.start = {
|
|
9049
|
-
|
|
9050
|
-
};
|
|
9051
|
-
attrs.
|
|
9052
|
-
style: Object.assign(Object.assign({}, attrs.pause.style), { x: this._layoutInfo.start.x, y: this._layoutInfo.start.y })
|
|
9053
|
-
};
|
|
9054
|
-
attrs.backward = {
|
|
9055
|
-
style: Object.assign(Object.assign({}, attrs.backward.style), { x: this._layoutInfo.backward.x, y: this._layoutInfo.backward.y })
|
|
9056
|
-
};
|
|
9057
|
-
attrs.forward = {
|
|
9058
|
-
style: Object.assign(Object.assign({}, attrs.forward.style), { x: this._layoutInfo.forward.x, y: this._layoutInfo.forward.y })
|
|
9059
|
-
};
|
|
9169
|
+
attrs.start = Object.assign(Object.assign({}, attrs.start), { style: Object.assign(Object.assign({}, attrs.start.style), { x: this._layoutInfo.start.x, y: this._layoutInfo.start.y }) });
|
|
9170
|
+
attrs.pause = Object.assign(Object.assign({}, attrs.pause), { style: Object.assign(Object.assign({}, attrs.pause.style), { x: this._layoutInfo.start.x, y: this._layoutInfo.start.y }) });
|
|
9171
|
+
attrs.backward = Object.assign(Object.assign({}, attrs.backward), { style: Object.assign(Object.assign({}, attrs.backward.style), { x: this._layoutInfo.backward.x, y: this._layoutInfo.backward.y }) });
|
|
9172
|
+
attrs.forward = Object.assign(Object.assign({}, attrs.forward), { style: Object.assign(Object.assign({}, attrs.forward.style), { x: this._layoutInfo.forward.x, y: this._layoutInfo.forward.y }) });
|
|
9060
9173
|
}
|
|
9061
9174
|
return attrs;
|
|
9062
9175
|
};
|
|
9063
9176
|
this._initController = () => {
|
|
9064
9177
|
const attrs = this._updateControllerAttrs();
|
|
9065
9178
|
this._controller = new Controller(attrs);
|
|
9066
|
-
|
|
9179
|
+
if (this._controllerVisible) {
|
|
9180
|
+
this.add(this._controller);
|
|
9181
|
+
}
|
|
9067
9182
|
};
|
|
9068
9183
|
this._initAttributes();
|
|
9069
9184
|
this._initLayoutInfo();
|
|
@@ -9071,19 +9186,21 @@
|
|
|
9071
9186
|
this._initSlider();
|
|
9072
9187
|
}
|
|
9073
9188
|
_initAttributes() {
|
|
9074
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
9189
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
9075
9190
|
this._size = this.attribute.size;
|
|
9076
9191
|
this._orient = this.attribute.orient;
|
|
9077
9192
|
this._data = this.attribute.data;
|
|
9078
9193
|
this._minIndex = 0;
|
|
9079
9194
|
this._maxIndex = this._data.length - 1;
|
|
9080
|
-
this.
|
|
9081
|
-
this.
|
|
9082
|
-
this.
|
|
9083
|
-
this.
|
|
9084
|
-
this.
|
|
9085
|
-
this.
|
|
9086
|
-
this.
|
|
9195
|
+
this._sliderVisible = (_b = (_a = this.attribute) === null || _a === void 0 ? void 0 : _a.slider) === null || _b === void 0 ? void 0 : _b.visible;
|
|
9196
|
+
this._railStyle = Object.assign({}, (_d = (_c = this.attribute) === null || _c === void 0 ? void 0 : _c.slider) === null || _d === void 0 ? void 0 : _d.railStyle);
|
|
9197
|
+
this._trackStyle = Object.assign({}, (_f = (_e = this.attribute) === null || _e === void 0 ? void 0 : _e.slider) === null || _f === void 0 ? void 0 : _f.trackStyle);
|
|
9198
|
+
this._handlerStyle = Object.assign({}, (_h = (_g = this.attribute) === null || _g === void 0 ? void 0 : _g.slider) === null || _h === void 0 ? void 0 : _h.handlerStyle);
|
|
9199
|
+
this._controllerVisible = (_k = (_j = this.attribute) === null || _j === void 0 ? void 0 : _j.controller) === null || _k === void 0 ? void 0 : _k.visible;
|
|
9200
|
+
this._start = Object.assign({}, (_m = (_l = this.attribute) === null || _l === void 0 ? void 0 : _l.controller) === null || _m === void 0 ? void 0 : _m.start);
|
|
9201
|
+
this._pause = Object.assign({}, (_p = (_o = this.attribute) === null || _o === void 0 ? void 0 : _o.controller) === null || _p === void 0 ? void 0 : _p.pause);
|
|
9202
|
+
this._forward = Object.assign({}, (_r = (_q = this.attribute) === null || _q === void 0 ? void 0 : _q.controller) === null || _r === void 0 ? void 0 : _r.forward);
|
|
9203
|
+
this._backward = Object.assign({}, (_t = (_s = this.attribute) === null || _s === void 0 ? void 0 : _s.controller) === null || _t === void 0 ? void 0 : _t.backward);
|
|
9087
9204
|
}
|
|
9088
9205
|
_initLayoutInfo() {
|
|
9089
9206
|
var _a, _b, _c;
|
|
@@ -9096,7 +9213,9 @@
|
|
|
9096
9213
|
const maxSize = vutils.isNumber(size) ? size : vutils.max(size[0], size[1]);
|
|
9097
9214
|
return len + controller.space + maxSize;
|
|
9098
9215
|
}, 0);
|
|
9099
|
-
const sliderPx =
|
|
9216
|
+
const sliderPx = this._sliderVisible
|
|
9217
|
+
? (isHorizontal(this._orient) ? (_b = this._size) === null || _b === void 0 ? void 0 : _b.width : (_c = this._size) === null || _c === void 0 ? void 0 : _c.height) - controllerPx
|
|
9218
|
+
: 0;
|
|
9100
9219
|
const railPx = sliderPx - this.attribute.slider.space;
|
|
9101
9220
|
const startPx = startControllers.reduce((px, controller) => {
|
|
9102
9221
|
const { key, space, style: { size } } = controller;
|
|
@@ -9151,6 +9270,7 @@
|
|
|
9151
9270
|
width: 300
|
|
9152
9271
|
},
|
|
9153
9272
|
slider: {
|
|
9273
|
+
visible: true,
|
|
9154
9274
|
space: 10,
|
|
9155
9275
|
dx: 0,
|
|
9156
9276
|
dy: 0,
|
|
@@ -9161,6 +9281,7 @@
|
|
|
9161
9281
|
handlerStyle: {}
|
|
9162
9282
|
},
|
|
9163
9283
|
controller: {
|
|
9284
|
+
visible: true,
|
|
9164
9285
|
start: Object.assign(Object.assign({}, defaultControllerAttributes), { key: 'start', position: 'start', space: 0 }),
|
|
9165
9286
|
pause: Object.assign(Object.assign({}, defaultControllerAttributes), { key: 'pause', position: 'start' }),
|
|
9166
9287
|
forward: Object.assign(Object.assign({}, defaultControllerAttributes), { key: 'forward', position: 'end' }),
|
|
@@ -9207,7 +9328,7 @@
|
|
|
9207
9328
|
const middle = Math.floor(e.detail.value) + 0.5;
|
|
9208
9329
|
this._dataIndex = e.detail.value >= middle ? Math.ceil(e.detail.value) : Math.floor(e.detail.value);
|
|
9209
9330
|
this._slider.setValue(this._dataIndex);
|
|
9210
|
-
this.dispatchCustomEvent(exports.PlayerEventEnum.
|
|
9331
|
+
this.dispatchCustomEvent(exports.PlayerEventEnum.change);
|
|
9211
9332
|
});
|
|
9212
9333
|
};
|
|
9213
9334
|
this.play = () => {
|
|
@@ -9238,7 +9359,7 @@
|
|
|
9238
9359
|
this._updateDataIndex(this._maxIndex);
|
|
9239
9360
|
}
|
|
9240
9361
|
}
|
|
9241
|
-
this.dispatchCustomEvent(exports.PlayerEventEnum.
|
|
9362
|
+
this.dispatchCustomEvent(exports.PlayerEventEnum.play);
|
|
9242
9363
|
this._isReachEnd = false;
|
|
9243
9364
|
this._tickTime = Date.now();
|
|
9244
9365
|
this._rafId = vrender.vglobal.getRequestAnimationFrame()(this._play.bind(this, true));
|
|
@@ -9251,14 +9372,14 @@
|
|
|
9251
9372
|
return;
|
|
9252
9373
|
}
|
|
9253
9374
|
if (isFirstPlay && this._activeIndex !== this._dataIndex) {
|
|
9254
|
-
this.dispatchCustomEvent(exports.PlayerEventEnum.
|
|
9375
|
+
this.dispatchCustomEvent(exports.PlayerEventEnum.change);
|
|
9255
9376
|
this._activeIndex = this._dataIndex;
|
|
9256
9377
|
}
|
|
9257
9378
|
else if (now - this._tickTime >= this._interval) {
|
|
9258
9379
|
this._tickTime = now;
|
|
9259
9380
|
this._updateDataIndex(forwardStep(this._direction, this._dataIndex, this._minIndex, this._maxIndex));
|
|
9260
9381
|
this._activeIndex = this._dataIndex;
|
|
9261
|
-
this.dispatchCustomEvent(exports.PlayerEventEnum.
|
|
9382
|
+
this.dispatchCustomEvent(exports.PlayerEventEnum.change);
|
|
9262
9383
|
}
|
|
9263
9384
|
if ((this._direction === 'default' && this._dataIndex >= this._maxIndex) ||
|
|
9264
9385
|
(this._direction === 'reverse' && this._dataIndex <= this._minIndex)) {
|
|
@@ -9275,7 +9396,7 @@
|
|
|
9275
9396
|
this._controller.togglePlay();
|
|
9276
9397
|
vrender.vglobal.getCancelAnimationFrame()(this._rafId);
|
|
9277
9398
|
this._activeIndex = -1;
|
|
9278
|
-
this.dispatchCustomEvent(exports.PlayerEventEnum.
|
|
9399
|
+
this.dispatchCustomEvent(exports.PlayerEventEnum.end);
|
|
9279
9400
|
};
|
|
9280
9401
|
this.pause = () => {
|
|
9281
9402
|
if (!this._isPlaying) {
|
|
@@ -9284,19 +9405,19 @@
|
|
|
9284
9405
|
this._isPlaying = false;
|
|
9285
9406
|
vrender.vglobal.getCancelAnimationFrame()(this._rafId);
|
|
9286
9407
|
this._controller.togglePlay();
|
|
9287
|
-
this.dispatchCustomEvent(exports.PlayerEventEnum.
|
|
9408
|
+
this.dispatchCustomEvent(exports.PlayerEventEnum.pause);
|
|
9288
9409
|
};
|
|
9289
9410
|
this.backward = () => {
|
|
9290
9411
|
const index = Math.max(this._dataIndex - 1, this._minIndex);
|
|
9291
9412
|
this._updateDataIndex(index);
|
|
9292
|
-
this.dispatchCustomEvent(exports.PlayerEventEnum.
|
|
9293
|
-
this.dispatchCustomEvent(exports.PlayerEventEnum.
|
|
9413
|
+
this.dispatchCustomEvent(exports.PlayerEventEnum.change);
|
|
9414
|
+
this.dispatchCustomEvent(exports.PlayerEventEnum.backward);
|
|
9294
9415
|
};
|
|
9295
9416
|
this.forward = () => {
|
|
9296
9417
|
const index = Math.min(this._dataIndex + 1, this._maxIndex);
|
|
9297
9418
|
this._updateDataIndex(index);
|
|
9298
|
-
this.dispatchCustomEvent(exports.PlayerEventEnum.
|
|
9299
|
-
this.dispatchCustomEvent(exports.PlayerEventEnum.
|
|
9419
|
+
this.dispatchCustomEvent(exports.PlayerEventEnum.change);
|
|
9420
|
+
this.dispatchCustomEvent(exports.PlayerEventEnum.forward);
|
|
9300
9421
|
};
|
|
9301
9422
|
this._initAttributes();
|
|
9302
9423
|
this._initEvents();
|
|
@@ -9377,7 +9498,7 @@
|
|
|
9377
9498
|
this._dataIndex = index;
|
|
9378
9499
|
this._activeIndex = index;
|
|
9379
9500
|
if (index !== this._maxIndex) {
|
|
9380
|
-
this.dispatchCustomEvent(exports.PlayerEventEnum.
|
|
9501
|
+
this.dispatchCustomEvent(exports.PlayerEventEnum.change);
|
|
9381
9502
|
}
|
|
9382
9503
|
}
|
|
9383
9504
|
};
|
|
@@ -9391,7 +9512,7 @@
|
|
|
9391
9512
|
this._elapsed = 0;
|
|
9392
9513
|
}
|
|
9393
9514
|
this._startTime = Date.now() - this._elapsed;
|
|
9394
|
-
this.dispatchCustomEvent(exports.PlayerEventEnum.
|
|
9515
|
+
this.dispatchCustomEvent(exports.PlayerEventEnum.play);
|
|
9395
9516
|
this._rafId = vrender.vglobal.getRequestAnimationFrame()(this._play.bind(this));
|
|
9396
9517
|
});
|
|
9397
9518
|
this._play = () => {
|
|
@@ -9408,7 +9529,7 @@
|
|
|
9408
9529
|
this._isPlaying = false;
|
|
9409
9530
|
vrender.vglobal.getCancelAnimationFrame()(this._rafId);
|
|
9410
9531
|
this._controller.togglePlay();
|
|
9411
|
-
this.dispatchCustomEvent(exports.PlayerEventEnum.
|
|
9532
|
+
this.dispatchCustomEvent(exports.PlayerEventEnum.end);
|
|
9412
9533
|
};
|
|
9413
9534
|
this.pause = () => {
|
|
9414
9535
|
if (!this._isPlaying) {
|
|
@@ -9418,7 +9539,7 @@
|
|
|
9418
9539
|
this._elapsed = Date.now() - this._startTime;
|
|
9419
9540
|
vrender.vglobal.getCancelAnimationFrame()(this._rafId);
|
|
9420
9541
|
this._controller.togglePlay();
|
|
9421
|
-
this.dispatchCustomEvent(exports.PlayerEventEnum.
|
|
9542
|
+
this.dispatchCustomEvent(exports.PlayerEventEnum.pause);
|
|
9422
9543
|
};
|
|
9423
9544
|
this.backward = () => {
|
|
9424
9545
|
const now = Date.now();
|
|
@@ -9433,7 +9554,7 @@
|
|
|
9433
9554
|
this._startTime = this._startTime + this._interval;
|
|
9434
9555
|
}
|
|
9435
9556
|
this._updateSlider();
|
|
9436
|
-
this.dispatchCustomEvent(exports.PlayerEventEnum.
|
|
9557
|
+
this.dispatchCustomEvent(exports.PlayerEventEnum.backward);
|
|
9437
9558
|
};
|
|
9438
9559
|
this.forward = () => {
|
|
9439
9560
|
const now = Date.now();
|
|
@@ -9448,7 +9569,7 @@
|
|
|
9448
9569
|
this._elapsed = elapsed;
|
|
9449
9570
|
}
|
|
9450
9571
|
this._updateSlider();
|
|
9451
|
-
this.dispatchCustomEvent(exports.PlayerEventEnum.
|
|
9572
|
+
this.dispatchCustomEvent(exports.PlayerEventEnum.forward);
|
|
9452
9573
|
};
|
|
9453
9574
|
this._initAttributes();
|
|
9454
9575
|
this._initEvents();
|
|
@@ -9762,6 +9883,13 @@
|
|
|
9762
9883
|
setUpdateDragMaskCallback(callback) {
|
|
9763
9884
|
vutils.isFunction(callback) && (this._updateDragMaskCallback = callback);
|
|
9764
9885
|
}
|
|
9886
|
+
releaseBrushEvents() {
|
|
9887
|
+
const { delayType = 'throttle', delayTime = 0 } = this.attribute;
|
|
9888
|
+
this.stage.removeEventListener('pointerdown', this._onBrushStart);
|
|
9889
|
+
this.stage.removeEventListener('pointermove', delayMap[delayType](this._onBrushing, delayTime));
|
|
9890
|
+
this.stage.removeEventListener('pointerup', this._onBrushEnd);
|
|
9891
|
+
this.stage.removeEventListener('pointerupoutside', this._onBrushEnd);
|
|
9892
|
+
}
|
|
9765
9893
|
}
|
|
9766
9894
|
Brush.defaultAttributes = DEFAULT_BRUSH_ATTRIBUTES;
|
|
9767
9895
|
|
|
@@ -10147,11 +10275,7 @@
|
|
|
10147
10275
|
}
|
|
10148
10276
|
Tooltip.defaultAttributes = defaultAttributes;
|
|
10149
10277
|
|
|
10150
|
-
|
|
10151
|
-
return new Tag(params ? params.attribute : {});
|
|
10152
|
-
}
|
|
10153
|
-
|
|
10154
|
-
const version = "0.14.6-alpha.9";
|
|
10278
|
+
const version = "0.14.7";
|
|
10155
10279
|
|
|
10156
10280
|
exports.AbstractComponent = AbstractComponent;
|
|
10157
10281
|
exports.ArcInfo = ArcInfo;
|
|
@@ -10202,7 +10326,6 @@
|
|
|
10202
10326
|
exports.Tag = Tag;
|
|
10203
10327
|
exports.Title = Title;
|
|
10204
10328
|
exports.Tooltip = Tooltip;
|
|
10205
|
-
exports.VTag = VTag;
|
|
10206
10329
|
exports.getHorizontalPath = getHorizontalPath;
|
|
10207
10330
|
exports.getSizeHandlerPath = getSizeHandlerPath;
|
|
10208
10331
|
exports.getVerticalPath = getVerticalPath;
|