@visactor/vrender-components 0.22.0-vstory.12 → 0.22.0-vstory.15

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/dist/index.es.js CHANGED
@@ -434,12 +434,15 @@ class Container {
434
434
  serviceIdentifier: injectIdentifier,
435
435
  constructorArgsMetadata: constructorArgsMetadata
436
436
  },
437
- request = {
437
+ bindings = (this._bindingDictionary.get(injectIdentifier) || []).filter(b => b.constraint(target));
438
+ if (bindings.length) {
439
+ const request = {
438
440
  injectIdentifier: injectIdentifier,
439
441
  metadata: constructorArgsMetadata,
440
- bindings: this._bindingDictionary.get(injectIdentifier).filter(b => b.constraint(target))
442
+ bindings: bindings
441
443
  };
442
- arr.push(request);
444
+ arr.push(request);
445
+ }
443
446
  }
444
447
  return arr;
445
448
  }
@@ -2275,6 +2278,7 @@ const DefaultStyle = Object.assign(Object.assign(Object.assign(Object.assign({
2275
2278
  texturePadding: 2,
2276
2279
  backgroundMode: "no-repeat",
2277
2280
  backgroundFit: !0,
2281
+ backgroundKeepAspectRatio: !1,
2278
2282
  backgroundClip: !0,
2279
2283
  backgroundScale: 1,
2280
2284
  backgroundOffsetX: 0,
@@ -2895,6 +2899,9 @@ let ATextMeasure = class {
2895
2899
  }
2896
2900
  compatibleMetrics(metrics, options) {
2897
2901
  if (null == metrics.actualBoundingBoxAscent || null == metrics.actualBoundingBoxDescent || null == metrics.fontBoundingBoxAscent || null == metrics.fontBoundingBoxDescent) {
2902
+ metrics = {
2903
+ width: metrics.width
2904
+ };
2898
2905
  const {
2899
2906
  ascent: ascent,
2900
2907
  descent: descent
@@ -2902,6 +2909,13 @@ let ATextMeasure = class {
2902
2909
  metrics.actualBoundingBoxAscent = ascent, metrics.actualBoundingBoxDescent = descent, metrics.fontBoundingBoxAscent = ascent, metrics.fontBoundingBoxDescent = descent;
2903
2910
  }
2904
2911
  if (null == metrics.actualBoundingBoxLeft || null == metrics.actualBoundingBoxRight) {
2912
+ metrics = {
2913
+ width: metrics.width,
2914
+ actualBoundingBoxAscent: metrics.actualBoundingBoxAscent,
2915
+ actualBoundingBoxDescent: metrics.actualBoundingBoxDescent,
2916
+ fontBoundingBoxAscent: metrics.fontBoundingBoxAscent,
2917
+ fontBoundingBoxDescent: metrics.fontBoundingBoxDescent
2918
+ };
2905
2919
  const {
2906
2920
  left: left,
2907
2921
  right: right
@@ -9171,6 +9185,12 @@ class Wrapper {
9171
9185
  }
9172
9186
  }
9173
9187
 
9188
+ let supportIntl = !1;
9189
+ try {
9190
+ supportIntl = Intl && "function" == typeof Intl.Segmenter;
9191
+ } catch (e) {
9192
+ supportIntl = !1;
9193
+ }
9174
9194
  const RICHTEXT_UPDATE_TAG_KEY = ["width", "height", "ellipsis", "wordBreak", "verticalDirection", "maxHeight", "maxWidth", "textAlign", "textBaseline", "textConfig", "layoutDirection", "fill", "stroke", "fontSize", "fontFamily", "fontStyle", "fontWeight", "lineWidth", "opacity", "fillOpacity", "strokeOpacity", ...GRAPHIC_UPDATE_TAG_KEY];
9175
9195
  class RichText extends Graphic {
9176
9196
  constructor(params) {
@@ -9260,6 +9280,16 @@ class RichText extends Graphic {
9260
9280
  return cache.every(item => item.isComposing || !(item.text && isString(item.text) && RichText.splitText(item.text).length > 1));
9261
9281
  }
9262
9282
  static splitText(text) {
9283
+ if (supportIntl) {
9284
+ const segmenter = new Intl.Segmenter(void 0, {
9285
+ granularity: "grapheme"
9286
+ }),
9287
+ segments = [];
9288
+ for (const {
9289
+ segment: segment
9290
+ } of segmenter.segment(text)) segments.push(segment);
9291
+ return segments;
9292
+ }
9263
9293
  return Array.from(text);
9264
9294
  }
9265
9295
  static TransformTextConfig2SingleCharacter(textConfig) {
@@ -9275,14 +9305,14 @@ class RichText extends Graphic {
9275
9305
  }), tc;
9276
9306
  }
9277
9307
  updateAABBBounds(attribute, richtextTheme, aabbBounds) {
9278
- var _a, _b;
9308
+ var _a, _b, _c, _d;
9279
9309
  const {
9280
9310
  width = richtextTheme.width,
9281
9311
  height = richtextTheme.height,
9282
9312
  maxWidth = richtextTheme.maxWidth,
9283
9313
  maxHeight = richtextTheme.maxHeight,
9284
9314
  textAlign = richtextTheme.textAlign,
9285
- textBaseline = richtextTheme.textBaseline,
9315
+ verticalDirection = null !== (_b = null !== (_a = attribute.textBaseline) && void 0 !== _a ? _a : richtextTheme.textBaseline) && void 0 !== _b ? _b : richtextTheme.verticalDirection,
9286
9316
  editOptions: editOptions
9287
9317
  } = attribute;
9288
9318
  if (width > 0 && height > 0) aabbBounds.set(0, 0, width, height);else {
@@ -9295,9 +9325,9 @@ class RichText extends Graphic {
9295
9325
  contentHeight = height || actualHeight || 0;
9296
9326
  contentHeight = "number" == typeof maxHeight && contentHeight > maxHeight ? maxHeight : contentHeight || 0, contentWidth = "number" == typeof maxWidth && contentWidth > maxWidth ? maxWidth : contentWidth || 0, aabbBounds.set(0, 0, contentWidth, contentHeight);
9297
9327
  }
9298
- editOptions && editOptions.keepHeightWhileEmpty && !aabbBounds.height() && !(null === (_a = attribute.textConfig) || void 0 === _a ? void 0 : _a.length) && (aabbBounds.y2 = aabbBounds.y1 + (null !== (_b = attribute.fontSize) && void 0 !== _b ? _b : 12), aabbBounds.x2 = aabbBounds.x1 + 2);
9328
+ editOptions && editOptions.keepHeightWhileEmpty && !aabbBounds.height() && !(null === (_c = attribute.textConfig) || void 0 === _c ? void 0 : _c.length) && (aabbBounds.y2 = aabbBounds.y1 + (null !== (_d = attribute.fontSize) && void 0 !== _d ? _d : 12), aabbBounds.x2 = aabbBounds.x1 + 2);
9299
9329
  let deltaY = 0;
9300
- switch (textBaseline) {
9330
+ switch (verticalDirection) {
9301
9331
  case "top":
9302
9332
  deltaY = 0;
9303
9333
  break;
@@ -9318,7 +9348,7 @@ class RichText extends Graphic {
9318
9348
  case "right":
9319
9349
  deltaX = -aabbBounds.width();
9320
9350
  }
9321
- return aabbBounds.translate(deltaX, deltaY), application.graphicService.updateTempAABBBounds(aabbBounds), null == attribute.forceBoundsHeight && null == attribute.forceBoundsWidth || application.graphicService.updateHTMLTextAABBBounds(attribute, richtextTheme, aabbBounds), application.graphicService.transformAABBBounds(attribute, aabbBounds, richtextTheme, !1, this), aabbBounds;
9351
+ return aabbBounds.translate(deltaX, deltaY), application.graphicService.updateTempAABBBounds(aabbBounds), null == attribute.forceBoundsHeight && null == attribute.forceBoundsWidth || application.graphicService.updateHTMLTextAABBBounds(attribute, richtextTheme, aabbBounds), application.graphicService.transformAABBBounds(attribute, aabbBounds, richtextTheme, !1, this), 0 === aabbBounds.width() && 0 === aabbBounds.height() && aabbBounds.clear(), aabbBounds;
9322
9352
  }
9323
9353
  needUpdateTags(keys) {
9324
9354
  return super.needUpdateTags(keys, RICHTEXT_UPDATE_TAG_KEY);
@@ -10144,6 +10174,7 @@ class DefaultBaseBackgroundRenderContribution {
10144
10174
  opacity = graphicAttribute.opacity,
10145
10175
  backgroundMode = graphicAttribute.backgroundMode,
10146
10176
  backgroundFit = graphicAttribute.backgroundFit,
10177
+ backgroundKeepAspectRatio = graphicAttribute.backgroundKeepAspectRatio,
10147
10178
  backgroundScale = graphicAttribute.backgroundScale,
10148
10179
  backgroundOffsetX = graphicAttribute.backgroundOffsetX,
10149
10180
  backgroundOffsetY = graphicAttribute.backgroundOffsetY,
@@ -10165,6 +10196,7 @@ class DefaultBaseBackgroundRenderContribution {
10165
10196
  context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.globalAlpha = backgroundOpacity * opacity, this.doDrawImage(context, res.data, b, {
10166
10197
  backgroundMode: backgroundMode,
10167
10198
  backgroundFit: backgroundFit,
10199
+ backgroundKeepAspectRatio: backgroundKeepAspectRatio,
10168
10200
  backgroundScale: backgroundScale,
10169
10201
  backgroundOffsetX: backgroundOffsetX,
10170
10202
  backgroundOffsetY: backgroundOffsetY
@@ -10175,6 +10207,7 @@ class DefaultBaseBackgroundRenderContribution {
10175
10207
  const {
10176
10208
  backgroundMode: backgroundMode,
10177
10209
  backgroundFit: backgroundFit,
10210
+ backgroundKeepAspectRatio: backgroundKeepAspectRatio,
10178
10211
  backgroundScale = 1,
10179
10212
  backgroundOffsetX = 0,
10180
10213
  backgroundOffsetY = 0
@@ -10184,7 +10217,12 @@ class DefaultBaseBackgroundRenderContribution {
10184
10217
  let w = targetW,
10185
10218
  h = targetH;
10186
10219
  if ("no-repeat" === backgroundMode) {
10187
- if (backgroundFit) context.drawImage(data, b.x1, b.y1, b.width(), b.height());else {
10220
+ if (backgroundFit) {
10221
+ if (backgroundKeepAspectRatio) {
10222
+ const maxScale = Math.max(targetW / data.width, targetH / data.height);
10223
+ context.drawImage(data, b.x1 + backgroundOffsetX, b.y1 + backgroundOffsetY, data.width * maxScale * backgroundScale, data.height * maxScale * backgroundScale);
10224
+ } else context.drawImage(data, b.x1, b.y1, b.width(), b.height());
10225
+ } else {
10188
10226
  const resW = data.width * backgroundScale,
10189
10227
  resH = data.height * backgroundScale;
10190
10228
  context.drawImage(data, b.x1 + backgroundOffsetX, b.y1 + backgroundOffsetY, resW, resH);
@@ -10490,6 +10528,7 @@ class DefaultGroupBackgroundRenderContribution extends DefaultBaseBackgroundRend
10490
10528
  background: background,
10491
10529
  backgroundMode = graphicAttribute.backgroundMode,
10492
10530
  backgroundFit = graphicAttribute.backgroundFit,
10531
+ backgroundKeepAspectRatio = graphicAttribute.backgroundKeepAspectRatio,
10493
10532
  backgroundScale = graphicAttribute.backgroundScale,
10494
10533
  backgroundOffsetX = graphicAttribute.backgroundOffsetX,
10495
10534
  backgroundOffsetY = graphicAttribute.backgroundOffsetY
@@ -10502,6 +10541,7 @@ class DefaultGroupBackgroundRenderContribution extends DefaultBaseBackgroundRend
10502
10541
  this.doDrawImage(context, res.data, b, {
10503
10542
  backgroundMode: backgroundMode,
10504
10543
  backgroundFit: backgroundFit,
10544
+ backgroundKeepAspectRatio: backgroundKeepAspectRatio,
10505
10545
  backgroundScale: backgroundScale,
10506
10546
  backgroundOffsetX: backgroundOffsetX,
10507
10547
  backgroundOffsetY: backgroundOffsetY
@@ -11833,7 +11873,8 @@ class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRende
11833
11873
  var _a, _c, _d, _e, _f, _g, _h, _j, _k, _l;
11834
11874
  const {
11835
11875
  backgroundMode = graphicAttribute.backgroundMode,
11836
- backgroundFit = graphicAttribute.backgroundFit
11876
+ backgroundFit = graphicAttribute.backgroundFit,
11877
+ backgroundKeepAspectRatio = graphicAttribute.backgroundKeepAspectRatio
11837
11878
  } = graphic.attribute;
11838
11879
  let matrix,
11839
11880
  {
@@ -11872,7 +11913,8 @@ class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRende
11872
11913
  if ("success" !== res.state || !res.data) return void restore();
11873
11914
  context.highPerformanceSave(), onlyTranslate && context.setTransformFromMatrix(graphic.parent.globalTransMatrix, !0), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), this.doDrawImage(context, res.data, b, {
11874
11915
  backgroundMode: backgroundMode,
11875
- backgroundFit: backgroundFit
11916
+ backgroundFit: backgroundFit,
11917
+ backgroundKeepAspectRatio: backgroundKeepAspectRatio
11876
11918
  }), context.highPerformanceRestore(), context.setTransformForCurrent();
11877
11919
  } else {
11878
11920
  const {
@@ -12989,7 +13031,7 @@ var __decorate$q = undefined && undefined.__decorate || function (decorators, ta
12989
13031
  };
12990
13032
  let DefaultDrawContribution = class {
12991
13033
  constructor(contributions, drawItemInterceptorContributions) {
12992
- this.contributions = contributions, this.drawItemInterceptorContributions = drawItemInterceptorContributions, this.currentRenderMap = new Map(), this.defaultRenderMap = new Map(), this.styleRenderMap = new Map(), this.dirtyBounds = new Bounds(), this.backupDirtyBounds = new Bounds(), this.global = application.global, this.layerService = application.layerService, this.init();
13034
+ this.contributions = contributions, this.drawItemInterceptorContributions = drawItemInterceptorContributions, this.currentRenderMap = new Map(), this.defaultRenderMap = new Map(), this.styleRenderMap = new Map(), this.dirtyBounds = new Bounds(), this.backupDirtyBounds = new Bounds(), this.global = application.global, this.layerService = application.layerService, isArray(this.contributions) || (this.contributions = [this.contributions]), this.init();
12993
13035
  }
12994
13036
  init() {
12995
13037
  this.contributions.forEach(item => {
@@ -13792,6 +13834,7 @@ class PickerBase {
13792
13834
  contains(graphic, point, params) {
13793
13835
  if (!graphic.AABBBounds.containsPoint(point)) return !1;
13794
13836
  if ("imprecise" === graphic.attribute.pickMode) return !0;
13837
+ if (!this.canvasRenderer) return !0;
13795
13838
  const {
13796
13839
  pickContext: pickContext
13797
13840
  } = null != params ? params : {};
@@ -20502,13 +20545,13 @@ class LabelBase extends AbstractComponent {
20502
20545
  }
20503
20546
  let labels = this._initText(data);
20504
20547
  if (isFunction(customLayoutFunc)) {
20505
- labels = customLayoutFunc(data, labels, this.getRelatedGraphic.bind(this), this._isCollectionBase ? (d) => this._idToPoint.get(d.id) : null);
20548
+ labels = customLayoutFunc(data, labels, this.getRelatedGraphic.bind(this), this._isCollectionBase ? (d) => this._idToPoint.get(d.id) : null, this);
20506
20549
  }
20507
20550
  else {
20508
20551
  labels = this._layout(labels);
20509
20552
  }
20510
20553
  if (isFunction(customOverlapFunc)) {
20511
- labels = customOverlapFunc(labels, this.getRelatedGraphic.bind(this), this._isCollectionBase ? (d) => this._idToPoint.get(d.id) : null);
20554
+ labels = customOverlapFunc(labels, this.getRelatedGraphic.bind(this), this._isCollectionBase ? (d) => this._idToPoint.get(d.id) : null, this);
20512
20555
  }
20513
20556
  else {
20514
20557
  if (overlap !== false) {
@@ -20516,7 +20559,7 @@ class LabelBase extends AbstractComponent {
20516
20559
  }
20517
20560
  }
20518
20561
  if (isFunction(this.attribute.onAfterOverlapping)) {
20519
- this.attribute.onAfterOverlapping(labels, this.getRelatedGraphic.bind(this), this._isCollectionBase ? (d) => this._idToPoint.get(d.id) : null);
20562
+ this.attribute.onAfterOverlapping(labels, this.getRelatedGraphic.bind(this), this._isCollectionBase ? (d) => this._idToPoint.get(d.id) : null, this);
20520
20563
  }
20521
20564
  if (labels && labels.length) {
20522
20565
  labels.forEach(label => {
@@ -31212,6 +31255,6 @@ StoryLabelItem.defaultAttributes = {
31212
31255
  theme: 'default'
31213
31256
  };
31214
31257
 
31215
- const version = "0.22.0-vstory.12";
31258
+ const version = "0.22.0-vstory.15";
31216
31259
 
31217
31260
  export { AXIS_ELEMENT_NAME, AbstractComponent, ArcInfo, ArcLabel, ArcSegment, AxisStateValue, BasePlayer, Brush, CheckBox, CircleAxis, CircleAxisGrid, CircleCrosshair, ColorContinuousLegend, ContinuousPlayer, DEFAULT_ITEM_SPACE_COL, DEFAULT_ITEM_SPACE_ROW, DEFAULT_LABEL_SPACE, DEFAULT_PAGER_SPACE, DEFAULT_SHAPE_SIZE, DEFAULT_SHAPE_SPACE, DEFAULT_STATES$1 as DEFAULT_STATES, DEFAULT_TITLE_SPACE, DEFAULT_VALUE_SPACE, DataLabel, DataZoom, DataZoomActiveTag, DirectionEnum, DiscreteLegend, DiscretePlayer, EmptyTip, GroupTransition, IMarkAreaLabelPosition, IMarkCommonArcLabelPosition, IMarkLineLabelPosition, IMarkPointItemPosition, IOperateType, Indicator, LEGEND_ELEMENT_NAME, LabelBase, LegendEvent, LegendStateValue, LineAxis, LineAxisGrid, LineCrosshair, LineLabel, LinkPath, MarkArcArea, MarkArcLine, MarkArea, MarkLine, MarkPoint, Pager, PlayerEventEnum, PolygonCrosshair, PolygonSectorCrosshair, PopTip, Radio, RectCrosshair, RectLabel, SLIDER_ELEMENT_NAME, ScrollBar, SectorCrosshair, Segment, SizeContinuousLegend, Slider, StoryLabelItem, Switch, SymbolLabel, Tag, Timeline, Title, Tooltip, TopZIndex, VTag, WeatherBox, alignTextInLine, angle, angleLabelOrientAttribute, angleTo, cartesianTicks, clampRadian, computeOffsetForlimit, continuousTicks, contrastAccessibilityChecker, convertDomainToTickData, createTextGraphicByType, deltaXYToAngle, fuzzyEqualNumber, getAxisBreakSymbolAttrs, getCircleLabelPosition, getCirclePoints, getCircleVerticalVector, getElMap, getHorizontalPath, getMarksByName, getNoneGroupMarksByName, getPolarAngleLabelPosition, getPolygonPath, getSizeHandlerPath, getTextAlignAttrOfVerticalDir, getTextType, getVerticalCoord, getVerticalPath, hasOverlap, htmlAttributeTransform, initTextMeasure, isInRange, isPostiveXAxis, isRichText, isVisible, labelSmartInvert, length, limitShapeInBounds, linearDiscreteTicks, loadPoptip, loadScrollbar, measureTextSize, normalize, polarAngleAxisDiscreteTicks, polarTicks, reactAttributeTransform, registerArcDataLabel, registerLineDataLabel, registerMarkArcAreaAnimate, registerMarkArcLineAnimate, registerMarkAreaAnimate, registerMarkLineAnimate, registerMarkPointAnimate, registerRectDataLabel, registerSymbolDataLabel, removeRepeatPoint, richTextAttributeTransform, scale, scrollbarModule, setPoptipTheme, smartInvertStrategy, tan2AngleToAngle, textIntersect, ticks, traverseGroup, version };
package/es/axis/util.js CHANGED
@@ -99,5 +99,4 @@ export function hasOverlap(items, pad) {
99
99
  for (let b, i = 1, n = items.length, a = items[0]; i < n; a = b, ++i) if (b = items[i],
100
100
  textIntersect(a, b, pad)) return !0;
101
101
  return !1;
102
- }
103
- //# sourceMappingURL=util.js.map
102
+ }
package/es/brush/type.js CHANGED
@@ -4,4 +4,5 @@ export var IOperateType;
4
4
  IOperateType.drawStart = "drawStart", IOperateType.drawEnd = "drawEnd", IOperateType.drawing = "drawing",
5
5
  IOperateType.moving = "moving", IOperateType.moveStart = "moveStart", IOperateType.moveEnd = "moveEnd",
6
6
  IOperateType.brushClear = "brushClear";
7
- }(IOperateType || (IOperateType = {}));
7
+ }(IOperateType || (IOperateType = {}));
8
+ //# sourceMappingURL=type.js.map
package/es/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const version = "0.22.0-vstory.12";
1
+ export declare const version = "0.22.0-vstory.15";
2
2
  export * from './core/base';
3
3
  export * from './core/type';
4
4
  export * from './scrollbar';
package/es/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export const version = "0.22.0-vstory.12";
1
+ export const version = "0.22.0-vstory.15";
2
2
 
3
3
  export * from "./core/base";
4
4
 
package/es/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,OAAO,GAAG,kBAAkB,CAAC;AAE1C,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.22.0-vstory.12\";\n\nexport * from './core/base';\nexport * from './core/type';\nexport * from './scrollbar';\nexport * from './tag';\nexport * from './poptip';\nexport * from './crosshair';\nexport * from './label';\nexport * from './axis';\nexport * from './axis/grid';\nexport * from './segment';\nexport * from './data-zoom';\nexport * from './marker';\nexport * from './pager';\nexport * from './legend';\nexport * from './title';\nexport * from './indicator';\nexport * from './slider';\nexport * from './link-path';\nexport * from './player';\nexport * from './brush';\nexport * from './tooltip';\nexport * from './timeline';\nexport * from './interface';\nexport * from './jsx';\nexport * from './checkbox';\nexport * from './radio';\nexport * from './empty-tip';\nexport * from './weather';\nexport * from './util';\nexport * from './switch';\nexport * from './label-item';\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,OAAO,GAAG,kBAAkB,CAAC;AAE1C,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.22.0-vstory.15\";\n\nexport * from './core/base';\nexport * from './core/type';\nexport * from './scrollbar';\nexport * from './tag';\nexport * from './poptip';\nexport * from './crosshair';\nexport * from './label';\nexport * from './axis';\nexport * from './axis/grid';\nexport * from './segment';\nexport * from './data-zoom';\nexport * from './marker';\nexport * from './pager';\nexport * from './legend';\nexport * from './title';\nexport * from './indicator';\nexport * from './slider';\nexport * from './link-path';\nexport * from './player';\nexport * from './brush';\nexport * from './tooltip';\nexport * from './timeline';\nexport * from './interface';\nexport * from './jsx';\nexport * from './checkbox';\nexport * from './radio';\nexport * from './empty-tip';\nexport * from './weather';\nexport * from './util';\nexport * from './switch';\nexport * from './label-item';\n"]}
package/es/label/base.js CHANGED
@@ -102,9 +102,9 @@ export class LabelBase extends AbstractComponent {
102
102
  data = data.filter((d => !seenIds.has(d.id) && seenIds.add(d.id)));
103
103
  }
104
104
  let labels = this._initText(data);
105
- labels = isFunction(customLayoutFunc) ? customLayoutFunc(data, labels, this.getRelatedGraphic.bind(this), this._isCollectionBase ? d => this._idToPoint.get(d.id) : null) : this._layout(labels),
106
- isFunction(customOverlapFunc) ? labels = customOverlapFunc(labels, this.getRelatedGraphic.bind(this), this._isCollectionBase ? d => this._idToPoint.get(d.id) : null) : !1 !== overlap && (labels = this._overlapping(labels)),
107
- isFunction(this.attribute.onAfterOverlapping) && this.attribute.onAfterOverlapping(labels, this.getRelatedGraphic.bind(this), this._isCollectionBase ? d => this._idToPoint.get(d.id) : null),
105
+ labels = isFunction(customLayoutFunc) ? customLayoutFunc(data, labels, this.getRelatedGraphic.bind(this), this._isCollectionBase ? d => this._idToPoint.get(d.id) : null, this) : this._layout(labels),
106
+ isFunction(customOverlapFunc) ? labels = customOverlapFunc(labels, this.getRelatedGraphic.bind(this), this._isCollectionBase ? d => this._idToPoint.get(d.id) : null, this) : !1 !== overlap && (labels = this._overlapping(labels)),
107
+ isFunction(this.attribute.onAfterOverlapping) && this.attribute.onAfterOverlapping(labels, this.getRelatedGraphic.bind(this), this._isCollectionBase ? d => this._idToPoint.get(d.id) : null, this),
108
108
  labels && labels.length && labels.forEach((label => {
109
109
  this._bindEvent(label), this._setStatesOfText(label);
110
110
  })), !1 !== smartInvert && this._smartInvert(labels), this._renderLabels(labels);