We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ccba6e9 commit 3f45a8fCopy full SHA for 3f45a8f
src/components/modebar/modebar.js
@@ -10,6 +10,7 @@
10
'use strict';
11
12
var d3 = require('d3');
13
+var isNumeric = require('fast-isnumeric');
14
15
var Lib = require('../../lib');
16
var Icons = require('../../../build/ploticon');
@@ -175,8 +176,8 @@ proto.createButton = function(config) {
175
176
* @Return {HTMLelement}
177
*/
178
proto.createIcon = function(thisIcon, name) {
- var iconHeight = thisIcon.height !== undefined ?
179
- thisIcon.height :
+ var iconHeight = isNumeric(thisIcon.height) ?
180
+ Number(thisIcon.height) :
181
thisIcon.ascent - thisIcon.descent,
182
svgNS = 'http://www.w3.org/2000/svg',
183
icon = document.createElementNS(svgNS, 'svg'),
0 commit comments