mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 13:28:36 +03:00
add toggle button for sites
This commit is contained in:
@@ -5,60 +5,42 @@ import RefreshIcon from './presentational/Icons/RefreshIcon.js';
|
||||
import CoeventIcon from './presentational/Icons/CoeventIcon.js';
|
||||
import RouteIcon from './presentational/Icons/RouteIcon.js';
|
||||
|
||||
class ToolbarBottomActions extends React.Component {
|
||||
resetAllFilters() {
|
||||
this.props.actions.resetAllFilters();
|
||||
}
|
||||
|
||||
toggleInfoPopup() {
|
||||
this.props.actions.toggleInfoPopup();
|
||||
}
|
||||
|
||||
toggleLanguage() {
|
||||
this.props.actions.toggleLanguage();
|
||||
}
|
||||
|
||||
toggleMapViews(layer) {
|
||||
this.props.actions.toggleMapView(layer);
|
||||
}
|
||||
|
||||
renderMapActions() {
|
||||
function ToolbarBottomActions (props) {
|
||||
function renderMapActions() {
|
||||
return (
|
||||
<div className="bottom-action-block">
|
||||
<RouteIcon
|
||||
onClick={(view) => this.toggleMapViews(view)}
|
||||
isEnabled={this.props.viewFilters.routes}
|
||||
/>
|
||||
{/* <RouteIcon */}
|
||||
{/* onClick={(view) => this.toggleMapViews(view)} */}
|
||||
{/* isEnabled={this.props.viewFilters.routes} */}
|
||||
{/* /> */}
|
||||
<SitesIcon
|
||||
onClick={(view) => this.toggleMapViews(view)}
|
||||
isEnabled={this.props.viewFilters.sites}
|
||||
/>
|
||||
<CoeventIcon
|
||||
onClick={(view) => this.toggleMapViews(view)}
|
||||
isEnabled={this.props.viewFilters.coevents}
|
||||
isEnabled={props.sites.enabled}
|
||||
onClickHandler={props.sites.toggle}
|
||||
/>
|
||||
{/* <CoeventIcon */}
|
||||
{/* onClick={(view) => this.toggleMapViews(view)} */}
|
||||
{/* isEnabled={this.props.viewFilters.coevents} */}
|
||||
{/* /> */}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="bottom-actions">
|
||||
{/*}{this.renderMapActions()}
|
||||
<div className="bottom-action-block">
|
||||
<button className="action-button tiny default" onClick={() => { this.toggleLanguage()}}>
|
||||
{(this.props.language === 'es-MX') ? 'ES' : 'EN' }
|
||||
</button>
|
||||
<button className="action-button info tiny default" onClick={() => { this.toggleInfoPopup()}}>
|
||||
i
|
||||
</button>
|
||||
<button className="action-button tiny" onClick={() => this.resetAllFilters()}>
|
||||
<RefreshIcon />
|
||||
</button>
|
||||
</div>*/}
|
||||
return (
|
||||
<div className="bottom-actions">
|
||||
{renderMapActions()}
|
||||
<div className="bottom-action-block">
|
||||
{/* <button className="action-button tiny default" onClick={() => { toggleLanguage()}}> */}
|
||||
{/* {(props.language === 'es-MX') ? 'ES' : 'EN' } */}
|
||||
{/* </button> */}
|
||||
{/* <button className="action-button info tiny default" onClick={() => { this.toggleInfoPopup()}}> */}
|
||||
{/* i */}
|
||||
{/* </button> */}
|
||||
{/* <button className="action-button tiny" onClick={() => this.resetAllFilters()}> */}
|
||||
{/* <RefreshIcon /> */}
|
||||
{/* </button> */}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default ToolbarBottomActions;
|
||||
|
||||
Reference in New Issue
Block a user