Skip to content

Commit

Permalink
remove addlayer and group layers // reimplement date change arrows
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanweiler92 committed Aug 8, 2023
1 parent 5a0bee4 commit 699ff99
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class DateChangeArrows extends PureComponent {
arrowDown,
tilesPreloaded,
isKioskModeActive,
isEmbedModeActive,
} = this.props;

const leftArrowDown = () => this.onArrowDown('left');
Expand All @@ -93,7 +94,7 @@ class DateChangeArrows extends PureComponent {

{/* LEFT ARROW */}
<div
className={`button-action-group${leftArrowDisabled ? ' button-disabled' : ''} ${isKioskModeActive ? 'd-none' : ''}`}
className={`button-action-group${leftArrowDisabled ? ' button-disabled' : ''} ${isKioskModeActive && !isEmbedModeActive ? 'd-none' : ''}`}
id="left-arrow-group"
onMouseDown={leftArrowDown}
onMouseUp={leftArrowUp}
Expand All @@ -116,7 +117,7 @@ class DateChangeArrows extends PureComponent {

{/* RIGHT ARROW */}
<div
className={`button-action-group${rightArrowDisabled ? ' button-disabled' : ''} ${isKioskModeActive ? 'd-none' : ''}`}
className={`button-action-group${rightArrowDisabled ? ' button-disabled' : ''} ${isKioskModeActive && !isEmbedModeActive ? 'd-none' : ''}`}
id="right-arrow-group"
onMouseDown={rightArrowDown}
onMouseUp={rightArrowUp}
Expand Down Expand Up @@ -163,12 +164,12 @@ class DateChangeArrows extends PureComponent {
}

const mapStateToProps = (state) => {
const { date } = state;
const { ui: { isKioskModeActive } } = state;
const { date, embed, ui } = state;
return {
tilesPreloaded: date.preloaded,
arrowDown: date.arrowDown,
isKioskModeActive,
isKioskModeActive: ui.isKioskModeActive,
isEmbedModeActive: embed.isEmbedModeActive,
};
};

Expand Down
34 changes: 18 additions & 16 deletions web/js/containers/sidebar/layers-container.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,23 +175,25 @@ function LayersContainer (props) {
)}
</div>
</div>
<div className="product-buttons">
<div className="layers-add-container">
<Button
id="layers-add"
aria-label="Add layers"
className="layers-add red"
text="+ Add Layers"
onClick={onClickAddLayers}
/>
<Checkbox
id="group-overlays-checkbox"
checked={groupOverlays}
onCheck={toggleOverlayGroups}
label="Group Similar Layers"
/>
{ !isEmbedModeActive && (
<div className="product-buttons">
<div className="layers-add-container">
<Button
id="layers-add"
aria-label="Add layers"
className="layers-add red"
text="+ Add Layers"
onClick={onClickAddLayers}
/>
<Checkbox
id="group-overlays-checkbox"
checked={groupOverlays}
onCheck={toggleOverlayGroups}
label="Group Similar Layers"
/>
</div>
</div>
</div>
)}
</>
);
}
Expand Down

0 comments on commit 699ff99

Please sign in to comment.