@@ -10,8 +10,8 @@ var getAxisGroup = require('../../plots/cartesian/constraints').getAxisGroup;
1010var Sieve = require ( './sieve.js' ) ;
1111
1212var TEXTPAD = require ( './constants' ) . TEXTPAD ;
13- var LINE_SPACING = require ( '../../ constants/alignment' ) . LINE_SPACING ;
14- var BR_TAG_ALL = require ( '../../lib/svg_text_utils' ) . BR_TAG_ALL ;
13+ const { TEXTPAD } = require ( './ constants' ) ;
14+ const { BR_TAG_ALL } = require ( '../../lib/svg_text_utils' ) ;
1515
1616/*
1717 * Bar chart stacking/grouping positioning and autoscaling calculations
@@ -784,15 +784,15 @@ function estimateAxisPaddingForText(trace, calcTrace) {
784784 if (
785785 trace . orientation === 'v' &&
786786 ( trace . text || trace . texttemplate ) &&
787- trace . textposition == 'outside' &&
788- ( trace . textangle == 'auto' || trace . textangle == 0 )
787+ trace . textposition === 'outside' &&
788+ ( trace . textangle === 'auto' || trace . textangle = == 0 )
789789 ) {
790790 // count number of lines by counting <br> elements
791791 function countLines ( text ) {
792792 if ( ! text || typeof text !== 'string' ) return 0 ;
793793 return ( text . match ( BR_TAG_ALL ) || [ ] ) . length + 1 ;
794794 }
795- var nLines = trace . texttemplate
795+ const nLines = trace . texttemplate
796796 ? countLines ( trace . texttemplate )
797797 : isArrayOrTypedArray ( trace . text )
798798 ? Math . max ( ...trace . text . map ( ( t ) => countLines ( t ) ) )
0 commit comments