diff --git a/docker-compose.yml b/docker-compose.yml index 68f55cdfb..09a13d3ab 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -49,8 +49,7 @@ services: depends_on: - db volumes: - - bundler:/usr/local/bundle - - ./rails:/api + - ./rails:/opt/terrastories:cached selenium: # Debug version enables VNC ability diff --git a/rails/Dockerfile b/rails/Dockerfile index dd05e3327..b29f6e727 100644 --- a/rails/Dockerfile +++ b/rails/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:2.5.31-slim +FROM ruby:2.5.1-slim ARG precompileassets RUN apt-get update && apt-get install -y curl gnupg diff --git a/rails/app/javascript/components/Map.jsx b/rails/app/javascript/components/Map.jsx index 5c44e0d53..e97e26e8e 100644 --- a/rails/app/javascript/components/Map.jsx +++ b/rails/app/javascript/components/Map.jsx @@ -30,13 +30,13 @@ export default class Map extends Component { componentDidMount() { this.map = new mapboxgl.Map({ - container: this.mapContainer, - style: this.props.mapboxStyle, - center: [this.props.centerLong, this.props.centerLat], - zoom: this.props.zoom, - maxBounds: this.checkBounds(), // check for bounding box presence - pitch: this.props.pitch, - bearing: this.props.bearing + container: this.mapContainer, + style: this.props.mapboxStyle, + center: [this.props.centerLong, this.props.centerLat], + zoom: this.props.zoom, + maxBounds: this.checkBounds(), // check for bounding box presence + pitch: this.props.pitch, + bearing: this.props.bearing }); this.map.on("load", () => { @@ -56,7 +56,6 @@ export default class Map extends Component { } }); - // Add 3d terrain DEM layer if activated if(!this.props.useLocalMapServer && this.props.mapbox3d) { this.map.addSource('mapbox-dem', { @@ -65,10 +64,10 @@ export default class Map extends Component { 'tileSize': 512, 'maxzoom': 14 }); - + // add the DEM source as a terrain layer with exaggerated height this.map.setTerrain({ 'source': 'mapbox-dem', 'exaggeration': 1.5 }); - + // add a sky layer that will show when the map is highly pitched this.map.addLayer({ 'id': 'sky', @@ -87,18 +86,19 @@ export default class Map extends Component { this.addMarkerClickHandler(); }); - // Hide minimap for offline Terrastories + // Hide minimap and nav controls for offline Terrastories if(!this.props.useLocalMapServer) { this.map.addControl(new mapboxgl.Minimap(), "top-right"); } this.map.addControl(new mapboxgl.NavigationControl()); - // Change mouse pointer when hovering over ts-marker points - this.map.on('mouseenter', STORY_POINTS_LAYER_ID, () => { - this.map.getCanvas().style.cursor = 'pointer' - }) - this.map.on('mouseleave', STORY_POINTS_LAYER_ID, () => { - this.map.getCanvas().style.cursor = '' + + // Change mouse pointer when hovering over ts-marker points + this.map.on('mouseenter', STORY_POINTS_LAYER_ID, () => { + this.map.getCanvas().style.cursor = 'pointer' + }) + this.map.on('mouseleave', STORY_POINTS_LAYER_ID, () => { + this.map.getCanvas().style.cursor = '' }) } @@ -185,11 +185,11 @@ export default class Map extends Component { resetMapToCenter() { this.map.flyTo({ - center: [this.props.centerLong, this.props.centerLat], - zoom: this.props.zoom, - pitch: this.props.pitch, - bearing: this.props.bearing, - maxBounds: this.checkBounds(), // check for bounding box presence + center: [this.props.centerLong, this.props.centerLat], + zoom: this.props.zoom, + pitch: this.props.pitch, + bearing: this.props.bearing, + maxBounds: this.checkBounds(), // check for bounding box presence }); } @@ -225,11 +225,11 @@ export default class Map extends Component { return