-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
More detailed options for 'editable' #26
Comments
I don't think that kind of thing is supported by the javascript library
that timevis is built on top of. You can look at the examples of that
timeline javascript library here http://visjs.org/timeline_examples.html
and see if there's any examples of what you mean. If you find it then it
should work with timevis as well, but I doubt that kind of thing works
…---
R-Shiny Consultant
http://deanattali.com/shiny
On 22 January 2017 at 08:48, jorkku ***@***.***> wrote:
Currently you can edit the start / end times of an item by moving the item
(if editable=TRUE), but would it be possible to also have the possibility
to change the row on which the item is (while disabling the ability to
change the start / end times)? If there is already some item on the row I'm
trying to move the current item to, then this move should be blocked.
The reason why I'm asking this is because I would like to visualize
interactively a work roster and have the possibility of moving the shift
from a worker to another.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#26>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA6IFDEqbavvc3hdRxyuOBSIYWysQ8G7ks5rU15BgaJpZM4LqYxE>
.
|
Thank you for the reply. The example "Edit Group Only" in http://visjs.org/examples/timeline/editing/individualEditableItems.html is basically what I would need. |
I see, in that case you should be able to do this by simply translating the javascript options object to R. I haven't tried running this code, but something like this should work:
or (I'm getting these editable options from the documentation at http://visjs.org/docs/timeline/ |
Ok, I understand. Both your examples work nicely. Thank you. |
Is it possible to have the possibility to change the group of an item, while disabling the possibility of changing the start / end times? The item should still be deletable.
I mean something like here, where you can edit the 'editable' option in a detailed way:
http://visjs.org/examples/timeline/editing/individualEditableItems.html
var items = new vis.DataSet([
{id: 1, content: 'Editable', editable: true, start: '2010-08-23', group: 1},
{id: 2, content: 'Editable', editable: true, start: '2010-08-23T23:00:00', group: 2},
{id: 3, content: 'Read-only', editable: false, start: '2010-08-24T16:00:00', group: 1},
{id: 4, content: 'Read-only', editable: false, start: '2010-08-26', end: '2010-09-02', group: 2},
{id: 5, content: 'Edit Time Only', editable: { updateTime: true }, start: '2010-08-28', group: 1},
{id: 6, content: 'Edit Group Only', editable: { updateGroup: true }, start: '2010-08-29', group: 2},
{id: 7, content: 'Remove Only', editable: { remove: true }, start: '2010-08-31', end: '2010-09-03', group: 1},
{id: 8, content: 'Default', start: '2010-09-04T12:00:00', group: 2}
]);
The text was updated successfully, but these errors were encountered: