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

Zoom In Zoom out feature #7

Open
sherlholmes opened this issue Aug 18, 2012 · 4 comments
Open

Zoom In Zoom out feature #7

sherlholmes opened this issue Aug 18, 2012 · 4 comments

Comments

@sherlholmes
Copy link

Zoom in zoom out feature using mouse wheel is not working on Internet explorer.

@anvaka
Copy link
Owner

anvaka commented Aug 18, 2012

Which version of IE? What kind of graphics are you using (SVG or CSS)?

@sherlholmes
Copy link
Author

In IE9, I am Using SVG graphics.
Is there any way to have simple slider for zooming?

@taichatha
Copy link

Has there been an update to this?

@pbless
Copy link

pbless commented Mar 16, 2017

IE used to be special but like with many other things MS gave up on being special. So to make zooming with the mouswheel work in IE11 the updateScrollEvents function in vivagraph needs to be modified just a little bit. Basically remove the 'special' treatment for IE and use the 'mousewheel' event for all browsers.

REPLACE BOLD TEXT WITH 'mousewheel' or just get rid of the if/else statement all together.
Hope this helps.

if (browserInfo.browser === 'webkit') {
element.addEventListener('mousewheel', handleMouseWheel, false); // Chrome/Safari
} else {
element.addEventListener('DOMMouseScroll', handleMouseWheel, false); // Others
}

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

4 participants