Previous condition was too strict: if *any* node for the cluster was already clustered, the clustering would abort.
Current fix scans for already clustered nodes and proceeds with what is left.
* Added unit test for Array.prototype mangling - first passing version
* Enhanced unit test for prototype stressing to catch more illegal for-in loops
* Fixed all for-in linting violations
* Corrects usage of @static jsdoc annotation
* Correct unresolvable types
* Correct types in jsdoc and remove extraneous @class & @constructor jsdoc
* Remove incorrect @static jsdoc
* Adds missing jsdoc for param copyFromGlobals
* correct jsdoc in util
* Corrects casing on jsdocs
* Swaps @inheritDoc to @ignore for constructors where constructor args are documented in the class
* Instantiates Errors with `new`
* Addresses improperly defined @callback tags.
* Split callbacks out to separate jsdoc
* Moves constructor jsdocs back to constructor and drop @ignore.
* First fix for opening clusters, added unit tests
* Added opening of child cluster to parent cluster
* Added more tests for multi-level clusters
* Commenting fixes
* Added unit tests for option allowSingleNodeCluster, fixes due to that
* Added test for allowSingleNodeCluster with nested clusters
* Fixes due to linting
* Removed TODO from code
Fix for #3367
Changes:
- Clustered nodes with shared connections are added to the same cluster
- joinCondition value `null` handled as `undefined`
- Fixed bug on adding clusters if joinCondition present and returns true
Unit tests have been added to `Network.test.js` for these changes.
* Enables require MethodDefinition for require-jsdoc lint rule and corrects 66% of missing Method Definitions
* Adds jsdoc for all remaining methods and corrects @class/@constructor documentation
* Define values more accurately
* Correct bugs that prevent jsdoc generation
* First working version of updating clustered edge
* Added fix for #1315 as well
* Enable unit testing for module Network
Adds mocks for certain components, in order to let module `Network` be run in unit tests.
Changes:
- Create a mock object for `hammer.js` when running browserless. The inspiration is taken from [here](https://github.com/uber/deck.gl/pull/658)
- Create a mock function for `window.requestAnimationFrame()` when running browserless in `network/modules/CanvasRenderer.js`
- Added unit test for `Network` to show that unit testing for it now works
- Fixed naming of container in `test/Graph3d.test.js`
Since `hammer.js` is also used in other modules, this fix is potentially an enabler for full-module unit tests for those as well.
* Cleanup unit test Network
* Added unit test for fix issue #1218
* Adding test for #1315 - Interim save
* Completed unit test and fixes for #1315
* Added fixes for #1291
* Added unit test for #1219
* Added header comment for Clustering.js, small fixes
* Fix for unit test
* Added example networks to unit test
* Fix error in loading disassemblerExample
* Network unit test final fixes
* Fixes for linting
* Fixed essential typo
* Fixed linting error
* Fixed unit test
* Fixed unit test again
* 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