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

Commit

Permalink
Add graph3d tooltip delay option
Browse files Browse the repository at this point in the history
  • Loading branch information
eanar committed Feb 21, 2019
1 parent 320b180 commit a9a60ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/graph3d/Graph3d.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ Graph3d.DEFAULTS = {

style : Graph3d.STYLE.DOT,
tooltip : false,
tooltipDelay : 300,

tooltipStyle : {
content : {
Expand Down Expand Up @@ -2005,7 +2006,7 @@ Graph3d.prototype._onClick = function (event) {
* @param {Event} event A mouse move event
*/
Graph3d.prototype._onTooltip = function (event) {
var delay = 300; // ms
var delay = this.tooltipDelay; // ms
var boundingRect = this.frame.getBoundingClientRect();
var mouseX = getMouseX(event) - boundingRect.left;
var mouseY = getMouseY(event) - boundingRect.top;
Expand Down

0 comments on commit a9a60ca

Please sign in to comment.