Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于d3中窗口缩放的监听 #92

Open
ckinmind opened this issue Jul 20, 2018 · 0 comments
Open

关于d3中窗口缩放的监听 #92

ckinmind opened this issue Jul 20, 2018 · 0 comments

Comments

@ckinmind
Copy link
Owner

参考资料:

采用了这种

function updateWindow(){
    x = w.innerWidth || e.clientWidth || g.clientWidth;
    y = w.innerHeight|| e.clientHeight|| g.clientHeight;

    svg.attr("width", x).attr("height", y);
}
d3.select(window).on('resize.updatesvg', updateWindow);
@ckinmind ckinmind changed the title 关于d3中缩放事件的监听 关于d3中窗口缩放的监听 Jul 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant