plotly.js 2.8.0 → 2.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plotly.js",
3
- "version": "2.8.0",
3
+ "version": "2.8.1",
4
4
  "description": "The open source javascript graphing library that powers plotly",
5
5
  "license": "MIT",
6
6
  "main": "./lib/index.js",
@@ -453,6 +453,7 @@ module.exports = function(gd, plotinfo, cdheatmaps, heatmapLayer) {
453
453
  var font = trace.textfont;
454
454
  var fontFamily = font.family;
455
455
  var fontSize = font.size;
456
+ var globalFontSize = gd._fullLayout.font.size;
456
457
 
457
458
  if(!fontSize || fontSize === 'auto') {
458
459
  var minW = Infinity;
@@ -479,7 +480,7 @@ module.exports = function(gd, plotinfo, cdheatmaps, heatmapLayer) {
479
480
  !isFinite(minW) ||
480
481
  !isFinite(minH)
481
482
  ) {
482
- fontSize = 12;
483
+ fontSize = globalFontSize;
483
484
  } else {
484
485
  minW -= xGap;
485
486
  minH -= yGap;
@@ -492,7 +493,8 @@ module.exports = function(gd, plotinfo, cdheatmaps, heatmapLayer) {
492
493
 
493
494
  fontSize = Math.min(
494
495
  Math.floor(minW),
495
- Math.floor(minH)
496
+ Math.floor(minH),
497
+ globalFontSize
496
498
  );
497
499
  }
498
500
  }
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use strict';
2
2
 
3
3
  // package version injected by `npm run preprocess`
4
- exports.version = '2.8.0';
4
+ exports.version = '2.8.1';