Browse Source

Merge remote-tracking branch 'origin/v4' into v4

flowchartTest
jos 9 years ago
parent
commit
69dbe80e89
3 changed files with 3741 additions and 3738 deletions
  1. +3735
    -3735
      dist/vis.js
  2. +1
    -1
      lib/network/modules/PhysicsEngine.js
  3. +5
    -2
      lib/network/modules/components/nodes/shapes/Icon.js

+ 3735
- 3735
dist/vis.js
File diff suppressed because it is too large
View File


+ 1
- 1
lib/network/modules/PhysicsEngine.js View File

@ -28,7 +28,7 @@ class PhysicsEngine {
this.options = {}; this.options = {};
this.defaultOptions = { this.defaultOptions = {
barnesHut: { barnesHut: {
theta: 0.5, // inverted to save time during calculation
theta: 0.5,
gravitationalConstant: -2000, gravitationalConstant: -2000,
centralGravity: 0.3, centralGravity: 0.3,
springLength: 95, springLength: 95,

+ 5
- 2
lib/network/modules/components/nodes/shapes/Icon.js View File

@ -44,9 +44,8 @@ class Icon extends NodeBase {
_icon(ctx, x, y, selected) { _icon(ctx, x, y, selected) {
let iconSize = Number(this.options.icon.size); let iconSize = Number(this.options.icon.size);
let relativeIconSize = iconSize * this.body.view.scale;
if (this.options.icon.code && relativeIconSize > this.options.scaling.label.drawThreshold - 1) {
if (this.options.icon.code !== undefined) {
ctx.font = (selected ? "bold " : "") + iconSize + "px " + this.options.icon.face; ctx.font = (selected ? "bold " : "") + iconSize + "px " + this.options.icon.face;
// draw icon // draw icon
@ -62,6 +61,10 @@ class Icon extends NodeBase {
// disable shadows for other elements. // disable shadows for other elements.
this.disableShadow(ctx); this.disableShadow(ctx);
} }
else {
console.error('When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.')
}
} }
distanceToBorder(ctx, angle) { distanceToBorder(ctx, angle) {

Loading…
Cancel
Save