Skip to content

Commit eadd7fb

Browse files
committed
add comments
1 parent 26936aa commit eadd7fb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/modebar/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ proto.updateButtons = function(buttons) {
8585
throw new Error('must provide button \'name\' in button config');
8686
}
8787
if(_this.buttonsNames.indexOf(buttonName) !== -1) {
88-
throw new Error('button name \'', + buttonName + '\' is taken');
88+
throw new Error('button name \'' + buttonName + '\' is taken');
8989
}
9090
_this.buttonsNames.push(buttonName);
9191

@@ -140,6 +140,8 @@ proto.createButton = function (config) {
140140
else {
141141
button.addEventListener('click', function(ev) {
142142
config.click(_this.graphInfo, ev);
143+
144+
// only needed for 'hoverClosestGeo' which does not call relayout
143145
_this.updateActiveButton(ev.currentTarget);
144146
});
145147
}

0 commit comments

Comments
 (0)