You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2021/07/08 02:37:25 UTC

[echarts] branch master updated: chore: fix incorrect zrender modules import (#15308)

This is an automated email from the ASF dual-hosted git repository.

shenyi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/echarts.git


The following commit(s) were added to refs/heads/master by this push:
     new 1f82a24  chore: fix incorrect zrender modules import (#15308)
1f82a24 is described below

commit 1f82a24c86472954158cd38f7e05ad9cb26517a0
Author: Yi Shen <bm...@gmail.com>
AuthorDate: Thu Jul 8 10:37:15 2021 +0800

    chore: fix incorrect zrender modules import (#15308)
    
    * chore: fix incorrect zrender modules import
    
    * remove unexpected visual-test.yml
---
 src/chart/bar/BarView.ts | 8 +++-----
 src/label/sectorLabel.ts | 3 ++-
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/chart/bar/BarView.ts b/src/chart/bar/BarView.ts
index 65a79d8..521da0e 100644
--- a/src/chart/bar/BarView.ts
+++ b/src/chart/bar/BarView.ts
@@ -762,8 +762,7 @@ const elementCreator: {
         sector.name = 'item';
 
         const positionMap = createPolarPositionMapping(isRadial);
-        sector.calculateTextPosition
-            = createSectorCalculateTextPosition<PolarBarLabelPosition>(positionMap);
+        sector.calculateTextPosition = createSectorCalculateTextPosition<PolarBarLabelPosition>(positionMap);
 
         // Animation
         if (animationModel) {
@@ -918,8 +917,7 @@ function isZeroOnPolar(layout: SectorLayout) {
 }
 
 function createPolarPositionMapping(isRadial: boolean)
-    : (position: PolarBarLabelPosition) => SectorTextPosition
-{
+    : (position: PolarBarLabelPosition) => SectorTextPosition {
     return ((isRadial: boolean) => {
         const arcOrAngle = isRadial ? 'Arc' : 'Angle';
         return (position: PolarBarLabelPosition) => {
@@ -983,7 +981,7 @@ function updateStyle(
     );
 
     if (isPolar) {
-        let position = seriesModel.get(['label', 'position']);
+        const position = seriesModel.get(['label', 'position']);
         setSectorTextRotation(
             el as Sector,
             position === 'outside' ? labelPositionOutside : position,
diff --git a/src/label/sectorLabel.ts b/src/label/sectorLabel.ts
index 0b4427f..ba75e03 100644
--- a/src/label/sectorLabel.ts
+++ b/src/label/sectorLabel.ts
@@ -1,8 +1,9 @@
-import {RectLike, Sector} from 'zrender';
 import {calculateTextPosition, TextPositionCalculationResult} from 'zrender/src/contain/text';
+import { RectLike } from 'zrender/src/core/BoundingRect';
 import {BuiltinTextPosition, TextAlign, TextVerticalAlign} from 'zrender/src/core/types';
 import {isArray} from 'zrender/src/core/util';
 import {ElementCalculateTextPosition, ElementTextConfig} from 'zrender/src/Element';
+import { Sector } from '../util/graphic';
 
 export type SectorTextPosition = BuiltinTextPosition
     | 'startAngle' | 'insideStartAngle'

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org