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 2020/10/22 13:18:44 UTC
[incubator-echarts] branch next updated: fix(dataZoom): optimize
alignment between handles.
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch next
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
The following commit(s) were added to refs/heads/next by this push:
new 3716981 fix(dataZoom): optimize alignment between handles.
3716981 is described below
commit 37169812d9533a8b25feaa09cba1949d77441bce
Author: pissang <bm...@gmail.com>
AuthorDate: Thu Oct 22 21:17:54 2020 +0800
fix(dataZoom): optimize alignment between handles.
---
src/component/dataZoom/SliderZoomView.ts | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/component/dataZoom/SliderZoomView.ts b/src/component/dataZoom/SliderZoomView.ts
index 6bcf441..1d139a9 100644
--- a/src/component/dataZoom/SliderZoomView.ts
+++ b/src/component/dataZoom/SliderZoomView.ts
@@ -715,7 +715,9 @@ class SliderZoomView extends DataZoomView {
(handle as graphic.Path).attr({
scaleX: handleHeight / 2,
scaleY: handleHeight / 2,
- x: handleEnds[handleIndex],
+ // This is a trick, by adding an extra tiny offset to let the default handle's end point align to the drag window.
+ // NOTE: It may affect some custom shapes a bit. But we prefer to have better result by default.
+ x: handleEnds[handleIndex] + (handleIndex ? -1 : 1),
y: size[1] / 2 - handleHeight / 2
});
}, this);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org