Skip to content

Commit

Permalink
fix(globe): fix problems with touch devices in compare mode (#359)
Browse files Browse the repository at this point in the history
  • Loading branch information
pwambach authored Jun 17, 2020
1 parent 82d3d6b commit d34f18f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/scripts/components/globe/globe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ interface Props {
zoomLevels: number;
flyTo: GlobeView | null;
onMouseEnter: () => void;
onTouchStart: () => void;
onChange: (view: GlobeView) => void;
onMoveEnd: (view: GlobeView) => void;
}
Expand All @@ -65,6 +66,7 @@ const Globe: FunctionComponent<Props> = ({
active,
flyTo,
onMouseEnter,
onTouchStart,
onChange,
onMoveEnd
}) => {
Expand Down Expand Up @@ -233,6 +235,7 @@ const Globe: FunctionComponent<Props> = ({
<div
className={styles.globe}
onMouseEnter={() => onMouseEnter()}
onTouchStart={() => onTouchStart()}
ref={ref}
/>
);
Expand Down
2 changes: 2 additions & 0 deletions src/scripts/components/globes/globes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ const Globes: FunctionComponent = () => {
zoomLevels={mainLayerDetails?.zoomLevels || 0}
flyTo={flyTo}
onMouseEnter={() => setIsMainActive(true)}
onTouchStart={() => setIsMainActive(true)}
onChange={onChangeHandler}
onMoveEnd={onMoveEndHandler}
/>
Expand All @@ -88,6 +89,7 @@ const Globes: FunctionComponent = () => {
zoomLevels={compareLayerDetails?.zoomLevels || 0}
flyTo={flyTo}
onMouseEnter={() => setIsMainActive(false)}
onTouchStart={() => setIsMainActive(false)}
onChange={onChangeHandler}
onMoveEnd={onMoveEndHandler}
/>
Expand Down
2 changes: 1 addition & 1 deletion storage/layers/layers-de.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"id": "fire.burned_area",
"name": "Fire - Burned Area",
"description": "This is an important layer/n* Time Range: monthly 1987 - 2019/n* Temporal Resolution: monthly/n/n[Example Link 1](http://example.com)/n[Example Link 2](http://example.com)"
"description": "Das ist ein wichtiger Layer\n* Time Range: monthly 1987 - 2019\n* Temporal Resolution: monthly\n\n[Example Link 1](http://example.com)\n\n[Example Link 2](http://example.com)"
},
{
"id": "soilmoisture.sm",
Expand Down

0 comments on commit d34f18f

Please sign in to comment.