Skip to content

Commit 32aa219

Browse files
committed
Simplify clickmode / hovermode coercion code [1852]
1 parent cc2c9ba commit 32aa219

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/fx/layout_defaults.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
1616
return Lib.coerce(layoutIn, layoutOut, layoutAttributes, attr, dflt);
1717
}
1818

19-
coerce('clickmode');
19+
var clickmode = coerce('clickmode');
2020

2121
var dragMode = coerce('dragmode');
2222
if(dragMode === 'select') coerce('selectdirection');
2323

2424
var hovermodeDflt;
2525
if(layoutOut._has('cartesian')) {
26-
if(layoutOut.clickmode.indexOf('select') > -1) {
26+
if(clickmode.indexOf('select') > -1) {
2727
hovermodeDflt = 'closest';
2828
} else {
2929
// flag for 'horizontal' plots:

0 commit comments

Comments
 (0)