From 3a2b781e9cd48e6d29c5083ca730a7a293b454d5 Mon Sep 17 00:00:00 2001 From: Brad Hards Date: Sun, 5 Mar 2017 19:05:32 +1100 Subject: [PATCH] docs(timeline): Update docs and example to suggest being explicit about item overrides. (#2806) This is to reduce breakage if the fallback / default changes in a future release. --- docs/timeline/index.html | 10 +++++++++- examples/timeline/editing/individualEditableItems.html | 10 +++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/docs/timeline/index.html b/docs/timeline/index.html index c540e724..cfaee114 100644 --- a/docs/timeline/index.html +++ b/docs/timeline/index.html @@ -357,7 +357,7 @@ var items = new vis.DataSet([ editable.updateTime boolean no - If true, items can be dragged to another moment int time. See section Editing Items for a detailed explanation. + If true, items can be dragged to another moment in time. See section Editing Items for a detailed explanation. @@ -1698,6 +1698,14 @@ var items = new vis.DataSet([ ]); +

+ Individual manipulation actions (updateTime, updateGroup and remove) can also be set on individual items. If any of the item-level + actions are specified (and overrideItems is not false) then that takes precedence over the settings at the timeline level. Current behavior is + that if any of the item-level actions are not specified, those items get undefined value (rather than inheriting from the timeline level). This may change + in future major releases, and code that specifies all item level values will handle major release changes better. That is, instead of using + editable: {updateTime : true}, use editable: {updateTime : true, updateGroup: false, remove: false}. +

+

One can specify callback functions to validate changes made by the user. There are a number of callback functions for this purpose:

diff --git a/examples/timeline/editing/individualEditableItems.html b/examples/timeline/editing/individualEditableItems.html index ef7f0987..095c1574 100644 --- a/examples/timeline/editing/individualEditableItems.html +++ b/examples/timeline/editing/individualEditableItems.html @@ -34,7 +34,7 @@
- \ No newline at end of file +