From baa6f9fdb14b7e90cfc0209c50c69b866dd634aa Mon Sep 17 00:00:00 2001
From: Simon Morris
Date: Sun, 20 Nov 2016 01:28:06 -0800
Subject: [PATCH] More editable control of timeline items (#2305)
* Fixed bug introduced in #2284 where overrideItems is set to true when boolean is provided
* Added the option of supplying object to item.editable with updateTime, updateGroup, and remove functioning similarly to timeline.editable but only on a single item
* Updated Documentation to reflect the new feature
* Updated the individualEditableItems example page to show feature usage.
---
docs/timeline/index.html | 27 +++++++++++---
.../editing/individualEditableItems.html | 23 +++++++-----
lib/timeline/component/ItemSet.js | 21 +++++------
lib/timeline/component/item/Item.js | 36 +++++++++++++------
4 files changed, 74 insertions(+), 33 deletions(-)
diff --git a/docs/timeline/index.html b/docs/timeline/index.html
index 5cfc8949..e1219ee0 100644
--- a/docs/timeline/index.html
+++ b/docs/timeline/index.html
@@ -237,7 +237,7 @@ var items = new vis.DataSet([
The item properties are defined as:
-
+
Name |
Type |
@@ -335,11 +335,30 @@ var items = new vis.DataSet([
Types 'box' and 'point' need a start date, the types 'range' and 'background' needs both a start and end date.
-
- editable |
- Boolean |
+
+ editable |
+ Boolean or Object |
no |
Override the editable option of the timeline for a specific item (assuming timeline.editable.overrideItems is false). |
+
+
+ editable.remove |
+ boolean |
+ no |
+ If true, item can be deleted by first selecting it, and then clicking the delete button on the top right of the item. See section Editing Items for a detailed explanation. |
+
+
+ editable.updateGroup |
+ boolean |
+ no |
+ If true, item can be dragged from one group to another. Only applicable when the Timeline has groups. See section Editing Items for a detailed explanation. |
+
+
+ editable.updateTime |
+ boolean |
+ no |
+ If true, items can be dragged to another moment int time. See section Editing Items for a detailed explanation. |
+
Groups
diff --git a/examples/timeline/editing/individualEditableItems.html b/examples/timeline/editing/individualEditableItems.html
index d6210305..c004473a 100644
--- a/examples/timeline/editing/individualEditableItems.html
+++ b/examples/timeline/editing/individualEditableItems.html
@@ -34,16 +34,21 @@