Browse Source

Fixed #626: added class name 'network-tooltip' to the tooltip, allowing custom styling.

v3_develop
jos 9 years ago
parent
commit
85a4982487
9 changed files with 53 additions and 41 deletions
  1. +1
    -0
      HISTORY.md
  2. +13
    -0
      dist/vis.css
  3. +8
    -16
      dist/vis.js
  4. +1
    -1
      dist/vis.map
  5. +1
    -1
      dist/vis.min.css
  6. +7
    -7
      dist/vis.min.js
  7. +2
    -1
      gulpfile.js
  8. +7
    -15
      lib/network/Popup.js
  9. +13
    -0
      lib/network/css/network-tooltip.css

+ 1
- 0
HISTORY.md View File

@ -15,6 +15,7 @@ http://visjs.org
- Added stabilizationIterationsDone event which fires at the end of the internal stabilization run. Does not imply that the network is stabilized.
- Added freezeSimulation method.
- Added clusterByZoom option.
- Added class name 'network-tooltip' to the tooltip, allowing custom styling.
- Fixed bug when redrawing was not right on zoomed-out browsers.
- Added opacity option to edges. Opacity is only used for the unselected state.
- Fixed bug where selections from removed data elements persisted.

+ 13
- 0
dist/vis.css View File

@ -791,4 +791,17 @@ div.network-navigation.zoomExtends {
background-image: url("img/network/zoomExtends.png");
bottom:50px;
right:15px;
}
div.network-tooltip {
position: absolute;
visibility: hidden;
padding: 5px;
white-space: nowrap;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
border: 1px solid;
box-shadow: 3px 3px 10px rgba(128, 128, 128, 0.5);
}

+ 8
- 16
dist/vis.js View File

@ -5,7 +5,7 @@
* A dynamic, browser-based visualization library.
*
* @version 3.9.2-SNAPSHOT
* @date 2015-02-10
* @date 2015-02-11
*
* @license
* Copyright (C) 2011-2014 Almende B.V, http://almende.com
@ -21220,21 +21220,13 @@ return /******/ (function(modules) { // webpackBootstrap
}
// create the frame
this.frame = document.createElement("div");
var styleAttr = this.frame.style;
styleAttr.position = "absolute";
styleAttr.visibility = "hidden";
styleAttr.border = "1px solid " + style.color.border;
styleAttr.color = style.fontColor;
styleAttr.fontSize = style.fontSize + "px";
styleAttr.fontFamily = style.fontFace;
styleAttr.padding = this.padding + "px";
styleAttr.backgroundColor = style.color.background;
styleAttr.borderRadius = "3px";
styleAttr.MozBorderRadius = "3px";
styleAttr.WebkitBorderRadius = "3px";
styleAttr.boxShadow = "3px 3px 10px rgba(128, 128, 128, 0.5)";
styleAttr.whiteSpace = "nowrap";
this.frame = document.createElement('div');
this.frame.className = 'network-tooltip';
this.frame.style.color = style.fontColor;
this.frame.style.backgroundColor = style.color.background;
this.frame.style.borderColor = style.color.border;
this.frame.style.fontSize = style.fontSize + 'px';
this.frame.style.fontFamily = style.fontFace;
this.container.appendChild(this.frame);
}

+ 1
- 1
dist/vis.map
File diff suppressed because it is too large
View File


+ 1
- 1
dist/vis.min.css
File diff suppressed because it is too large
View File


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


+ 2
- 1
gulpfile.js View File

@ -97,7 +97,8 @@ gulp.task('bundle-css', ['clean'], function () {
'./lib/timeline/component/css/pathStyles.css',
'./lib/network/css/network-manipulation.css',
'./lib/network/css/network-navigation.css'
'./lib/network/css/network-navigation.css',
'./lib/network/css/network-tooltip.css'
];
return gulp.src(files)

+ 7
- 15
lib/network/Popup.js View File

@ -49,21 +49,13 @@ function Popup(container, x, y, text, style) {
}
// create the frame
this.frame = document.createElement("div");
var styleAttr = this.frame.style;
styleAttr.position = "absolute";
styleAttr.visibility = "hidden";
styleAttr.border = "1px solid " + style.color.border;
styleAttr.color = style.fontColor;
styleAttr.fontSize = style.fontSize + "px";
styleAttr.fontFamily = style.fontFace;
styleAttr.padding = this.padding + "px";
styleAttr.backgroundColor = style.color.background;
styleAttr.borderRadius = "3px";
styleAttr.MozBorderRadius = "3px";
styleAttr.WebkitBorderRadius = "3px";
styleAttr.boxShadow = "3px 3px 10px rgba(128, 128, 128, 0.5)";
styleAttr.whiteSpace = "nowrap";
this.frame = document.createElement('div');
this.frame.className = 'network-tooltip';
this.frame.style.color = style.fontColor;
this.frame.style.backgroundColor = style.color.background;
this.frame.style.borderColor = style.color.border;
this.frame.style.fontSize = style.fontSize + 'px';
this.frame.style.fontFamily = style.fontFace;
this.container.appendChild(this.frame);
}

+ 13
- 0
lib/network/css/network-tooltip.css View File

@ -0,0 +1,13 @@
div.network-tooltip {
position: absolute;
visibility: hidden;
padding: 5px;
white-space: nowrap;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
border: 1px solid;
box-shadow: 3px 3px 10px rgba(128, 128, 128, 0.5);
}

Loading…
Cancel
Save