From 51a8977b3a0f05494028c3bafb3ae7cc4ff79f4e Mon Sep 17 00:00:00 2001
From: Ian Oberst
Date: Sat, 30 Sep 2017 12:16:02 -0700
Subject: [PATCH] Vertical focus (#3504)
* - Added support for vertical scrolling while the timeline is focusing on an element, both for animated and non-animated calls of focus
* - Adjusted item offset calculations to use the item parent
- Turned on animation for the focus in the example
- Updated function documentation
* - Fixing lint issues
* - Added documentation for the new 'frameCallback' parameter of 'setRange'
- Fixed the documentation on 'setRange' for the 'callback' parameter
- Fixed code not meeting style guidelines
* - Updated the example for "setSelection" to be more clear about what the example buttons do. Focus the language to be more consistent with that fact that the demo uses "setSelection"
---
.../timeline/interaction/setSelection.html | 108 ++++++++++++++++++
lib/timeline/Range.js | 14 ++-
lib/timeline/Timeline.js | 101 +++++++++++++++-
3 files changed, 218 insertions(+), 5 deletions(-)
diff --git a/examples/timeline/interaction/setSelection.html b/examples/timeline/interaction/setSelection.html
index 36278797..45901bf1 100644
--- a/examples/timeline/interaction/setSelection.html
+++ b/examples/timeline/interaction/setSelection.html
@@ -26,6 +26,21 @@
+
+
If the height of the timeline is limited some items may be vertically offscreen. This demo uses Timeline.setSelection(ids, {focus: true}) and demonstrates that focusing on an item will
+cause the timeline to scroll vertically to the item that is being focused on. You can use the buttons below select a random item either above or below the currently selected item.
+
+
+
+
+
+
If focusing on multiple items only the first item will be scrolled to. Try entering several ids and hitting select.