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

Timeline items cannot be dragged into a different group unless the mouse is also moved horizontally #3003

Open
YoshiWalsh opened this issue Apr 21, 2017 · 4 comments
Assignees

Comments

@YoshiWalsh
Copy link
Contributor

I'm using Windows 10 (with Anniversary Update) and Chrome v57, but I believe this issue occurs in all browsers.

Here's an example reproducing the issue: https://codepen.io/YM_Industries/pen/jmqYVB

Steps to reproduce:

  1. Click and hold on the item in the timeline
  2. Carefully move the mouse down vertically to the 'Staff Member Handle ranges with small lengths but large text lengths #1' group. Don't move the mouse horizontally more than 1-2 pixels. Observe that the item does not move to the next group.
  3. Continue moving the mouse down vertically. Observe that you can go down as many groups as you like and the item will still not change group.
  4. Move the mouse horizontally ~10px. Observe that now the item has moved to the correct group. You may now release the mouse button.

Expected behaviour:

When dragging an item, horizontal movement should not be necessary to change the item's group. As soon as the mouse enters a new group, the item should also move to that group.

@Luiz-N
Copy link

Luiz-N commented Dec 6, 2017

@yotamberk I'm seeing this same behavior in the latest version and even on the example pages. An item can't simply be dragged up or down. It must first be snapped horizontally before it can be dragged to another group.

itemsAlwaysDraggable: true seems to help somewhat with this issue.

@daRoof
Copy link

daRoof commented Apr 16, 2019

This "problem" is a feature of the touch gesture library.
The ItemSet declares a horizontal movement threshold of 5px.
{threshold:5, direction: Hammer.DIRECTION_HORIZONTAL}

I'm not sure if this can be fixed for all needs. I assume the threshold is valuable for touch operation. (Though I do not understand why the threshold is only in horizontal direction)

Maybe a configuration item should be introduced?

@daRoof
Copy link

daRoof commented Apr 17, 2019

Now that I think of it: Changing the threshold direction to DIRECTION_ALL should actually do the trick.
It would keep the threshold and also allow the item to be moved in vertical direction without any horizontal movement.

daRoof added a commit to daRoof/vis that referenced this issue Apr 17, 2019
Changed threshold directions to fix almende#3003.
daRoof added a commit to daRoof/vis that referenced this issue Apr 17, 2019
Changed threshold directions to fix almende#3003
daRoof added a commit to daRoof/vis that referenced this issue Apr 17, 2019
Changed threshold directions to fix almende#3003
daRoof added a commit to daRoof/vis that referenced this issue Apr 17, 2019
Changed threshold directions to fix almende#3003
daRoof added a commit to daRoof/vis that referenced this issue Apr 17, 2019
Changed threshold directions to fix almende#3003.
daRoof added a commit to daRoof/vis that referenced this issue Apr 17, 2019
Changed threshold directions to fix almende#3003.
daRoof added a commit to daRoof/vis that referenced this issue Apr 17, 2019
Changed threshold directions to fix almende#3003.
@yotamberk
Copy link
Contributor

Fixed here yotamberk/timeline-plus#155

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants