From 2337978395bd0d7f11fe02008beefe121bb188fb Mon Sep 17 00:00:00 2001 From: eanar Date: Wed, 20 Feb 2019 23:16:37 -0800 Subject: [PATCH 1/3] Add graph3d tooltip delay option --- lib/graph3d/Graph3d.js | 3 ++- lib/graph3d/Settings.js | 1 + lib/graph3d/options.js | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/graph3d/Graph3d.js b/lib/graph3d/Graph3d.js index fb25d1b48..eeea7d121 100755 --- a/lib/graph3d/Graph3d.js +++ b/lib/graph3d/Graph3d.js @@ -69,6 +69,7 @@ Graph3d.DEFAULTS = { style : Graph3d.STYLE.DOT, tooltip : false, + tooltipDelay : 300, tooltipStyle : { content : { @@ -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; diff --git a/lib/graph3d/Settings.js b/lib/graph3d/Settings.js index 0080e28e4..26b0a3590 100755 --- a/lib/graph3d/Settings.js +++ b/lib/graph3d/Settings.js @@ -74,6 +74,7 @@ var OPTIONKEYS = [ 'xCenter', 'yCenter', 'zoomable', + 'tooltipDelay', 'ctrlToZoom' ]; diff --git a/lib/graph3d/options.js b/lib/graph3d/options.js index a01902d84..ff623d3bf 100644 --- a/lib/graph3d/options.js +++ b/lib/graph3d/options.js @@ -92,6 +92,7 @@ let allOptions = { ] }, tooltip : { boolean: bool, 'function': 'function' }, + tooltipDelay : { number: number }, tooltipStyle : { content: { color : { string }, From 0bf98adaf6ed6d2910f5707bcdcfc15e2afd1403 Mon Sep 17 00:00:00 2001 From: eanar Date: Thu, 21 Feb 2019 00:49:55 -0800 Subject: [PATCH 2/3] Add tooltipDelay to graph3d docs --- docs/graph3d/index.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/graph3d/index.html b/docs/graph3d/index.html index 8a9da48b4..4cc701409 100644 --- a/docs/graph3d/index.html +++ b/docs/graph3d/index.html @@ -539,6 +539,15 @@

Configuration Options

+ + tooltipDelay + number + 300 + The delay time for the tooltip to appear when the mouse cursor + hovers over an x-y grid tile. + + + tooltipStyle Object From dee7e3f5c0afffcdd9bb62215ef92373784bcf77 Mon Sep 17 00:00:00 2001 From: Alexander Wunschik Date: Tue, 6 Aug 2019 21:02:20 +0200 Subject: [PATCH 3/3] chore(docs): add unit of tooltipDelay --- docs/graph3d/index.html | 2 +- lib/graph3d/Graph3d.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/graph3d/index.html b/docs/graph3d/index.html index 4cc701409..73cb9482f 100644 --- a/docs/graph3d/index.html +++ b/docs/graph3d/index.html @@ -543,7 +543,7 @@

Configuration Options

tooltipDelay number 300 - The delay time for the tooltip to appear when the mouse cursor + The delay time (in ms) for the tooltip to appear when the mouse cursor hovers over an x-y grid tile. diff --git a/lib/graph3d/Graph3d.js b/lib/graph3d/Graph3d.js index eeea7d121..f94173eeb 100755 --- a/lib/graph3d/Graph3d.js +++ b/lib/graph3d/Graph3d.js @@ -69,7 +69,7 @@ Graph3d.DEFAULTS = { style : Graph3d.STYLE.DOT, tooltip : false, - tooltipDelay : 300, + tooltipDelay : 300, // milliseconds tooltipStyle : { content : {