* Makes network eslint compliant
Unused variables in private functions, who were never called internally with those arguments were removed.
lint rule was disabled for public functions, and in private functions which were called internally with those unused arguments
* Disables linting for unused args passed into DataSet and DataView
* First interim commit
* Fixes during testing
* Allow multiple edges to be hidden by a clustered edge.
Fix for #3245.
This fix adjusts the clustering edges so that theyi can refer to multiple edges instead of just one.
This API method is now insufficient, since multiple base edges can be returned.
- Added replacing method `clustering.getBaseEdges()`
- Adjusted example `changingClusteredEdgeNodes` for the new method. This is the *only* place where `getBaseEdge()` was used
- Adjusted documentation for new method and deprecation old method.
Method `getbaseEdge()` should now be considered `deprecated`, and in due time should be removed.
* Edits of method name in example
* Edits of method name in example
* adjusted deprecation method getBaseEdge() in docs
* Adjusted deprecation method for getBaseEdge() in docs
Fix for #3164
- `network.clustering.cluster()` now handles all nodes, not just the visible ones
- Changing ivisibility of nodes now explicitly takes clustering into account, see `Network._updateVisibleIndices()`
- `network.clustering` does not change `hidden` status any more.
The important part of this PR is the realization that 'hidden' and 'clustered' are two distinct things and should be handled separately.
In particular, clustering should **not** change the `hidden` state in any way.
* Prevent crashes from invalid id's in `Clustering.findNode()`
Fix for #3163
- Added safeguards in said method, to prevent exceptions happening when invalid id's are passed in.
- Adjusted documentation for said method
- Added notes to flag unused methods in `Clustering.js`
* Removed incorrect NOTE-comments from methods that are indeed used
* replacing all ES6 imports with CJS require calls
resolves#2934
used the following regex to apply the changes in lib:
s/import\s+(\w+)\s+from\s+(.*);\s*$/var $1 = require($2).default;/
s/import\s+(\w+)\s+from\s+(.*)\s*$/var $1 = require($2).default;/
* cleaning up inconsistencies
* Should fix issue #2100 and fix another issue we discovered around clusterByConnection leaving phantom edges.
* fixed a wrong variable name
* fixed DataView.test.js assert
* Update Canvas.js
* remove whitespace; remove end of file newline on Canvas.js
* strip end of file newlines
* fixed styling. spacing, semicolons, line length
* Removed restriction to allow clusters of a single node; Default functionality remains the same; Also added new example
* Add documentation for allowSingleNodeCluster, and removed excessive cluster() calls in example.
* Changed documentation as per request.
* Added getBaseEdge, getClusteredEdges updateEdge and updateClusteredNode to allow option changes of the clustered edges as they are no longer the original base Edge
changing edge color is a good example.
i.e network.clustering.updateEdge(originalEdge.id, {color : '#aa0000'});
will now update all edges including the ones that were created when clustering.
Also when clicking on a clustered edge the event returns the clustered Edge id, which doesn't mean a lot.
This can be now converted back into the original edge with
network.clustering.getBaseEdge(clusteredEdge.id)
Similar with updateClusteredNode
This new method allows the options to be changed on a clustered Node.
i.e clicking on a clustered node gives its clustered node id.
Want to change the clustered image to a star then do this
network.clustering.updateClusteredNode(clusteredNodeId, {shape : 'star'});
* Updated docs with getClusteredEdge, getBaseEdge, updateEdge and updateClusteredNode
Also added method subsections into contents
* Added better error handling to updateEdge and updateClusteredNodes
corrected errors spotted by @mojoaxel
* Added example html demonstrating getBaseEdge, getClusteredEdges updateEdge and updateClusteredNode
* Added getBaseEdge, getClusteredEdges updateEdge and updateClusteredNode to allow option changes of the clustered edges as they are no longer the original base Edge
changing edge color is a good example.
i.e network.clustering.updateEdge(originalEdge.id, {color : '#aa0000'});
will now update all edges including the ones that were created when clustering.
Also when clicking on a clustered edge the event returns the clustered Edge id, which doesn't mean a lot.
This can be now converted back into the original edge with
network.clustering.getBaseEdge(clusteredEdge.id)
Similar with updateClusteredNode
This new method allows the options to be changed on a clustered Node.
i.e clicking on a clustered node gives its clustered node id.
Want to change the clustered image to a star then do this
network.clustering.updateClusteredNode(clusteredNodeId, {shape : 'star'});
* Updated docs with getClusteredEdge, getBaseEdge, updateEdge and updateClusteredNode
Also added method subsections into contents
* Added better error handling to updateEdge and updateClusteredNodes
corrected errors spotted by @mojoaxel
* Added example html demonstrating getBaseEdge, getClusteredEdges updateEdge and updateClusteredNode