Skip to content

Commit 9134ef4

Browse files
committed
Rangeselector and Rangeslider cleanups
1 parent 59e31f2 commit 9134ef4

File tree

5 files changed

+4
-29
lines changed

5 files changed

+4
-29
lines changed

src/components/fields/derived.js

+3-21
Original file line numberDiff line numberDiff line change
@@ -85,27 +85,9 @@ export const AxisOverlayDropdown = connectToContainer(UnconnectedDropdown, {
8585

8686
export const RangesliderVisible = connectToContainer(UnconnectedRadio, {
8787
modifyPlotProps: (props, context, plotProps) => {
88-
if (
89-
!plotProps.isVisible &&
90-
context.fullContainer &&
91-
context.fullContainer._id &&
92-
context.fullContainer._id.startsWith('x')
93-
) {
94-
plotProps.isVisible = true;
95-
return;
96-
}
97-
},
98-
});
99-
100-
export const RangeselectorVisible = connectToContainer(UnconnectedRadio, {
101-
modifyPlotProps: (props, context, plotProps) => {
102-
if (
103-
!plotProps.isVisible &&
104-
context.fullContainer &&
105-
context.fullContainer._id &&
106-
context.fullContainer._id.startsWith('x') &&
107-
context.fullContainer.type === 'date'
108-
) {
88+
if (!plotProps.fullValue) {
89+
plotProps.fullValue = false;
90+
plotProps.visible = false;
10991
plotProps.isVisible = true;
11092
return;
11193
}

src/components/fields/index.js

-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ import {
4040
LayoutNumeric,
4141
LayoutNumericFractionInverse,
4242
RangesliderVisible,
43-
RangeselectorVisible,
4443
TraceOrientation,
4544
AxisOverlayDropdown,
4645
AxisSide,
@@ -86,7 +85,6 @@ export {
8685
Radio,
8786
SymbolSelector,
8887
RangesliderVisible,
89-
RangeselectorVisible,
9088
TextEditor,
9189
TraceOrientation,
9290
TraceSelector,

src/components/index.js

-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ import {
3838
Text,
3939
Radio,
4040
RangesliderVisible,
41-
RangeselectorVisible,
4241
AxisCreator,
4342
SymbolSelector,
4443
TextEditor,
@@ -86,7 +85,6 @@ export {
8685
UpdateMenuAccordion,
8786
AnnotationArrowRef,
8887
RangesliderVisible,
89-
RangeselectorVisible,
9088
AnnotationRef,
9189
PositioningRef,
9290
ArrowSelector,

src/default_panels/StyleAxesPanel.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import {
2020
AxesFold,
2121
TraceTypeSection,
2222
RangesliderVisible,
23-
RangeselectorVisible,
2423
RangeSelectorAccordion,
2524
} from '../components';
2625

@@ -386,7 +385,7 @@ class StyleAxesPanel extends Component {
386385
axis._subplot.includes('xaxis') && axis.type === 'date'
387386
}
388387
>
389-
<RangeselectorVisible
388+
<Radio
390389
attr="rangeselector.visible"
391390
options={[
392391
{label: _('Show'), value: true},

src/index.js

-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ import {
6464
SymbolSelector,
6565
TextEditor,
6666
RangesliderVisible,
67-
RangeselectorVisible,
6867
TraceAccordion,
6968
TraceMarkerSection,
7069
TraceRequiredPanel,
@@ -110,7 +109,6 @@ export {
110109
Dropzone,
111110
EDITOR_ACTIONS,
112111
RangesliderVisible,
113-
RangeselectorVisible,
114112
Flaglist,
115113
Fold,
116114
FontSelector,

0 commit comments

Comments
 (0)