diff --git a/docs/graph3d/index.html b/docs/graph3d/index.html index 82de9f3da..58a2a1034 100644 --- a/docs/graph3d/index.html +++ b/docs/graph3d/index.html @@ -506,6 +506,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 diff --git a/lib/graph3d/Graph3d.js b/lib/graph3d/Graph3d.js index f83d9aa34..01d3e66c9 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 598048228..ce0d2ae46 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 },