antvis/G6
Do you want to work on this issue?
You can request for a bounty in order to promote it!
[Bug]: zoomBy origin only works when animation is turned off #6964
louisch posted onGitHub
Describe the bug / é®é¢ęčæ°
Calling zoomBy
with origin
set will only work if animation is off.
Reproduction link / å¤ē°é¾ę„
https://codesandbox.io/p/devbox/vite-react-forked-qryx9c
Steps to Reproduce the Bug or Issue / éē°ę„éŖ¤
Call graph.zoomBy
with animation on, and an origin.
e.g.
const graph = new Graph({
animation: { duration: 300 } // set something here
...
});
graph.zoomBy(1.1, undefined, [100, 100]);
or
graph.zoomBy(1.1, { duration: 300 }, [100, 100]);
The origin parameter is ignored. If you then turn animations off, e.g. with graph.zoomBy(1.1, false, [100, 100])
, the origin will be respected.
Version / ēę¬
š 5.x
OS / ęä½ē³»ē»
- macOS
- Windows
- Linux
- Others / å ¶ä»
Browser / ęµč§åØ
- Chrome
- Edge
- Firefox
- Safari (Limited support / ęéęÆę)
- IE (Nonsupport / äøęÆę)
- Others / å ¶ä»