-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Create a new option to disable timeline zoom/drag with mouse in the group column #239
Comments
yes, agree. |
Glad you agree. Any idea when it could be made available? And just to note, I'd like to contribute a bit more than just suggestions, unfortunately very time constrained these days, but if you can provide some hints I could try to look at an implementation myself .. (btw, I'm migrating a project from the chap links timeline to vis.js, which I'm really finding much better designed and flexible -- good work!) |
this is really needed for me as well : I enriched the column area by means of jquery with some additional controls for my application. |
You will have to hack some workaround in the Timeline code. Haven't found time for this myself yet, sorry. |
Hi, Over the last year a lot of feature requests have been made. We have just introduced our new website which has a list of the requested features. We have placed this request on that list. The list can be found here: An explaination of the new system can be found here: I would like to stress that this does not mean we abandon this request. Discussion here will continue if needed on this feature but we will close it to keep our Github issue page more of a bug-todo list. Future feature requests will still be made here and then added to the website by us. Regards, Alex |
I think there are two ways of achieving this: 1. Outside timeline with a dedicated event handler:// Instantiate our timeline object.
timeline = new vis.Timeline(document.getElementById('mytimeline'), items, groups, options);
// stopping event capture/bubbling in left panel
var leftPanel = document.querySelector("div.vis-panel.vis-left");
leftPanel.addEventListener("mousewheel", function(event) {
event.stopPropagation();
}, true); This works fine in Chrome (tested in 43). Firefox (38) keeps zooming unfortunately. I am also not happy with the selector, since the old timeline (https://github.com/almende/chap-links-library) had an option 2. Changing
|
Having spent the weekend with the timeline, I found another solution, based on the second proposal in the last comment, without using any classname whatsoever: var eventProps = getEventProperties(event);
if (eventProps.what == "group-label") {
return;
} This should do the job as well. Maybe invoking The problem in Firefox and proposal 1 is simply the different event name "DOMMouseScroll". Please decide and I will implement it. Cheers |
Thanks Martin, from your suggestions I just got another idea: in the mouse events, we can check whether the mouse position is inside the current range and if not, ignore. See 20af47e |
Reopening as Feature-Request issue (see #2114). |
This issue is resolved in v4.17.0. zoom/drag is only possible in the centaerContainer (the range) |
Then the "released" column area can be used for regular scrolling of the page -- it would actually be a good usability improvement.
The text was updated successfully, but these errors were encountered: