Skip to content

Commit 7bc5887

Browse files
committed
no false option for groupclick
1 parent b0ac05f commit 7bc5887

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

src/components/legend/attributes.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,13 @@ module.exports = {
110110
},
111111
groupclick: {
112112
valType: 'enumerated',
113-
values: ['toggleitem', 'togglegroup', false],
113+
values: ['toggleitem', 'togglegroup'],
114114
dflt: 'togglegroup',
115115
editType: 'legend',
116116
description: [
117117
'Determines the behavior on legend group item click.',
118118
'*toggleitem* toggles the visibility of the individual item clicked on the graph.',
119-
'*togglegroup* toggles the visibility of all items in the same legendgroup as the item clicked on the graph.',
120-
'*false* disables legend group click interactions.'
119+
'*togglegroup* toggles the visibility of all items in the same legendgroup as the item clicked on the graph.'
121120
].join(' ')
122121
},
123122
x: {

src/components/legend/handle_click.js

-3
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,6 @@ module.exports = function handleClick(g, gd, numClicks) {
151151
}
152152

153153
if(hasLegendgroup) {
154-
if(groupClick === false) return;
155-
156154
if(toggleGroup) {
157155
for(i = 0; i < fullData.length; i++) {
158156
if(fullData[i].visible !== false && fullData[i].legendgroup === legendgroup) {
@@ -201,7 +199,6 @@ module.exports = function handleClick(g, gd, numClicks) {
201199
// N.B. consider traces that have a set legendgroup as toggleable
202200
notInLegend = (fullData[i].showlegend !== true && !fullData[i].legendgroup);
203201
isInGroup = isClicked || (hasLegendgroup && fullData[i].legendgroup === legendgroup);
204-
if(isInGroup && groupClick === false) continue;
205202
setVisibility(fullData[i], ((isInGroup && toggleGroup) || notInLegend) ? true : otherState);
206203
break;
207204
}

test/plot-schema.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -2684,14 +2684,13 @@
26842684
}
26852685
},
26862686
"groupclick": {
2687-
"description": "Determines the behavior on legend group item click. *toggleitem* toggles the visibility of the individual item clicked on the graph. *togglegroup* toggles the visibility of all items in the same legendgroup as the item clicked on the graph. *false* disables legend group click interactions.",
2687+
"description": "Determines the behavior on legend group item click. *toggleitem* toggles the visibility of the individual item clicked on the graph. *togglegroup* toggles the visibility of all items in the same legendgroup as the item clicked on the graph.",
26882688
"dflt": "togglegroup",
26892689
"editType": "legend",
26902690
"valType": "enumerated",
26912691
"values": [
26922692
"toggleitem",
2693-
"togglegroup",
2694-
false
2693+
"togglegroup"
26952694
]
26962695
},
26972696
"itemclick": {

0 commit comments

Comments
 (0)