* Updated .github/ISSUE_TEMPLATE.md (optional)
* Updated CONTRIBUTING.md (optional)
* Added backers and sponsors on the README
* Added call to donate after npm install (optional)
* fixed some whitespaces
* introduced new level-2 header "Contribute"
When the mouse was over a group-label's very top pixels, no group id was returned in mouse events.
This was due to checking if the cursor's Y coordinate is higher than the group element's top position, and not equal or higher.
* Fixes issue 3321 by ensuring labels are drawn as part of initial construction of the DataAxis
* Simplify test and remove support for node 6
* Exclude test coverage from regular test runs
* Adds code coverage report the output of `npm test` and adds detailed html code coverage report using the command `npm run-script test-cov`
* Switch over to using functions in lib/ rather than dist/, so that code coverage stats are complete.
* Import vis at the top level to keep ItemSet passing
* Remove requirement for dist/vis in TimelineItemSet
* Adds tests for Popup
* Tests and sinon dependency introduced
* Code changes to modules to tighten up code
* Corrects broken tests and adds more tests to ColorPicker
* Adds additional tests to DataSet
* Adds tests for uuid
* Removes unused functions from util
* Adds tests for utils: recursiveDomDelete, isDate, convert and isType
* removes redundant code
* Adds additional util tests
* Address spacing, and unnecessary tests
* Correct test description
* Adds isDate tests
* Adds sanity check assertions to popup destroy tests
* Docs : fixes and enhancements for the documentation template.
This is an evolutionary update for the `jsdoc` document generation.
- Added functionality to retrieval of data comments
- Added partial for generating documentation in the method tables.
- Moved commenting to source for `Network#clusterOutliers`. This was used as a case example.
- Adjustment to CSS to get the decription text margins same as original
- Added step to generate documentation to release checklist
- Fixed some commenting which `jsdoc` couldn't handle
* Fixes for linting
* Moved navbar elements in all html documentation files to partial
This consolidates the common menu elements in all documentation files to a partial.
* Moved test-exclamation mark
* Added partial, tested with some pages
* Docs: Moved end block in all html documentation files to partiel
This rcConsolidatersd common footer in all documentation files to a partial.
I'm hoping this serves as an example for others to isolate more common blocks (the menu would be the perfect candidate). It's straightforward work.
* Network: force array order when sorting hierarchical levels
Fixes #340r34.
If coordinates are not available to sort within a hierarchical level, sort to array order instead.
The previous fix on this issue was not good enough to circumvent this quirk in the chromium sorting. This should bury it.
* Added TimSort for sorting in DirectionStrategy
* Added TimSort to LayoutEngine
* Fixed typo
* Add template for document generation with 'jsdoc'.
In essence, it defines the subdirectory `docs` as a `jsdoc` template. Benefits:
- allows the usage of partials, in order to DRY common parts of the html files.
- makes available the jsdoc-comments, for addition into the documentation.
- enables extraction of data from the source code. For example, the list of edge endpoints `['arrow', 'bar', 'circle']` can now be extracted from the source and inserted into the documentation on generation.
In this initial version, the only file that has been changed is `docs/data/dataset.html`.
In here, partials have been added to illustrate how common page elements can be DRY'd.
The template has been set up in such a way, that resource files will be copied and that html files can pass through unchanged if no special template tags (`<?js...?>`) are used. This allows for a gradual transition of the html files to templates.
**Usage:** `gulp docs`
- The result files are placed in subdirectory `gen/docs/`.
**NOTE:** The release procedure will have to be adjusted by adding this gulp command.
The docs-files will then have to be taken from `gen/docs`.
* Edits to docs/README
* Adjusted layout of README.md
* Further edits to README.md
* Removed pre tags again in README.md - don't work in code block
* Linted the gulpfile
* Added proof of concept for docs generation from source
* Move majorLables to 1st week in the month, for 'week' scale
* next() always adds 1 week to current date
* show 1st week in the month as majorLabel
* Add 'week' to auto-scale
* Update week scale example
* Revert "Move majorLables to 1st week in the month, for 'week' scale"
This reverts commit 52df3c3ac5.
* Correct value of week's minimumStep
* Network: DRY code in Label for parsing markup
This gets rid of a major eyesore for me. The accumulator object was identical for HTML and Markdown.
In addition, the parsing has been refactored. Common elements have been DRY'd and the logic of the parsing has been made more comprehensible.
* Added suggestion @mbroad wrt regexp precompile
* Fixed linting
* Adds code coverage report the output of `npm test` and adds detailed html code coverage report using the command `npm run-script test-cov`
* Switch over to using functions in lib/ rather than dist/, so that code coverage stats are complete.
* Import vis at the top level to keep ItemSet passing
* Remove requirement for dist/vis in TimelineItemSet
* Network: preload images in options for all shape types
Fixes#3532
If the images option is set, preload it, even if the node shape is not `image` or `circularImage`.
This needs to be done because the user can switch to an image shape later, as is happening in the issue.
Option `image` is only mandatory for the image shapes.
There is no unit test for this, because it would need a mock object for Image and I didn't succeed in creating/finding one.
* Network: Handle null data gracefully
During testing I discovered that passing `null` for network data leads to a thrown error.
This adds a guard to prevent it, plus unit tests for regression.
Fixes#3532
If the images option is set, preload it, even if the node shape is not `image` or `circularImage`.
This needs to be done because the user can switch to an image shape later, as is happening in the issue.
Option `image` is only mandatory for the image shapes.
There is no unit test for this, because it would need a mock object for Image and I didn't succeed in creating/finding one.
* Use mock canvas object replacing `canvas`
Fixes#3515.
A mock canvas object is added to the unit tests, which makes usage of module `canvas` voluntary.
The issue with `canvas` is that it requires an external dependency to `cairo`. This complicates setting up a develop environment for `vis.js`
- Removed `canvas` from `package.json`
- Added section to README.md with instructions on how to install `canvas` instead.
* Removed debugger statements
* Updates for review
* Fixes for review
* Network: Prevent crash when dataChanged is triggered during initial setting of options
Fixes#3562.
Options `hidden` and `physics` can emit a `_dataChanged` event within `setOptions()`.
If this happens when setting options during the initialization of the `Network` instance, this leads
to an error thrown, because there is no DataSet instance connected yet to the instance.
This bug was introduced in `v4.21.0`. Unit tests have been added for this case.
* Edited comment