Skip to content
This repository was archived by the owner on Jul 29, 2019. It is now read-only.

Commit 090fdd5

Browse files
committed
Add graph3d tooltip delay option
1 parent 320b180 commit 090fdd5

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

lib/graph3d/Graph3d.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ Graph3d.DEFAULTS = {
6969

7070
style : Graph3d.STYLE.DOT,
7171
tooltip : false,
72+
tooltipDelay : 300,
7273

7374
tooltipStyle : {
7475
content : {
@@ -2005,7 +2006,7 @@ Graph3d.prototype._onClick = function (event) {
20052006
* @param {Event} event A mouse move event
20062007
*/
20072008
Graph3d.prototype._onTooltip = function (event) {
2008-
var delay = 300; // ms
2009+
var delay = this.tooltipDelay; // ms
20092010
var boundingRect = this.frame.getBoundingClientRect();
20102011
var mouseX = getMouseX(event) - boundingRect.left;
20112012
var mouseY = getMouseY(event) - boundingRect.top;

lib/graph3d/Settings.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ var OPTIONKEYS = [
7474
'xCenter',
7575
'yCenter',
7676
'zoomable',
77+
'tooltipDelay',
7778
'ctrlToZoom'
7879
];
7980

lib/graph3d/options.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ let allOptions = {
9292
]
9393
},
9494
tooltip : { boolean: bool, 'function': 'function' },
95+
tooltipDelay : { number: number },
9596
tooltipStyle : {
9697
content: {
9798
color : { string },

0 commit comments

Comments
 (0)