* Small refactoring in Label._drawBackground()
* Added size calculation to Label, basic framework for detecting click on label.
* First fully working version of label click.
* Put in extra checks, refactored visibility of labels for more general usage.
* Final fixes to code; added to example and in docs
* Adressed review comments
* Add next attempt to fix Travis unit test bug
* Addressed review issues
* Network: Adjust documentation for arrows.middle.scaleFactor
Addendum to #3474.
Updated the documentation, so that users can know about flipping the middle arrow with a negative scale factor.
* Adjusted text for review
* Add endpoint 'bar' to Network
Fixes#3412
- Adds class `Bar` and handling to `EndPoints.js`
- Adjusted `options.js` for endpoint, minor code changes
- Added to example `network/edgeTypes/arrowTypes`.
- Added to edges documentation
* Grumbl fix travis unit test yet again. Go die already!
* added hexagon shape to the node.
* Updated function for hexagon shape.js
* Modifid the shape login for hexagon
* Remove this.translate from the Shape.js for hexagon
* updated hexagon draw logic
* Fixed code review comments and update the branch
* Updated changes in test.js
* Fixes Issue #3316 - Updates network documentation to account for edge-case of how clusterByConnection uses the joinCondition callback
* Move the text 'clusterByConnection will pass ... callback.' to under 'Optional for all but the cluster method'.
Make it clear that clusterByConnection is the only one that uses the second call.
Instead of bold, make it a distinct paragraph.
* 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
* Protect Network from zero and negative mass values
Fix for #3133
Option-field 'node.mass` must be >= 0.
Checks have been added at the nodes level, for both nodes-global and nodes specific options.
In addition, an internal check has been added for `NodeHandler.defaultOptions`.
The documentation has been adjusted for this change.
* Fix whitespace
* 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
* fix#2613 with if statement, and null for pointer value rather than referencing it when undefined
* removed if statement, since not needed, and updated documentation to note the null pointer property in certain conditions.
* element characteristic changes
* assume edge color inheritance is correct before choosing
* Adjust nodes’ chosen’s boolean -> bool
* Need to get user-reset size
* make example edges thicker for more noticeable shadow
* preemptive ES6 fix (see #2500/#2501)
* documentation for the feature that was previously overwritten
* { manipulation: { editEdge: { editWithoutDrag: function } } } edits an edge without dragging.
* An example of editing network edges without dragging, enabling label creation / change
* 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
Node labels don't currently make use of the 'align' property, so this reuses
the existing property.
The label code has a number of alignment options that make sense to edges only,
so the Edge/Node now passes a boolean to the Label ctor to explain which the label
is being rendered for