用鼠标滚轮缩放——是否有与 GSAP 集成的库?
Zooming with mouse wheel -- is there a library that integrates with GSAP?
我使用 svg-pan-zoom.js 通过鼠标滚轮缩放 svg。它以鼠标位置的点为中心进行缩放。但我无法让它与 Greensock 的 javascript 库 (GSAP) 一起使用。 Here is the codepen(不使用 svg-pan-zoom.js)。有谁知道用鼠标缩放并与 GSAP 集成的 svg 缩放库?
document.getElementById("svg").addEventListener("wheel", myFunction);
function myFunction() {
//code to animate the viewbox
}
我使用 svg-pan-zoom.js 通过鼠标滚轮缩放 svg。它以鼠标位置的点为中心进行缩放。但我无法让它与 Greensock 的 javascript 库 (GSAP) 一起使用。 Here is the codepen(不使用 svg-pan-zoom.js)。有谁知道用鼠标缩放并与 GSAP 集成的 svg 缩放库?
document.getElementById("svg").addEventListener("wheel", myFunction);
function myFunction() {
//code to animate the viewbox
}