This repository has been archived by the owner on Jul 29, 2019. It is now read-only.
customeTime additional editable=false functionality. #3816
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was interested in making a read-only customTime. I found issues #1296, #1698 and #3808, but I felt that this feature could be supported quite easily and so I added this patch.
I have attempted to match the code style by modifying the addCustomTime() method to accept an an options object. This object supports 1 key of editable as a boolean.
I have tested the solution and I think it does a reasonable job of matching style and intention, the only downside is that it makes no provision for changing the editable state by modifying the options. If the initial code review demonstrates an interest in the feature I can enhance it to support these changes.
Requisite updates have been made to:
This is my first contribution to visjs that is non-trivial so let me know if I've failed to meet expectation in code style, intention, documentation style, or submission procedure.
Thank you,