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:31:31 UTC
[echarts] 01/01: chore: fix incorrect zrender modules import
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch fix-zrender-import
in repository https://gitbox.apache.org/repos/asf/echarts.git
commit a6b9768a20d0e8202a367a8957a2cae07ece9d39
Author: pissang <bm...@gmail.com>
AuthorDate: Thu Jul 8 10:30:30 2021 +0800
chore: fix incorrect zrender modules import
---
.github/workflows/visual-test.yml | 1 +
src/chart/bar/BarView.ts | 8 +++-----
src/label/sectorLabel.ts | 3 ++-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/visual-test.yml b/.github/workflows/visual-test.yml
new file mode 100644
index 0000000..9cf4b71
--- /dev/null
+++ b/.github/workflows/visual-test.yml
@@ -0,0 +1 @@
+ env:
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