Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Diagramming for JavaScript, V4.6 (Read 101 times)
Forum Admin
YaBB Administrator
*****
Offline


Rock and Roll

Posts: 714
Joined: Apr 6th, 2003
Diagramming for JavaScript, V4.6
Mar 18th, 2025 at 11:44am
Print Post  
We have released version 4.6 of MindFusion JavaScript Diagram library. It contains the following new features and improvements:

Spatial index
Set the enableSpatialIndex property of Diagram to create an index of item positions for faster hit-testing and viewport clipping queries. This should greatly improve user interaction and rendering speed for diagrams containing tens of thousands or more items.

Code (Javascript)
Select All
// create 20000 links + nodes in total
for (var i = 0; i < 10000; i++)
{
    var node = diagram.factory.createShapeNode(x, y, size, size);
    node.text = i;
    if (x > diagram.bounds.x)
    {
        diagram.factory.createDiagramLink(
            diagram.nodes[i - 1], diagram.nodes[i]);
    }

    x += dist;
    if (x >= diagram.bounds.right())
    {
        x = diagram.bounds.x;
        y += dist;
    }
}

diagram.enableSpatialIndex = true; 



Miscellaneous
  • The foldedSize property of ContainerNode specifies the container's size when it is folded.
  • clipText property added to ShapeNode.
  • actionUndone and actionRedone events raised by undo manager for either top-level commands or children of CompositeCommand.
  • Fixed multiple resize when selection contains rotated nodes.
  • Fixed rotation when rotation handle is at a custom position (set from hitTestAdjustmentHandle event handler).
  • strokeThickness is now scaled by zoomFactor.


Distribution for the latest version can be downloaded here, or from the clients area on our site:
https://mindfusion.eu/JsDiagram.zip

Updated scripts are also available as @mindfusion/diagramming NPM package.

Enjoy!
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint