Socket
Socket
Sign inDemoInstall

visjs-network

Package Overview
Dependencies
6
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.23.1 to 4.24.0

examples/basicUsage.html

34

lib/network/modules/ManipulationSystem.js

@@ -1145,2 +1145,29 @@ let util = require('../../util')

let pointer = this.body.functions.getPointer(event.center)
var pointerObj = this.selectionHandler._pointerToPositionObject(pointer)
// remember the edge id
var connectFromId = undefined
if (this.temporaryIds.edges[0] !== undefined) {
connectFromId = this.body.edges[this.temporaryIds.edges[0]].fromId
}
// get the overlapping node but NOT the temporary node;
var overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(
pointerObj
)
var node = undefined
for (var i = overlappingNodeIds.length - 1; i >= 0; i--) {
// if the node id is NOT a temporary node, accept the node.
if (this.temporaryIds.nodes.indexOf(overlappingNodeIds[i]) === -1) {
node = this.body.nodes[overlappingNodeIds[i]]
break
}
}
event.controlEdge = { from: connectFromId, to: node ? node.id : undefined }
this.selectionHandler._generateClickEvent(
'controlNodeDragging',
event,
pointer
)
if (this.temporaryIds.nodes[0] !== undefined) {

@@ -1209,2 +1236,9 @@ let targetNode = this.body.nodes[this.temporaryIds.nodes[0]] // there is only one temp node in the add edge mode.

event.controlEdge = { from: connectFromId, to: node ? node.id : undefined }
this.selectionHandler._generateClickEvent(
'controlNodeDragEnd',
event,
pointer
)
// No need to do _generateclickevent('dragEnd') here, the regular dragEnd event fires.

@@ -1211,0 +1245,0 @@ this.body.emitter.emit('_redraw')

4

lib/network/modules/SelectionHandler.js

@@ -156,2 +156,6 @@ var Node = require('./components/Node').default

if (event.controlEdge !== undefined) {
properties.controlEdge = event.controlEdge
}
this.body.emitter.emit(eventType, properties)

@@ -158,0 +162,0 @@ }

2

package.json
{
"name": "visjs-network",
"version": "4.23.1",
"version": "4.24.0",
"description": "A dynamic, browser-based network visualization library.",

@@ -5,0 +5,0 @@ "homepage": "http://visjs.org/",

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

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 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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc