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

feat(timeline): Implement new options 'horizontalScrollKey' (#1670, #1323) and 'horizontalScrollInvert' (#1595) #1852

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LukasWillin
Copy link

@LukasWillin LukasWillin commented Jan 10, 2025

Commit

feat: Implement new options 'horizontalScrollKey' (#1670, #1323) and 'horizontalScrollInvert' (#1595) to allow for both vertical and horizontal scrolling & invert the horizontal scroll direction.

Feature Changes

modified:   docs/timeline/index.html                        | Add documentation for options 'horizontalScrollKey' and 'horizontalScrollInvert'.
modified:   examples/timeline/other/horizontalScroll.html   | Add new options 'horizontalScrollKey' and 'horizontalScrollInvert' to horizontal scroll example.
modified:   lib/timeline/Core.js                            | Implement new options to allow for both vertical and horizontal scrolling & invert the horizontal scroll direction.
modified:   lib/timeline/optionsTimeline.js                 | Add options 'horizontalScrollKey' and 'horizontalScrollInvert'.
modified:   types/index.d.ts                                | Add type definitions for options 'horizontalScrollKey' and 'horizontalScrollInvert'.

Lint Changes

  • Fix eslint errors such as missing doc comments or faulty syntax where necessary.
  • Fix eslint error no-prototype-builtins
  • Fix eslint-disable-line comments being on the wrong line to suppress the stated rule.

Example

See the horizontalScroll example: examples/timeline/other/horizontalScroll.html

var options = {
  horizontalScroll: true,
  horizontalScrollKey: 'shiftKey', /* If you want to enable both vertical and horizontal scrolling, uncomment this and  the line below. */
  verticalScroll: true, /* Uncomment this line with the line above to allow for both scroll-axis. */
  horizontalScrollInvert: true, /* Invert the horizontal scroll direction by uncommenting this line. */
  zoomKey: 'ctrlKey',
};

…, visjs#1323) and 'horizontalScrollInvert' (visjs#1595) to allow for both vertical and horizontal scrolling & invert the horizontal scroll direction.

Feature Changes
modified:   docs/timeline/index.html                        | Add documentation for options 'horizontalScrollKey' and 'horizontalScrollInvert'.
modified:   examples/timeline/other/horizontalScroll.html   | Add new options 'horizontalScrollKey' and 'horizontalScrollInvert' to horizontal scroll example.
modified:   lib/timeline/Core.js                            | Implement new options to allow for both vertical and horizontal scrolling & invert the horizontal scroll direction.
modified:   lib/timeline/optionsTimeline.js                 | Add options 'horizontalScrollKey' and 'horizontalScrollInvert'.
modified:   rollup.config.js                                | lint
modified:   types/index.d.ts                                | Add type definitions for options 'horizontalScrollKey' and 'horizontalScrollInvert'.

Lint Changes
- Fix eslint errors such as missing doc comments or faulty syntax where necessary.
- Fix eslint error no-prototype-builtins
- Fix eslint-disable-line comments being on the wrong line to suppress the stated rule.
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

Successfully merging this pull request may close these issues.

1 participant