Loading app/src/components/container/MapContainer.jsx +20 −19 Original line number Diff line number Diff line import React, { Component } from "react"; import AstroMap from "../../js/AstroMap"; import ProjectionControl from "../../js/ProjectionControl"; import MousePositionControl from "../../js/MousePositionControl"; import AstroDrawControl from "../../js/AstroDrawControl"; import AstroControlManager from "../../js/AstroControlManager"; /** * Component that uses back end JS files to invoke and display the Loading @@ -29,25 +27,28 @@ export default class MapContainer extends Component { */ componentDidMount() { let map = new AstroMap("map-container", this.props.target, {}); map.addControl(new ProjectionControl()); map.addControl( new MousePositionControl({ numDigits: 3 }) ); let controlManager = new AstroControlManager(map); let drawnItems = new L.FeatureGroup(); map.addLayer(drawnItems); // map.addControl(new ProjectionControl()); // map.addControl( // new MousePositionControl({ // numDigits: 3 // }) // ); map.addControl( new AstroDrawControl({ edit: { featureGroup: drawnItems } }) ); // let drawnItems = new L.FeatureGroup(); // map.addLayer(drawnItems); map.addControl(new L.Control.Scale({ imperial: false })); // map.addControl( // new AstroDrawControl({ // edit: { // featureGroup: drawnItems // } // }) // ); // map.addControl(new L.Control.Scale({ imperial: false })); // map.addControl(new AstroSidebarControl()); } /** Loading app/src/components/presentational/ConsoleCoordinates.jsx +1 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ export default function ConsoleCoordinates() { alignItems="center" item xs={3} id="coordContainer" > <Grid item xs> <StyledTooltip Loading app/src/components/presentational/ConsoleLonLatSelects.jsx +1 −0 Original line number Diff line number Diff line Loading @@ -171,6 +171,7 @@ export default function ConsoleLonLatSelects() { size="small" value={posEastWest} onChange={handlePosEastWest} id="lonLatContainer" > <StyledToggleButton id="consoleLonEastBtn" value="PositiveEast"> <AutorenewIcon fontSize="small" className={classes.flip} /> Loading app/src/components/presentational/ConsoleProjectionButtons.jsx +1 −0 Original line number Diff line number Diff line Loading @@ -131,6 +131,7 @@ export default function ConsoleProjectionButtons() { return ( <Grid className={classes.grid} id="projButtons" container item direction="column" Loading app/src/js/MousePositionControl.js +28 −7 Original line number Diff line number Diff line Loading @@ -75,6 +75,31 @@ export default L.Control.MousePositionControl = L.Control.extend({ return this.container; }, moveControl: function(container, isFullscreen) { if (isFullscreen) { container.appendChild(this.lonDisplayElement); container.appendChild(this.latDisplayElement); container.appendChild(this.lonDomain180); container.appendChild(this.lonDomain360); container.appendChild(this.lonDirectionEast); container.appendChild(this.lonDirectionWest); container.appendChild(this.latitudeTypeOcentric); container.appendChild(this.latitudeTypeOgraphic); } else { let coordContainer = L.DomUtil.get("coordContainer"); coordContainer.appendChild(this.lonDisplayElement); coordContainer.appendChild(this.latDisplayElement); let lonLatContainer = L.DomUtil.get("lonLatContainer"); lonLatContainer.appendChild(this.lonDomain180); lonLatContainer.appendChild(this.lonDomain360); lonLatContainer.appendChild(this.lonDirectionEast); lonLatContainer.appendChild(this.lonDirectionWest); lonLatContainer.appendChild(this.latitudeTypeOcentric); lonLatContainer.appendChild(this.latitudeTypeOgraphic); } }, /** * @function MousePositionControl.prototype.changeLonDomain * @description Is called when a user changes the longitude domain selector. Changes the longitude domain class variable to false if 0 to 360 is selected and true if -180 to 180 is selected. Loading Loading @@ -130,14 +155,11 @@ export default L.Control.MousePositionControl = L.Control.extend({ if (!this.isLonDom180) { lng = this.astroMath.lonTo360(lng, this.map.options.crs.code); } else { if (this.map.options.crs.code != "EPSG:4326") { } else { if (this.map.options.crs.code != "EPSG:4326") { if (lng < 0) { lng += 180; } else { } else { lng -= 180; } } Loading @@ -147,7 +169,6 @@ export default L.Control.MousePositionControl = L.Control.extend({ lng = this.astroMath.domainToPositiveWest(lng, this.isLonDom180); } lng = lng.toFixed(this.options.numDigits); lat = lat.toFixed(this.options.numDigits); Loading Loading
app/src/components/container/MapContainer.jsx +20 −19 Original line number Diff line number Diff line import React, { Component } from "react"; import AstroMap from "../../js/AstroMap"; import ProjectionControl from "../../js/ProjectionControl"; import MousePositionControl from "../../js/MousePositionControl"; import AstroDrawControl from "../../js/AstroDrawControl"; import AstroControlManager from "../../js/AstroControlManager"; /** * Component that uses back end JS files to invoke and display the Loading @@ -29,25 +27,28 @@ export default class MapContainer extends Component { */ componentDidMount() { let map = new AstroMap("map-container", this.props.target, {}); map.addControl(new ProjectionControl()); map.addControl( new MousePositionControl({ numDigits: 3 }) ); let controlManager = new AstroControlManager(map); let drawnItems = new L.FeatureGroup(); map.addLayer(drawnItems); // map.addControl(new ProjectionControl()); // map.addControl( // new MousePositionControl({ // numDigits: 3 // }) // ); map.addControl( new AstroDrawControl({ edit: { featureGroup: drawnItems } }) ); // let drawnItems = new L.FeatureGroup(); // map.addLayer(drawnItems); map.addControl(new L.Control.Scale({ imperial: false })); // map.addControl( // new AstroDrawControl({ // edit: { // featureGroup: drawnItems // } // }) // ); // map.addControl(new L.Control.Scale({ imperial: false })); // map.addControl(new AstroSidebarControl()); } /** Loading
app/src/components/presentational/ConsoleCoordinates.jsx +1 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ export default function ConsoleCoordinates() { alignItems="center" item xs={3} id="coordContainer" > <Grid item xs> <StyledTooltip Loading
app/src/components/presentational/ConsoleLonLatSelects.jsx +1 −0 Original line number Diff line number Diff line Loading @@ -171,6 +171,7 @@ export default function ConsoleLonLatSelects() { size="small" value={posEastWest} onChange={handlePosEastWest} id="lonLatContainer" > <StyledToggleButton id="consoleLonEastBtn" value="PositiveEast"> <AutorenewIcon fontSize="small" className={classes.flip} /> Loading
app/src/components/presentational/ConsoleProjectionButtons.jsx +1 −0 Original line number Diff line number Diff line Loading @@ -131,6 +131,7 @@ export default function ConsoleProjectionButtons() { return ( <Grid className={classes.grid} id="projButtons" container item direction="column" Loading
app/src/js/MousePositionControl.js +28 −7 Original line number Diff line number Diff line Loading @@ -75,6 +75,31 @@ export default L.Control.MousePositionControl = L.Control.extend({ return this.container; }, moveControl: function(container, isFullscreen) { if (isFullscreen) { container.appendChild(this.lonDisplayElement); container.appendChild(this.latDisplayElement); container.appendChild(this.lonDomain180); container.appendChild(this.lonDomain360); container.appendChild(this.lonDirectionEast); container.appendChild(this.lonDirectionWest); container.appendChild(this.latitudeTypeOcentric); container.appendChild(this.latitudeTypeOgraphic); } else { let coordContainer = L.DomUtil.get("coordContainer"); coordContainer.appendChild(this.lonDisplayElement); coordContainer.appendChild(this.latDisplayElement); let lonLatContainer = L.DomUtil.get("lonLatContainer"); lonLatContainer.appendChild(this.lonDomain180); lonLatContainer.appendChild(this.lonDomain360); lonLatContainer.appendChild(this.lonDirectionEast); lonLatContainer.appendChild(this.lonDirectionWest); lonLatContainer.appendChild(this.latitudeTypeOcentric); lonLatContainer.appendChild(this.latitudeTypeOgraphic); } }, /** * @function MousePositionControl.prototype.changeLonDomain * @description Is called when a user changes the longitude domain selector. Changes the longitude domain class variable to false if 0 to 360 is selected and true if -180 to 180 is selected. Loading Loading @@ -130,14 +155,11 @@ export default L.Control.MousePositionControl = L.Control.extend({ if (!this.isLonDom180) { lng = this.astroMath.lonTo360(lng, this.map.options.crs.code); } else { if (this.map.options.crs.code != "EPSG:4326") { } else { if (this.map.options.crs.code != "EPSG:4326") { if (lng < 0) { lng += 180; } else { } else { lng -= 180; } } Loading @@ -147,7 +169,6 @@ export default L.Control.MousePositionControl = L.Control.extend({ lng = this.astroMath.domainToPositiveWest(lng, this.isLonDom180); } lng = lng.toFixed(this.options.numDigits); lat = lat.toFixed(this.options.numDigits); Loading