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

dag-builder-js

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dag-builder-js - npm Package Compare versions

Comparing version 0.0.14 to 0.0.15

2

package.json
{
"name": "dag-builder-js",
"version": "0.0.14",
"version": "0.0.15",
"description": "dag-builder-js is a simple-to-use Javascript DAG library with support to N:N vertices/edges. It supports validating that no cycle can be created in real-time, import/export states and it's built on SVG so you can render graphs pretty much anywhere.",

@@ -5,0 +5,0 @@ "main": "dist/dag.js",

@@ -153,3 +153,3 @@ Directed-Acyclic-Graph-Builder-js (dag-builder-js)

function onEdgeAdded(type, graph, vertex){
function onEdgeAdded(type, graph, edge){
// When edge is added to graph

@@ -169,3 +169,3 @@ }

function onEdgeRemoved(type, graph, vertex){
function onEdgeRemoved(type, graph, edge){
// When edge is removed from graph

@@ -172,0 +172,0 @@ }

@@ -54,8 +54,12 @@ /* SPDX-License-Identifier: GPL-3.0-only */

// add support for selecting invididual edges
this.setupClickEvents();
this.setupClickEvents(graph);
}
setupClickEvents() {
this.drawingContext.on('click', (event) => {
setupClickEvents(graph) {
this.drawingContext.on('click', (event) => {
event.stopPropagation();
/* ignore event if graph is in readOnly mode */
if(graph.readOnly) return;
this.setSelected(!this.isSelected());

@@ -62,0 +66,0 @@ });

@@ -24,2 +24,3 @@ /* SPDX-License-Identifier: GPL-3.0-only */

this.edges = new EdgeContainer();
this.readOnly = false;

@@ -140,2 +141,5 @@ /* internal-only listeners */

d3.select(window).on("keydown", (event) => {
/* ignore event if graph is in readOnly mode */
if(this.readOnly) return;
if ([46 /* delete */, 8 /* backspace */].includes(event.keyCode)) {

@@ -231,2 +235,5 @@ // delete dependent edges on doomed vertices

edgeConnectorGenericDragHandler(type, that, event) {
/* ignore event if graph is in readOnly mode */
if(that.readOnly) return;
let vertex = null;

@@ -267,3 +274,3 @@ let connector = null;

that.update();
}
}
}

@@ -148,3 +148,3 @@ /* SPDX-License-Identifier: GPL-3.0-only */

// add support for selecting invididual vertices
this.setupClickEvents();
this.setupClickEvents(graph);
}

@@ -201,5 +201,9 @@

setupClickEvents() {
setupClickEvents(graph) {
this.drawingContext.on('click', (event) => {
event.stopPropagation();
/* ignore event if graph is in readOnly mode */
if(graph.readOnly) return;
this.setSelected(!this.isSelected());

@@ -206,0 +210,0 @@ });

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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