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.12 to 0.0.13

2

package.json
{
"name": "dag-builder-js",
"version": "0.0.12",
"version": "0.0.13",
"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",

@@ -32,4 +32,4 @@ /* SPDX-License-Identifier: GPL-3.0-only */

connectorA.selectEdgeConnector(true);
connectorB.selectEdgeConnector(true);
connectorA.setSelected(true);
connectorB.setSelected(true);

@@ -79,4 +79,4 @@ let bboxVertA = connectorA.edgeConnectorEl.node().getBBox();

connectorA.selectEdgeConnector(false);
connectorB.selectEdgeConnector(false);
connectorA.setSelected(false);
connectorB.setSelected(false);

@@ -83,0 +83,0 @@ this.drawingContext.remove();

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

this.vertexHolderA = new VertexConnectorHolder(vertex, edgeConnector);
edgeConnector.selectEdgeConnector(true);
edgeConnector.setSelected(true);

@@ -64,5 +64,5 @@ this.line = new EdgeLine(this.drawingContext, translationMat(vertex.drawingContext.node()));

if (this.vertexHolderA?.connector)
this.vertexHolderA.connector.selectEdgeConnector(false);
this.vertexHolderA.connector.setSelected(false);
if (this.vertexHolderB?.connector)
this.vertexHolderB.connector.selectEdgeConnector(false);
this.vertexHolderB.connector.setSelected(false);

@@ -69,0 +69,0 @@ this.cleanUp();

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

static UUID_ATTR = 'connector-uuid';
static SELECTED_CLASS = 'selected';

@@ -51,8 +52,8 @@ constructor(connectorType, order, name, type) {

}
/**
* Abstract method to be implemented on each subclass of EdgeConnector
*/
getEdgeConnectorConfig() {
throw new Error('You have to implement the method getEdgeConnectorConfig(x, y, maxWidth) in your subclass!');
getConfig() {
throw new Error('You have to implement the method getConfig(x, y, maxWidth) in your subclass!');
}

@@ -100,3 +101,3 @@

// edge connector
const edgeConnector = this.getEdgeConnectorConfig(x, y, maxWidth);
const edgeConnector = this.getConfig(x, y, maxWidth);

@@ -148,8 +149,12 @@ this.edgeConnectorEl = this.drawingContext

selectEdgeConnector(select) {
this.drawingContext
.select('.connector')
.classed('selected', select);
setSelected(value) {
this.edgeConnectorEl
.classed(EdgeConnector.SELECTED_CLASS, value);
}
isSelected() {
return this.edgeConnectorEl
.classed(EdgeConnector.SELECTED_CLASS);
}
serialize() {

@@ -172,3 +177,3 @@ return new VertexConnectorSerializable(

getEdgeConnectorConfig(x, y) {
getConfig(x, y) {
return {

@@ -214,4 +219,4 @@ x: x - (EdgeConnector.EDGE_CONNECTOR_SIZE.width / 2),

}
getEdgeConnectorConfig(x, y) {
getConfig(x, y) {
//TODO change css so that users know straight away that this is a custom input

@@ -258,3 +263,3 @@ return {

getEdgeConnectorConfig(x, y, maxWidth) {
getConfig(x, y, maxWidth) {
return {

@@ -261,0 +266,0 @@ x: x + maxWidth - (EdgeConnector.EDGE_CONNECTOR_SIZE.width / 2),

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