tvcharts 0.9.34 → 0.9.35

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.
@@ -673,20 +673,23 @@ var PlaybackOrderView = /** @class */function (_super) {
673
673
  var closeWidth = descClosePadding * 2 + 10;
674
674
  var descRectWidth = sizeRectWidth + profitWidth + closeWidth;
675
675
  var leftRectWidth = rect.width / 2;
676
- var buttonCount = 1 + (order.stopProfit ? 0 : 1) + (order.stopLoss ? 0 : 1);
676
+ var circleMargin = 30;
677
+ var isOverlap = rect.width < descRectWidth + labelRectWidth * 3 + orderTpLMargin + 1 + descLMargin + circleR + circleMargin * 2;
678
+ if (isOverlap) {
679
+ circleMargin = 15;
680
+ }
681
+ var buttonCount = isOverlap ? 1 : 1 + (order.stopProfit ? 0 : 1) + (order.stopLoss ? 0 : 1);
677
682
  var buttonWidth = labelRectWidth * buttonCount + orderTpLMargin + 1 + descLMargin;
678
683
  var isOverlay = rect.width < descRectWidth + buttonWidth + circleR;
679
684
  // let baseX = rect.width / 2;
680
685
  // let circleMargin = Math.min(maxCircleMargin, (leftRectWidth - circleR - descRectWidth /2) / 2);
681
686
  var baseX = rect.width - circleR - descRectWidth / 2 - 60;
682
- var circleMargin = 30;
683
- var isOverlap = rect.width < descRectWidth + labelRectWidth * 3 + orderTpLMargin + 1 + descLMargin + circleR + circleMargin * 2;
684
687
  if (isOverlay) {
685
688
  baseX = rect.width - circleR - descRectWidth / 2;
686
689
  circleMargin = 0;
687
690
  } else if (leftRectWidth < descRectWidth / 2 + buttonWidth) {
688
691
  baseX = buttonWidth + descRectWidth / 2;
689
- circleMargin = Math.max(Math.min(maxCircleMargin, (rect.width - baseX - descRectWidth / 2 - circleR) / 2), 0);
692
+ circleMargin = Math.max(Math.min(circleMargin - 2, (rect.width - baseX - descRectWidth / 2 - circleR) / 2), 0);
690
693
  }
691
694
  var startX = rect.x + baseX - descRectWidth / 2 - buttonWidth;
692
695
  orderClosePositionEl.attr('x', isOverlap ? startX + labelRectWidth * (buttonCount - 1) + 1 + descLMargin : startX);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tvcharts",
3
- "version": "0.9.34",
3
+ "version": "0.9.35",
4
4
  "main": "dist/echarts.js",
5
5
  "module": "index.js",
6
6
  "jsdelivr": "dist/echarts.min.js",