tvcharts 0.9.24 → 0.9.26

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.
@@ -47,6 +47,8 @@ import ChartView from '../../view/Chart.js';
47
47
  import { createClipPath } from '../helper/createClipPathFromCoordSys.js';
48
48
  import NormalBoxPath from './NormalBoxPath.js';
49
49
  import WickPath from './WickPath.js';
50
+ import { getECData } from '../../util/innerStore.js';
51
+ import { toggleHoverEmphasis } from '../../util/states.js';
50
52
  // const SKIP_PROPS = ['color', 'borderColor'] as const;
51
53
  var CandlePlotView = /** @class */function (_super) {
52
54
  __extends(CandlePlotView, _super);
@@ -125,10 +127,9 @@ var CandlePlotView = /** @class */function (_super) {
125
127
  } else {
126
128
  this.group.removeClipPath();
127
129
  }
128
- // toggleHoverEmphasis(this.group, null, null, false);
129
- // getECData(this.group).groupId = groupId;
130
+ toggleHoverEmphasis(this.group, null, null, false);
131
+ getECData(this.group).groupId = groupId;
130
132
  };
131
-
132
133
  CandlePlotView.prototype.remove = function (ecModel) {
133
134
  this._clear();
134
135
  };
@@ -674,8 +674,10 @@ var PlaybackOrderView = /** @class */function (_super) {
674
674
  var buttonCount = 1 + (order.stopProfit ? 0 : 1) + (order.stopLoss ? 0 : 1);
675
675
  var buttonWidth = labelRectWidth * buttonCount + orderTpLMargin + 1 + descLMargin;
676
676
  var isOverlay = rect.width < descRectWidth + buttonWidth + circleR;
677
- var baseX = rect.width / 2;
678
- var circleMargin = Math.min(maxCircleMargin, (leftRectWidth - circleR - descRectWidth / 2) / 2);
677
+ // let baseX = rect.width / 2;
678
+ // let circleMargin = Math.min(maxCircleMargin, (leftRectWidth - circleR - descRectWidth /2) / 2);
679
+ var baseX = rect.width - circleR - descRectWidth / 2 - 60;
680
+ var circleMargin = 30;
679
681
  if (isOverlay) {
680
682
  baseX = rect.width - circleR - descRectWidth / 2;
681
683
  circleMargin = 0;
@@ -1001,6 +1001,11 @@ var ECharts = /** @class */function (_super) {
1001
1001
  else if (ecData.eventData) {
1002
1002
  params = extend({}, ecData.eventData);
1003
1003
  return true;
1004
+ } else if (ecData.groupId) {
1005
+ params = {
1006
+ groupId: ecData.groupId
1007
+ };
1008
+ return true;
1004
1009
  }
1005
1010
  }, true);
1006
1011
  }
@@ -1012,6 +1017,12 @@ var ECharts = /** @class */function (_super) {
1012
1017
  // }
1013
1018
  // Otherwise event query can not work.
1014
1019
  if (params) {
1020
+ if (params.groupId) {
1021
+ params.event = e;
1022
+ params.type = eveName;
1023
+ _this.trigger(eveName, params);
1024
+ return;
1025
+ }
1015
1026
  var componentType = params.componentType;
1016
1027
  var componentIndex = params.componentIndex;
1017
1028
  // Special handling for historic reason: when trigger by
@@ -2193,7 +2204,7 @@ var ECharts = /** @class */function (_super) {
2193
2204
  markStatusToUpdate(ecIns);
2194
2205
  }
2195
2206
  }).on('mousedown', function (e) {
2196
- if (e.event.zrByTouch) {
2207
+ if (e.event.zrByTouch || e.event.button) {
2197
2208
  return;
2198
2209
  }
2199
2210
  var el = e.target;
@@ -574,11 +574,11 @@ export function handleGlobalMouseDownForHighDown(dispatcher, e, api) {
574
574
  if (highlightDisabled) {
575
575
  return;
576
576
  }
577
- e.event.stopPropagation();
577
+ // e.event.stopPropagation();
578
578
  api.setSelectedComponentGroupId(groupId);
579
579
  return true;
580
580
  } else if (oldSelectedComponentGroupId) {
581
- e.event.stopPropagation();
581
+ // e.event.stopPropagation();
582
582
  api.setSelectedComponentGroupId('');
583
583
  return true;
584
584
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tvcharts",
3
- "version": "0.9.24",
3
+ "version": "0.9.26",
4
4
  "main": "dist/echarts.js",
5
5
  "module": "index.js",
6
6
  "jsdelivr": "dist/echarts.min.js",