@visactor/vrender-components 0.13.6 → 0.13.7-alpha.0

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.js CHANGED
@@ -543,7 +543,7 @@
543
543
  super(vutils.merge({}, Tag.defaultAttributes, attributes));
544
544
  }
545
545
  render() {
546
- const { text = '', textStyle = {}, shape = {}, panel = {}, space = 4, minWidth, maxWidth, padding = 4, visible, state } = this.attribute;
546
+ const { text = '', textStyle = {}, shape = {}, panel = {}, space = 4, minWidth, maxWidth, padding = 4, visible, state, formatMethod } = this.attribute;
547
547
  const parsedPadding = vutils.normalizePadding(padding);
548
548
  const group = this.createOrUpdateChild('tag-content', { x: 0, y: 0, zIndex: 1 }, 'group');
549
549
  let symbol;
@@ -574,7 +574,7 @@
574
574
  tagWidth += symbolPlaceWidth;
575
575
  textX += symbolPlaceWidth;
576
576
  const textAttrs = {
577
- text,
577
+ text: formatMethod ? formatMethod(text) : text,
578
578
  visible: vutils.isValid(text) && visible !== false,
579
579
  lineHeight: textStyle?.fontSize,
580
580
  ...textStyle,
@@ -4234,7 +4234,7 @@
4234
4234
  _layoutAttrFromConfig;
4235
4235
  constructor(attributes) {
4236
4236
  super(vutils.merge({}, DataZoom.defaultAttributes, attributes));
4237
- const { start, end, size, orient, showDetail, position, previewData, previewCallbackX, previewCallbackY, previewCallbackX1, previewCallbackY1 } = this.attribute;
4237
+ const { start, end, size, orient, showDetail, position, previewData, previewCallbackX, previewCallbackY, previewCallbackX1, previewCallbackY1, updateStateCallback } = this.attribute;
4238
4238
  const { width, height } = size;
4239
4239
  start && (this.state.start = start);
4240
4240
  end && (this.state.end = end);
@@ -4255,6 +4255,7 @@
4255
4255
  vutils.isFunction(previewCallbackY) && (this._previewCallbackY = previewCallbackY);
4256
4256
  vutils.isFunction(previewCallbackX1) && (this._previewCallbackX1 = previewCallbackX1);
4257
4257
  vutils.isFunction(previewCallbackY1) && (this._previewCallbackY1 = previewCallbackY1);
4258
+ vutils.isFunction(updateStateCallback) && (this._updateStateCallback = updateStateCallback);
4258
4259
  }
4259
4260
  bindEvents() {
4260
4261
  const { showDetail, brushSelect } = this.attribute;
@@ -4882,6 +4883,7 @@
4882
4883
  this.state.end = end;
4883
4884
  if (startAttr !== this.state.start || endAttr !== this.state.end) {
4884
4885
  this.setAttributes({ start, end });
4886
+ this._updateStateCallback && this._updateStateCallback(start, end);
4885
4887
  }
4886
4888
  }
4887
4889
  }
@@ -9533,7 +9535,7 @@
9533
9535
  }
9534
9536
  }
9535
9537
 
9536
- const version = "0.13.6";
9538
+ const version = "0.13.7-alpha.0";
9537
9539
 
9538
9540
  exports.AbstractComponent = AbstractComponent;
9539
9541
  exports.BasePlayer = BasePlayer;