Releases: UST-MICO/grapheditor
v0.7.0
Added
- Added more fine grained options for controlling how the user can interact with the grapheditor
- "select" attribute to control the default selection behaviour (default:
multiple
; other:none
,single
) - "node-click" attribute to control the default node click behaviour (default:
select
; other:none
,link
) - "node-drag" attribute to control the default node drag behaviour (default:
move
; other:none
,link
) - "edge-drag" attribute to control the default edge drag behaviour (default:
link
; other:none
) - "background-drag" attribute to control the default node drag behaviour (default:
move
; other:none
,select
,zoom
,custom
) - "brushdrag" and "brush" events. Used when "background-drag" is set to
select
,zoom
orcustom
- Added flag in text components to mark them as draggable (defaults to true)
- Added padding parameter to
zoomToBox
to allow changing or removing the added padding - All relevant interfaces and functions are now (re)exported at top level
Deprecated
- Deprecated "mode" attribute on the network-graph html node. See the list of added attributes that allow more fine grained control
- Passing JSON via HTML attributes with nonstandard
'
as quote is deprecated.
Deprecated:nodes="[{'id': 1, 'x': 0, 'y': 0}]"
(alsoedges
andclasses
)
Replace with:nodes='[{"id": 1, "x": 0, "y": 0}]'
Incompatible changes
- Updated to TypeScript 4.6 compiler
- Updated D3 dependecies to version 7. Please carfeully read about the changes in version 6 and 7 (changelog) if your code uses D3 functions.
- Removed the
style
slot in the default template as it did not work to isolate style anyway - Removed deprecated
rotation
property of edge markers - Partially removed support for deprecated "mode" attribute on the network-graph html node
- Removed event, getter and setter associated with the "mode" attribute
- Removed deprecated
style
slot - Wrapping text now generates less data-* attributes in the dom and is faster when the text does not need to be wrapped again
- Wrapping text now re-wraps text when (some) style attributes change
- Node and edge IDs now use a
data-id
attribute without any prefixes. CSS selectors relying on matching nodes by ID need to be changed (usegetSingleNodeSelection
orgetSingleEdgeSelection
if possible)
Version 0.6.2
Added
- Option to scale text by specifying a scale in the
data-line-wraps
attribute GroupingManager.getAllRegisteredGroups
helper function
Incompatible changes
- All wrapped text elements will now have a transform origin set that allows scaling them to be more intuitive. This may break some css layouts. See "Api > Text Wrapping >
resetTextTransform
" for more information on how this is calculated. - Specified text height is now always interpreted as maximum allowed text height in all wrapping modes
Version 0.6.1
Added
- Added
svg-template
attribute to specify a css selector of a html template containing the svg to load - Added isolation of grapheditor styles when loading the svg from an html template
- Added ability to vertically center wrapped text (with
data-text-center-y
attribute) - Added
data-wrap-lines
attribute for wrapping text in lines with different max widths - Added ability to wrap text into more complex shapes (e.g. circles) with the
data-wrap-lines
attribute
Refactored
- Refactored text wrapping code to cause less dom updates
Fixed
- Text wrapping only worked if the
text
tag also had atext
css class. Now alltext
tags will be wrapped automatically.
Version 0.6.0 (the node resizing update)
Added
- Added ResizeManager that allows node resizing via api and drag and drop
- Added 'noderesize' event fired when resizing a node with the resize manager
- Added 'svginitialized' event when the grapheditor initializes a new svg
- Added methods
getSVG
,getGraphGroup
,getNodesGroup
,getEdgesGroup
,getEdgeSelection
andgetDraggedEdgeSelection
to grapheditor - Added utility methods
removeAllChildNodes
andcopyTemplateSelectionIntoNode
n util to help working with static templates - Added public
updateEdgeGroupClasses
to only update the classes of edges
Fixed
- Fixed removeEdge not working with string ids
- Fixed cancelling 'edgeremove' event leaving the original edge with the
ghost
class untilcompleteRender
was called - Potentially fixed removing edge throwing an error when the edge is removed from the object cache
Version 0.5.4 (bugfix release)
Fixed
- Fixed build errors when using the package in a typescript project
Version 0.5.3
Known Issue: this version was compiled using typescript 3.8!
The resulting .d.ts
are only compatible with typescript versions >= 3.6
. See typescript 3.7 release notes for more information.
This will be the last release to include this warning in the changelog!
Added
- Added complete render flags to some GroupBehaviour callbacks and the node movement information
- Added
typesVersions
field to package.json to get a warning when using this package with an incompatible typescript version
Fixed
- Fixed loading templates sometimes crashing on firefox
- Fixed target detection for dragged edges sometimes not working correctly
- Fixed group drag and drop checking join conditions for the wrong node
Version 0.5.2
Known Issue: this version was compiled using typescript 3.7!
The resulting .d.ts
are only compatible with typescript versions >= 3.6
. See typescript 3.7 release notes for more information.
Added
- Added
getNodeBBox
to get the bounding box of a node
Fixed
- Fixed adding or removing edges or nodes with the api not always triggering an event
- Fixed the result of
calculateBoundingRect
sometimes having negative width or height - Fixed
GroupBehaviour
interface not allowing additional properties - Fixed LinkHandles of a circle not taking the circle center into account
Version 0.5.1 (bugfix release)
Known Issue: this version was compiled using typescript 3.7!
The resulting .d.ts
are only compatible with typescript versions >= 3.6
. See typescript 3.7 release notes for more information.
Fixed
- Fixed error when dragging a edge without createdFrom set
- Fixed
updateGraphPositions
not declared as public
Version 0.5.0
Known Issue: this version was compiled using typescript 3.7!
The resulting .d.ts
are only compatible with typescript versions >= 3.6
. See typescript 3.7 release notes for more information.
Added
- Added
currentViewWindow
to get the currently visible area of the graph - Added
currentViewWindow
to the 'zoomchange' event - Added 'render' event and
onBeforeCompleteRender
callback - Added 'edgetextdragstart' and 'edgetextdragend' events
- Added absolute positioning of elements on an edge path with
absolutePositionOnLine
- Added bidirectional/non-directional edges
- Added explicit
dragHandles
for edges (interfaceEdgeDragHandle
)
Fixed
- Fixed old node content staying when node type was changed
- Fixed
dragend
event listed asdragstart
in the documentation - Fixed null pointer when multiline textwrapping ends with a single character
Incompatible changes
- Interface
PathPositionRotationAndScale
has a new attributeabsolutePositionOnLine
(affecting edge markers, text components and LinkDragHandles) - Interface Edge has two new attributes:
dragHandles
andisBidirectional
Version 0.4.1
Known Issue: this version was compiled using typescript 3.7!
The resulting .d.ts
are only compatible with typescript versions >= 3.6
. See typescript 3.7 release notes for more information.
Added
- Added
currentZoomTransform
to get the current zoom transform of the graph - Added
zoomToBox
to zoom to a specific area of the graph - Added 'zoomchange' events to the grapheditor
- Added
getGraphPointFromClientCoordinates
as inverse ofgetClientPointFromGraphCoordinates
- Added 'nodedragstart' and 'nodedragend' events
- Added public
updateNodeClasses
to only update the classes of nodes
Fixed
- Fixed wrong imports depending on 'd3' instead of 'd3-selection'