Skip to content
This repository has been archived by the owner on Nov 19, 2019. It is now read-only.

Firefox problems #60

Closed
javdome opened this issue Oct 11, 2018 · 7 comments
Closed

Firefox problems #60

javdome opened this issue Oct 11, 2018 · 7 comments
Labels
bug Something isn't working

Comments

@javdome
Copy link
Contributor

javdome commented Oct 11, 2018

Hi!!
I have checked that the performance of time-plus in Google chrome is awesome.
However, in Firefox, the Zoom with the mousewheel does not work and the displacement of the timeline when is dragged is a bit weird.

@yotamberk
Copy link
Owner

Can you add a specific example?

@yotamberk yotamberk added the bug Something isn't working label Oct 13, 2018
@sandebert
Copy link

I can comment on the zoom thing at least. I just tried this with the example groupsEditable.html, and in Chrome it zooms just as expected - and in Firefox nothing at all happens when I use the scroll wheel.

Firefox v62

@javdome
Copy link
Contributor Author

javdome commented Oct 15, 2018

The zoom problem with the mousewheel happens with all the examples where the zoom is active.

The other problem (the displacement of the timeline in firefox), I just realized that the problem is only mine due to my screen configuration, so forget it.

Thank you!!

@stinovlas
Copy link

i can confirm, that the README example does not zoom in Firefox (62.0.3) while it zooms in Chromium (69.0.3497.81).

@Kaliph
Copy link

Kaliph commented Nov 19, 2018

I have compared the behaviour of viz 4.21 with the actual timeline-plus implementation. With vis 4.21 the zooming in Firefox works. What I´ve found out is that the problem is somewhere around this function.

`key: '_onMouseWheel',
value: function _onMouseWheel(event) {

  console.log("mousewheel " + JSON.stringify(event.detail));
  // retrieve delta
  var delta = 0;
  if (event.wheelDelta) {
    /* IE/Opera. */
    delta = event.wheelDelta / 120;
  } else if (event.detail) {
    /* Mozilla case. */
    // In Mozilla, sign of delta is different than in IE.
    // Also, delta is multiple of 3.
    delta = -event.detail / 3;
console.log(delta);
  }`

The event.detail for timeline-plus returns always 0.
The vis.js implementation returns for event.details whether 3 or -3, depending on the mousewheel direction.
I haven´t debugged deeper yet, to find out why the event.detail is set incorrectly.

@Kaliph
Copy link

Kaliph commented Nov 19, 2018

I recognised also that this function doesn´t get called

`/**
* Zoom the range the given scale in or out. Start and end date will
* be adjusted, and the timeline will be redrawn. You can optionally give a
* date around which to zoom.
* For example, try scale = 0.9 or 1.1
* @param {number} scale Scaling factor. Values above 1 will zoom out,
* values below 1 will zoom in.
* @param {number} [center] Value representing a date around which will
* be zoomed.
* @param {number} delta
* @param {Event} event
*/

}, {
key: 'zoom',
value: function zoom(scale, center, delta, event) {`

@yotamberk
Copy link
Owner

Fixed in version v2.2.3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants