Skip to content

Releases: freegroup/draw2d

v6.6.4

17 Feb 14:59

Choose a tag to compare

v6.6.3

16 Feb 23:10

Choose a tag to compare

🎯 Connection Selection Feedback Examples

✨ New Features

  • Added connection_selection_feedback_canvas example demonstrating canvas-level SelectionPolicy
  • Added connection_selection_feedback_figure example demonstrating figure-level SelectionFeedbackPolicy via custom router

🔧 Improvements

  • Made installEditPolicy() and uninstallEditPolicy() chainable in Canvas.js, Figure.js, and Line.js
  • Added helpful console warning in Line.js when incorrect SelectionFeedbackPolicy type is used
  • Improved code quality with ES6 spread operator for config merging

📚 Examples

Both examples show visual feedback for selected connections:

  • Stroke width doubles
  • Color becomes lighter (60%)
  • Black outline appears (3px)

Canvas approach: Global policy affecting all connections
Figure approach: Per-connection policy for granular control

v6.6.2 - Connection Selection Feedback

16 Feb 22:04

Choose a tag to compare

New Features

Connection Selection Feedback Example

Added a new example demonstrating custom visual feedback for selected connections.

**New Example: **

  • Custom implementation
  • Visual feedback when connections are selected:
    • Stroke width doubles
    • Color becomes 60% lighter
    • 3px black outline appears
  • Interactive demo with markdown documentation
  • Undo/Redo functionality included

Improvements

  • Enhanced documentation with new example
  • Updated JSDoc data for policy classes
  • Refreshed build artifacts

Files Changed

  • Added new example with complete implementation
  • Updated documentation and build files

v6.6.1 - Fix Vertex Node Transparency

15 Feb 18:14

Choose a tag to compare

🔧 draw2d.js v6.6.1

Bug Fix Release

This patch release fixes an issue where vertex nodes (dots) in Circuit routers did not respect the connection's alpha/transparency setting.

🐛 Bug Fixes

  • Circuit routers now apply connection opacity to vertex nodes: When a connection has setAlpha() applied, the vertex nodes at shared port crossings will now display with the same transparency level

🔧 Affected Routers

  • CircuitConnectionRouter
  • InteractiveCircuitConnectionRouter

📦 Installation

npm install [email protected]

🔄 Migration

No breaking changes - drop-in replacement for v6.6.0


Full Changelog: v6.6.0...v6.6.1

v6.6.0 - Optimized Bridge Connection Routers

15 Feb 17:26

Choose a tag to compare

🎉 draw2d.js v6.6.0

Major Improvements to Bridge Connection Routers

This release brings significant optimizations and bug fixes to all bridge-based connection routers, making them more robust, performant, and visually consistent.

✨ New Features

  • Tolerance-based duplicate filter: Prevents multiple bridges at overlapping connections (3px tolerance)
  • Per-segment intersection sorting: Correct bridge ordering along horizontal/vertical segments
  • Unified cache invalidation: All connections repaint after drag operations for accurate rendering

🚀 Performance Improvements

  • Remove used intersections from pool to reduce comparisons
  • Optimized intersection handling for complex diagrams
  • Consistent coordinate rounding matching Line.intersection()

🐛 Bug Fixes

  • Fixed bridges not redrawing after segment drag in interactive routers
  • Fixed duplicate bridges when multiple connections overlap
  • Fixed 'ghost bridges' appearing at stale positions during drag operations
  • Fixed defaultRouter not updating in connection_router example

🔧 Routers Optimized

  • ManhattanBridgedConnectionRouter
  • InteractiveManhattanBridgedConnectionRouter
  • CircuitConnectionRouter (bridges + vertex dots)
  • InteractiveCircuitConnectionRouter (bridges + vertex dots)

🧹 Code Cleanup

  • Removed unused PolyLine.inverseLerp() instance method
  • Simplified cache invalidation logic
  • Better documentation and consistent patterns across routers

📦 Installation

npm install [email protected]

🔄 Migration

No breaking changes - fully backward compatible with v6.5.x


Full Changelog: v6.5.3...v6.6.0

Release v6.5.0

14 Feb 19:11

Choose a tag to compare

🎉 Release v6.5.0

✨ New Features

  • CollapsibleJailhouse Composite Shape: Added new collapsible composite shape to core library
  • Modern Toolbar Layouts: Introduced toolbar components with Undo/Redo functionality to examples

🚀 Improvements

  • composite_group: Modernized with toolbar and group/ungroup controls
  • tooltip_diy: Modernized with toolbar and undo/redo buttons
  • composite_raft: Modernized with toolbar and JSON preview panel
  • Consistent Layouts: Implemented flex-based layouts across all modernized examples
  • Responsive Design: Added 100vh/100vw responsive design
  • Code Quality: Improved code formatting (let/const, proper indentation)
  • Dependency Cleanup: Removed external CSS dependencies from examples

🐛 Bug Fixes

  • Fixed layout consistency across examples
  • Improved button state management in toolbars

📦 Distribution

  • Built and updated draw2d.js (1.28 MiB minified)
  • Updated all example files with new build

🔗 Links

📝 Commits in this Release

  • feat(composite): add CollapsibleJailhouse to core library
  • refactor(examples): modernize composite_group layout
  • refactor(examples): modernize tooltip_diy with toolbar
  • refactor(examples): modernize composite_raft with toolbar and JSON panel
  • chore: bump version to 6.5.0

v6.3.0

14 Feb 10:42

Choose a tag to compare

What's Changed

New Features

  • Box Layout Classes: Add Box, VBox, HBox, StackBox, GridBox shape classes for easier layout composition
  • Jest Testing: Add Jest testing framework with optimized insetPoint function

Bug Fixes

  • Fix default locator for StackBox.add() to fix 'locator required' error
  • Rewrite StackBox to extend Layout directly (like StackLayout)

Refactoring

  • StackBox extends Box instead of Layout directly
  • Refactor documentation site styling:
    • Modernize AppBar with Vuetify props
    • Fix tab visibility (inactive tabs now visible)
    • Add proper spacing between tabs and content/navigation
    • Improve navigation sidebar styling for both API and Examples

Full Changelog: v6.2.0...v6.3.0

v6.2.0

13 Feb 13:46

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.0.37...v6.2.0