almende / vis

⚠️ This project is not maintained anymore! Please go to https://github.com/visjs
7.85k stars 1.48k forks source link

Bizarre scale change on network examples, as well as some webpages #1255

Closed joaobarcia closed 9 years ago

joaobarcia commented 9 years ago

Hi,

I'm getting a strange scale change on the network examples as well as some of the webpages listing the examples. The pages load normally, but randomly start zooming in or out:

I have an Ubuntu 15.04 machine and tested both on Firefox and Chromium with add ons disabled. No other page/js library on my computer do this.

For the networks it happens consistenly, 100% of the times and as soon as I click/drag the mouse. For the webpages it seems to happen like 30% of the times and without any interaction.

I have not been able to replicate it on another Windows 7 machine I have here.

Other modules besides the network do not display the issue (although their examples page do..).

The "showcase" examples do not display the issue.

AlexDM0 commented 9 years ago

Hi,

That.... is really strange. I cannot reproduce it, nor do I have any idea what could be doing it as zooming in the examples page is explicitly disabled... Is the canvas itself changing size as well?

Regards

abcbaby commented 9 years ago

I have this similar issue in our app, when the network initially loads with v4.8. Somehow, on initial load, it zooms in really close. However, to workaround, I called network.fit(), which resets the zoom.

AlexDM0 commented 9 years ago

This sounds like a different issue dragon, that could be due to kamada kawai not working with the network. I'll look into that.

joaobarcia commented 9 years ago

The canvas is not changing size.

I am able to reproduce it as well with Chrome on a Macbook running OS X. Exact same symptoms.

Let me know if there is any log or similar I can do. If useful I can screengrab a video.

tolleiv commented 9 years ago

Hi +1 same behaviour on Safari, Chrome and Firefox running on Mac OSX.

The bad thing is that this even happens with "zoomView" set to "false" whenever you click into the canvas.

Fixing this. Cheers

onexerxes commented 9 years ago

Not sure if this is related, but I see extreme zoom-out happening when I click on the Network, but only on smaller screen resolutions. For example, on this demo page:

http://visjs.org/examples/network/nodeStyles/shadows.html

With Chrome and 24in monitor, clicking does not cause the bizarre scale change.

But when I turn on Chrome Dev tools and use a smaller screen (ex: Apple Ipad), clicking on the Network zooms way out.

Before clicking: image

After clicking: image

Each additional click zooms out way more.

Can you reproduce this?

AlexDM0 commented 9 years ago

Hi,

This should be fixed on develop now. Thanks for reporting! We'll release a bugfix release this week.

Cheers

joaobarcia commented 9 years ago

Great!

AlexDM0 commented 9 years ago

This has been fixed in 4.8.1

onexerxes commented 9 years ago

Awesome! Thanks, Alex.