Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ustutt/grapheditor-webcomponent

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ustutt/grapheditor-webcomponent - npm Package Versions

23

0.7.0

Diff

Changelog

Source

[0.7.0] - 2024-01-10

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 or custom
  • 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}]" (also edges and classes)
    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 (use getSingleNodeSelection or getSingleEdgeSelection if possible)
buehlefs
published 0.7.0-pre1 •

buehlefs
published 0.6.2 •

Changelog

Source

[0.6.2] - 2021-09-05

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
buehlefs
published 0.6.1 •

Changelog

Source

[0.6.1] - 2020-11-08

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 a text css class. Now all text tags will be wrapped automatically.
buehlefs
published 0.6.0 •

Changelog

Source

[0.6.0] - 2020-7-23

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 and getDraggedEdgeSelection to grapheditor
  • Added utility methods removeAllChildNodes and copyTemplateSelectionIntoNode 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 until completeRender was called
  • Potentially fixed removing edge throwing an error when the edge is removed from the object cache
buehlefs
published 0.5.4 •

Changelog

Source

[0.5.4] - 2020-04-30

Fixed

  • Fixed build errors when using the package in a typescript project
buehlefs
published 0.5.3 •

Changelog

Source

[0.5.3] - 2020-04-30

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
buehlefs
published 0.5.2 •

Changelog

Source

[0.5.2] - 2020-03-08

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
buehlefs
published 0.5.1 •

Changelog

Source

[0.5.1] - 2020-02-26

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
buehlefs
published 0.5.0 •

Changelog

Source

[0.5.0] - 2020-02-25

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 (interface EdgeDragHandle)

Fixed

  • Fixed old node content staying when node type was changed
  • Fixed dragend event listed as dragstart in the documentation
  • Fixed null pointer when multiline textwrapping ends with a single character

Incompatible changes

  • Interface PathPositionRotationAndScale has a new attribute absolutePositionOnLine (affecting edge markers, text components and LinkDragHandles)
  • Interface Edge has two new attributes: dragHandles and isBidirectional
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc