|
@ -9937,6 +9937,8 @@ function Edge (properties, graph, constants) { |
|
|
this.style = constants.edges.style; |
|
|
this.style = constants.edges.style; |
|
|
this.title = undefined; |
|
|
this.title = undefined; |
|
|
this.width = constants.edges.width; |
|
|
this.width = constants.edges.width; |
|
|
|
|
|
this.widthSelectionMultiplier = constants.edges.widthSelectionMultiplier; |
|
|
|
|
|
this.widthSelected = this.width * this.widthSelectionMultiplier; |
|
|
this.hoverWidth = constants.edges.hoverWidth; |
|
|
this.hoverWidth = constants.edges.hoverWidth; |
|
|
this.value = undefined; |
|
|
this.value = undefined; |
|
|
this.length = constants.physics.springLength; |
|
|
this.length = constants.physics.springLength; |
|
@ -10006,6 +10008,8 @@ Edge.prototype.setProperties = function(properties, constants) { |
|
|
|
|
|
|
|
|
if (properties.title !== undefined) {this.title = properties.title;} |
|
|
if (properties.title !== undefined) {this.title = properties.title;} |
|
|
if (properties.width !== undefined) {this.width = properties.width;} |
|
|
if (properties.width !== undefined) {this.width = properties.width;} |
|
|
|
|
|
if (properties.widthSelectionMultiplier !== undefined) |
|
|
|
|
|
{this.widthSelectionMultiplier = properties.widthSelectionMultiplier;} |
|
|
if (properties.hoverWidth !== undefined) {this.hoverWidth = properties.hoverWidth;} |
|
|
if (properties.hoverWidth !== undefined) {this.hoverWidth = properties.hoverWidth;} |
|
|
if (properties.value !== undefined) {this.value = properties.value;} |
|
|
if (properties.value !== undefined) {this.value = properties.value;} |
|
|
if (properties.length !== undefined) {this.length = properties.length; |
|
|
if (properties.length !== undefined) {this.length = properties.length; |
|
@ -10040,6 +10044,8 @@ Edge.prototype.setProperties = function(properties, constants) { |
|
|
this.widthFixed = this.widthFixed || (properties.width !== undefined); |
|
|
this.widthFixed = this.widthFixed || (properties.width !== undefined); |
|
|
this.lengthFixed = this.lengthFixed || (properties.length !== undefined); |
|
|
this.lengthFixed = this.lengthFixed || (properties.length !== undefined); |
|
|
|
|
|
|
|
|
|
|
|
this.widthSelected = this.width * this.widthSelectionMultiplier; |
|
|
|
|
|
|
|
|
// set draw method based on style
|
|
|
// set draw method based on style
|
|
|
switch (this.style) { |
|
|
switch (this.style) { |
|
|
case 'line': this.draw = this._drawLine; break; |
|
|
case 'line': this.draw = this._drawLine; break; |
|
@ -10217,7 +10223,7 @@ Edge.prototype._drawLine = function(ctx) { |
|
|
*/ |
|
|
*/ |
|
|
Edge.prototype._getLineWidth = function() { |
|
|
Edge.prototype._getLineWidth = function() { |
|
|
if (this.selected == true) { |
|
|
if (this.selected == true) { |
|
|
return Math.min(this.width * 2, this.widthMax)*this.graphScaleInv; |
|
|
|
|
|
|
|
|
return Math.min(this.widthSelected, this.widthMax)*this.graphScaleInv; |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
if (this.hover == true) { |
|
|
if (this.hover == true) { |
|
@ -10862,6 +10868,7 @@ Edge.prototype.getControlNodePositions = function(ctx) { |
|
|
|
|
|
|
|
|
return {from:{x:xFrom,y:yFrom},to:{x:xTo,y:yTo}}; |
|
|
return {from:{x:xFrom,y:yFrom},to:{x:xTo,y:yTo}}; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Popup is a class to create a popup window with some text |
|
|
* Popup is a class to create a popup window with some text |
|
|
* @param {Element} container The container object. |
|
|
* @param {Element} container The container object. |
|
@ -16115,6 +16122,7 @@ function Graph (container, data, options) { |
|
|
widthMin: 1, |
|
|
widthMin: 1, |
|
|
widthMax: 15, |
|
|
widthMax: 15, |
|
|
width: 1, |
|
|
width: 1, |
|
|
|
|
|
widthSelectionMultiplier: 2, |
|
|
hoverWidth: 1.5, |
|
|
hoverWidth: 1.5, |
|
|
style: 'line', |
|
|
style: 'line', |
|
|
color: { |
|
|
color: { |
|
|