Skip to content

Commit

Permalink
Merge branch 'master' into release/55km-data
Browse files Browse the repository at this point in the history
  • Loading branch information
weberjavi committed May 29, 2020
2 parents b6b7eb7 + 434ca7d commit a98257c
Show file tree
Hide file tree
Showing 13 changed files with 48 additions and 18 deletions.
9 changes: 9 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Substitute this line for a meaningful title for your changes
### Description
_Describe what the code changes introduced by this PR do._
### Designs
_Link to the related design prototypes (if relevant)_
### Testing instructions
_Explain how the reviewer should test this PR (which URL should be joined, which steps should be performed...)_
### Feature relevant tickets
_Link to the related task manager tickets_
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"directory-named-webpack-plugin": "^4.0.1",
"esri-loader": "^2.10.0",
"he-components": "github:vizzuality/half-earth-components#0.2.1",
"lodash-es": "4.17.4",
"lodash-es": "4.17.14",
"node-sass": "^4.11.0",
"post-robot": "8.0.28",
"prop-types": "^15.7.2",
Expand Down
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/>
<meta name="theme-color" content="#000000" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="stylesheet" href="https://js.arcgis.com/4.12/esri/css/main.css">
<link rel="stylesheet" href="https://js.arcgis.com/4.15/esri/css/main.css">
<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=EB+Garamond:400,700&display=swap" rel="stylesheet">
<script>
Expand Down
8 changes: 7 additions & 1 deletion src/components/biodiversity-layers/biodiversity-layers.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ const BiodiversityLayerContainer = props => {
const target = new Extent({
xmin, xmax, ymin, ymax
})
view.goTo({target});
view.goTo({target})
.catch(function(error) {
// Avoid displaying console errors when transition is aborted by user interacions
if (error.name !== "AbortError") {
console.error(error);
}
});
})
}

Expand Down
4 changes: 2 additions & 2 deletions src/components/globe-events-manager/globe-events-manager.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

const GlobeEventsManager = ({view, clickCallbacksArray, mouseMoveCallbacksArray }) => {
const GlobeEventsManager = ({view, clickCallbacksArray, selectedFeaturedMap, mouseMoveCallbacksArray }) => {

view.on("pointer-down", function(event) {
event.stopPropagation();
view.hitTest(event).then(function(response) {
clickCallbacksArray.forEach(cb => cb(response, view))
clickCallbacksArray.forEach(cb => cb(response, view, selectedFeaturedMap))
});
});

Expand Down
2 changes: 0 additions & 2 deletions src/components/grid-layer/grid-layer-component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {

const GridLayer = ({ view, setGridCellData, setGridCellGeometry }) => {

let queryHandle;
let watchHandle;
let watchUpdateHandle;

Expand All @@ -31,7 +30,6 @@ const GridLayer = ({ view, setGridCellData, setGridCellGeometry }) => {
const cleanUpHandles = () => {
watchUpdateHandle && watchUpdateHandle.remove();
watchHandle && watchHandle.remove();
queryHandle && queryHandle.cancel();
}

//Create the graphics layer on mount
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ const GeoDescriptionWidget = props => {
scale: zoomToScale[7]
}
view.goTo(target)
.catch(function(error) {
// Avoid displaying console errors when transition is aborted by user interacions
if (error.name !== "AbortError") {
console.error(error);
}
});
};

const toggleCollapsedLandscapeSidebar = () => {
Expand Down
3 changes: 2 additions & 1 deletion src/hooks/esri.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ export const useSearchWidgetLogic = (view, openPlacesSearchAnalyticsEvent, searc

const addSearchWidgetToView = async () => {
await view.ui.add(searchWidget, "top-left");
document.querySelector(".esri-search__input").focus();
const searchInput = document.querySelector(".esri-search__input");
searchInput && searchInput.focus()
}

useEffect(() => {
Expand Down
8 changes: 7 additions & 1 deletion src/hooks/featured-place-view-manager-hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ export function useFeaturedPlaceViewCameraChange(map, view, selectedFeaturedPlac
speedFactor: 0.5,
duration: 1000
}
view.goTo(featuredPlace, options);
view.goTo(featuredPlace, options)
.catch(function(error) {
// Avoid displaying console errors when transition is aborted by user interacions
if (error.name !== "AbortError") {
console.error(error);
}
});
}
}, [coords])
}
6 changes: 6 additions & 0 deletions src/hooks/landscape-view-hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,11 @@ import {
duration: 1000
}
view.goTo(target, options)
.catch(function(error) {
// Avoid displaying console errors when transition is aborted by user interacions
if (error.name !== "AbortError") {
console.error(error);
}
});
}, [isLandscapeMode])
}
2 changes: 0 additions & 2 deletions src/pages/data-globe/data-globe-component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import MenuSettings from 'components/mobile-only/menu-settings';
import Slider from 'components/slider';
import { MobileOnly, isMobile } from 'constants/responsive';
import About from 'components/about';
import UserDataModal from 'components/user-data-modal';

const InfoModal = loadable(() => import('components/modal-metadata'));
const GridLayer = loadable(() => import('components/grid-layer'));
Expand Down Expand Up @@ -98,7 +97,6 @@ const DataGlobeComponent = ({
<TutorialModal />
{hasMetadata && <InfoModal />}
{!isOnMobile && <About />}
<UserDataModal />
</>
)
}
Expand Down
2 changes: 0 additions & 2 deletions src/pages/featured-globe/featured-globe-component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import FeaturedMapsList from 'components/featured-maps-list';
import TutorialModal from 'components/tutorial/tutorial-modal';
import MenuFooter from 'components/mobile-only/menu-footer';
import MenuSettings from 'components/mobile-only/menu-settings';
import UserDataModal from 'components/user-data-modal';

import uiStyles from 'styles/ui.module.scss';

Expand Down Expand Up @@ -166,7 +165,6 @@ const DataGlobeComponent = ({
/>
{hasMetadata && <InfoModal />}
{!selectedFeaturedPlace && !isOnMobile && <About />}
<UserDataModal />
</>
)
}
Expand Down
12 changes: 7 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1391,8 +1391,9 @@ acorn-walk@^6.0.1:
resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.2.0.tgz#123cb8f3b84c2171f1f7fb252615b1c78a6b1a8c"

acorn@^5.0.0, acorn@^5.5.3, acorn@^5.6.2:
version "5.7.3"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279"
version "5.7.4"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.4.tgz#3e8d8a9947d0599a1796d10225d7432f4a4acf5e"
integrity sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==

acorn@^6.0.1, acorn@^6.0.7:
version "6.4.0"
Expand Down Expand Up @@ -6275,9 +6276,10 @@ locate-path@^3.0.0:
p-locate "^3.0.0"
path-exists "^3.0.0"

[email protected]:
version "4.17.4"
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.4.tgz#dcc1d7552e150a0640073ba9cb31d70f032950e7"
[email protected]:
version "4.17.14"
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.14.tgz#12a95a963cc5955683cee3b74e85458954f37ecc"
integrity sha512-7zchRrGa8UZXjD/4ivUWP1867jDkhzTG2c/uj739utSd7O/pFFdxspCemIFKEEjErbcqRzn8nKnGsi7mvTgRPA==

lodash._reinterpolate@^3.0.0:
version "3.0.0"
Expand Down

0 comments on commit a98257c

Please sign in to comment.