Skip to content

Commit f5bd8ca

Browse files
committed
Cleaned up code. Removed unused props and states.
1 parent 34ea55f commit f5bd8ca

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

example/DrillDown.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ class DrillDown extends React.Component {
1313
super(props);
1414

1515
this.state = {
16-
showDefaultOverlayBtn: (this.props.showDefaultOverlayBtn === null) ? true : this.props.showDefaultOverlayBtn,
1716
showOverlaybtn: true,
18-
overlayZindex: 1,
1917
// Absolute position of Overlay Button
2018
positionH: (this.props.defaultOverlayBtnSettings && this.props.defaultOverlayBtnSettings.placement && this.props.defaultOverlayBtnSettings.placement.includes('-')) ? this.props.defaultOverlayBtnSettings.placement.split('-')[1] : 'right',
2119
positionV: (this.props.defaultOverlayBtnSettings && this.props.defaultOverlayBtnSettings.placement && this.props.defaultOverlayBtnSettings.placement.includes('-')) ? this.props.defaultOverlayBtnSettings.placement.split('-')[0] : 'top',
@@ -122,8 +120,7 @@ class DrillDown extends React.Component {
122120
position: 'absolute',
123121
[this.state.positionH]: `${this.state.margin}`,
124122
[this.state.positionV]: `${this.state.margin}`,
125-
cursor: 'pointer',
126-
// zIndex: this.state.overlayZindex
123+
cursor: 'pointer'
127124
};
128125

129126
// In-line style for root element of DrillDown component
@@ -132,8 +129,6 @@ class DrillDown extends React.Component {
132129
display: 'inline-block'
133130
}
134131

135-
const props = this.props;
136-
137132
if(this.state.showDrillDown) {
138133
return (
139134
<div style={ rootStyle }>
@@ -164,9 +159,9 @@ class DrillDown extends React.Component {
164159
} else {
165160
return (
166161
<ReactFC
167-
{...props}
168-
fcEvent-dataplotClick={this.plotClicked.bind(this)}
169-
/>
162+
{...this.props}
163+
fcEvent-dataplotClick={this.plotClicked.bind(this)}
164+
/>
170165
);
171166
}
172167
}

0 commit comments

Comments
 (0)