Loading app/package.json +0 −1 Original line number Diff line number Diff line Loading @@ -84,7 +84,6 @@ "leaflet": "^1.6.0", "leaflet-draw": "1.0.4", "leaflet-fullscreen": "^1.0.2", "leaflet-sidebar-v2": "^3.2.2", "proj4": "^2.6.0", "proj4leaflet": "^1.0.2", "react": "^16.12.0", Loading app/src/components/container/MapContainer.jsx +3 −40 Original line number Diff line number Diff line Loading @@ -28,27 +28,7 @@ export default class MapContainer extends Component { componentDidMount() { let map = new AstroMap("map-container", this.props.target, {}); let controlManager = new AstroControlManager(map); // map.addControl(new ProjectionControl()); // map.addControl( // new MousePositionControl({ // numDigits: 3 // }) // ); // let drawnItems = new L.FeatureGroup(); // map.addLayer(drawnItems); // map.addControl( // new AstroDrawControl({ // edit: { // featureGroup: drawnItems // } // }) // ); // map.addControl(new L.Control.Scale({ imperial: false })); // map.addControl(new AstroSidebarControl()); controlManager.addTo(map); } /** Loading @@ -73,25 +53,8 @@ export default class MapContainer extends Component { // create new map with updated target let map = new AstroMap("map-container", this.props.target, {}); map.addControl(new ProjectionControl()); map.addControl( new MousePositionControl({ numDigits: 3 }) ); let drawnItems = new L.FeatureGroup(); map.addLayer(drawnItems); map.addControl( new AstroDrawControl({ edit: { featureGroup: drawnItems } }) ); map.addControl(new L.Control.Scale({ imperial: false })); let controlManager = new AstroControlManager(map); controlManager.addTo(map); } render() { Loading app/src/components/presentational/ConsoleLonLatSelects.jsx +1 −1 Original line number Diff line number Diff line Loading @@ -153,6 +153,7 @@ export default function ConsoleLonLatSelects() { alignItems="center" className={classes.grid} xs={7} id="lonLatContainer" > <StyledTooltip title={ Loading @@ -171,7 +172,6 @@ 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 −1 Original line number Diff line number Diff line Loading @@ -131,7 +131,7 @@ export default function ConsoleProjectionButtons() { return ( <Grid className={classes.grid} id="projButtons" id="projContainer" container item direction="column" Loading app/src/js/AstroControlManager.js +20 −8 Original line number Diff line number Diff line Loading @@ -5,23 +5,26 @@ import AstroDrawControl from "./AstroDrawControl"; import AstroSidebarControl from "./SidebarControl"; /** * @class LayerCollection * @aka L.Class.LayerCollection * @class AstroControlManager * @aka L.Class.AstroControlManager * @inherits L.Class * * @classdesc * Holds the base layers and overlays of a particular projection * for quick and easy use in the AstroMap class. * Adds all of the needed controls to the AstroMap. */ export default L.AstroControlManager = L.Class.extend({ /** * @function ProjectionControl.prototype.initialize * @description Creates all of the required controls. * @param {AstroMap} map - The AstroMap to add the controls to. We need to pass in the map here * because the drawnItems FeatureGroup needs it when initialized. */ initialize: function(map) { this._projControl = new ProjectionControl(); map.addControl(this._projControl); this._mouseControl = new MousePositionControl({ numDigits: 3 }); map.addControl(this._mouseControl); let drawnItems = new L.FeatureGroup(); map.addLayer(drawnItems); Loading @@ -31,13 +34,22 @@ export default L.AstroControlManager = L.Class.extend({ featureGroup: drawnItems } }); map.addControl(this._drawControl); this._sidebarControl = new AstroSidebarControl(map, [ this._sidebarControl = new AstroSidebarControl([ this._projControl, this._mouseControl ]); }, /** * @function ProjectionControl.prototype.addTo * @description Adds all of the controls to the AstroMap. * @param {AstroMap} map - The AstroMap to add the controls to. */ addTo: function(map) { map.addControl(this._projControl); map.addControl(this._mouseControl); map.addControl(this._drawControl); map.addControl(new L.Control.Scale({ imperial: false })); let that = this; Loading Loading
app/package.json +0 −1 Original line number Diff line number Diff line Loading @@ -84,7 +84,6 @@ "leaflet": "^1.6.0", "leaflet-draw": "1.0.4", "leaflet-fullscreen": "^1.0.2", "leaflet-sidebar-v2": "^3.2.2", "proj4": "^2.6.0", "proj4leaflet": "^1.0.2", "react": "^16.12.0", Loading
app/src/components/container/MapContainer.jsx +3 −40 Original line number Diff line number Diff line Loading @@ -28,27 +28,7 @@ export default class MapContainer extends Component { componentDidMount() { let map = new AstroMap("map-container", this.props.target, {}); let controlManager = new AstroControlManager(map); // map.addControl(new ProjectionControl()); // map.addControl( // new MousePositionControl({ // numDigits: 3 // }) // ); // let drawnItems = new L.FeatureGroup(); // map.addLayer(drawnItems); // map.addControl( // new AstroDrawControl({ // edit: { // featureGroup: drawnItems // } // }) // ); // map.addControl(new L.Control.Scale({ imperial: false })); // map.addControl(new AstroSidebarControl()); controlManager.addTo(map); } /** Loading @@ -73,25 +53,8 @@ export default class MapContainer extends Component { // create new map with updated target let map = new AstroMap("map-container", this.props.target, {}); map.addControl(new ProjectionControl()); map.addControl( new MousePositionControl({ numDigits: 3 }) ); let drawnItems = new L.FeatureGroup(); map.addLayer(drawnItems); map.addControl( new AstroDrawControl({ edit: { featureGroup: drawnItems } }) ); map.addControl(new L.Control.Scale({ imperial: false })); let controlManager = new AstroControlManager(map); controlManager.addTo(map); } render() { Loading
app/src/components/presentational/ConsoleLonLatSelects.jsx +1 −1 Original line number Diff line number Diff line Loading @@ -153,6 +153,7 @@ export default function ConsoleLonLatSelects() { alignItems="center" className={classes.grid} xs={7} id="lonLatContainer" > <StyledTooltip title={ Loading @@ -171,7 +172,6 @@ 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 −1 Original line number Diff line number Diff line Loading @@ -131,7 +131,7 @@ export default function ConsoleProjectionButtons() { return ( <Grid className={classes.grid} id="projButtons" id="projContainer" container item direction="column" Loading
app/src/js/AstroControlManager.js +20 −8 Original line number Diff line number Diff line Loading @@ -5,23 +5,26 @@ import AstroDrawControl from "./AstroDrawControl"; import AstroSidebarControl from "./SidebarControl"; /** * @class LayerCollection * @aka L.Class.LayerCollection * @class AstroControlManager * @aka L.Class.AstroControlManager * @inherits L.Class * * @classdesc * Holds the base layers and overlays of a particular projection * for quick and easy use in the AstroMap class. * Adds all of the needed controls to the AstroMap. */ export default L.AstroControlManager = L.Class.extend({ /** * @function ProjectionControl.prototype.initialize * @description Creates all of the required controls. * @param {AstroMap} map - The AstroMap to add the controls to. We need to pass in the map here * because the drawnItems FeatureGroup needs it when initialized. */ initialize: function(map) { this._projControl = new ProjectionControl(); map.addControl(this._projControl); this._mouseControl = new MousePositionControl({ numDigits: 3 }); map.addControl(this._mouseControl); let drawnItems = new L.FeatureGroup(); map.addLayer(drawnItems); Loading @@ -31,13 +34,22 @@ export default L.AstroControlManager = L.Class.extend({ featureGroup: drawnItems } }); map.addControl(this._drawControl); this._sidebarControl = new AstroSidebarControl(map, [ this._sidebarControl = new AstroSidebarControl([ this._projControl, this._mouseControl ]); }, /** * @function ProjectionControl.prototype.addTo * @description Adds all of the controls to the AstroMap. * @param {AstroMap} map - The AstroMap to add the controls to. */ addTo: function(map) { map.addControl(this._projControl); map.addControl(this._mouseControl); map.addControl(this._drawControl); map.addControl(new L.Control.Scale({ imperial: false })); let that = this; Loading