Commit 1056e738 authored by Scott Ames's avatar Scott Ames
Browse files

changed fullscreen menu to pull entire console

parent 7a86879b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -42,12 +42,13 @@ export default function ConsoleAppBar(props) {
  const classes = useStyles();

  return (
    <div className={classes.root}>
    <div className={classes.root} id="consoleToolbarParent">
      <AppBar
        className={classes.appbar}
        variant="outlined"
        position="static"
        color="inherit"
        id="consoleToolbar"
      >
        <Toolbar className={classes.toolbar}>
          <Grid
+101 −94
Original line number Diff line number Diff line
@@ -155,10 +155,12 @@ export default function ConsoleLonLatSelects() {
      xs={7}
      id="lonLatContainer"
    >
      <div>
        <StyledTooltip
          title={
            <Typography variant="subtitle1">
            Switch to either positive east or positive west longitude reporting.
              Switch to either positive east or positive west longitude
              reporting.
            </Typography>
          }
          enterDelay={800}
@@ -166,7 +168,7 @@ export default function ConsoleLonLatSelects() {
          arrow
          TransitionComponent={Zoom}
        >
        <div>
          <div id="lonLatEastWest">
            <StyledToggleButtonGroup
              exclusive
              size="small"
@@ -184,7 +186,9 @@ export default function ConsoleLonLatSelects() {
            </StyledToggleButtonGroup>
          </div>
        </StyledTooltip>
      </div>
      <StyledDivider orientation="vertical" />
      <div>
        <StyledTooltip
          title={
            <Typography variant="subtitle1">
@@ -197,7 +201,7 @@ export default function ConsoleLonLatSelects() {
          arrow
          TransitionComponent={Zoom}
        >
        <div>
          <div id="lonLatType">
            <StyledToggleButtonGroup
              exclusive
              size="small"
@@ -221,7 +225,9 @@ export default function ConsoleLonLatSelects() {
            </StyledToggleButtonGroup>
          </div>
        </StyledTooltip>
      </div>
      <StyledDivider orientation="vertical" />
      <div>
        <StyledTooltip
          title={
            <Typography variant="subtitle1">
@@ -234,7 +240,7 @@ export default function ConsoleLonLatSelects() {
          arrow
          TransitionComponent={Zoom}
        >
        <div>
          <div id="lonLatRange">
            <StyledToggleButtonGroup
              exclusive
              size="small"
@@ -252,6 +258,7 @@ export default function ConsoleLonLatSelects() {
            </StyledToggleButtonGroup>
          </div>
        </StyledTooltip>
      </div>
    </Grid>
  );
}
+8 −4
Original line number Diff line number Diff line
@@ -26,6 +26,8 @@ export default L.AstroControlManager = L.Class.extend({
      numDigits: 3
    });

    this._zoomControl = new L.Control.Zoom();

    let drawnItems = new L.FeatureGroup();
    map.addLayer(drawnItems);

@@ -35,10 +37,10 @@ export default L.AstroControlManager = L.Class.extend({
      }
    });

    this._sidebarControl = new AstroSidebarControl([
      this._projControl,
      this._mouseControl
    ]);
    this._sidebarControl = new AstroSidebarControl(
      L.DomUtil.get("consoleToolbar"),
      L.DomUtil.get("consoleToolbarParent")
    );
  },

  /**
@@ -50,12 +52,14 @@ export default L.AstroControlManager = L.Class.extend({
    map.addControl(this._projControl);
    map.addControl(this._mouseControl);
    map.addControl(this._drawControl);
    map.addControl(this._zoomControl);
    map.addControl(new L.Control.Scale({ imperial: false }));

    let that = this;
    map.on("fullscreenchange", function() {
      if (map.isFullscreen()) {
        map.addControl(that._sidebarControl);
        console.log(that._sidebarControl.getContainer());
      } else {
        map.removeControl(that._sidebarControl);
      }
+2 −1
Original line number Diff line number Diff line
@@ -31,7 +31,8 @@ export default L.Map.AstroMap = L.Map.extend({
    zoom: 1,
    maxZoom: 8,
    attributionControl: false,
    fullscreenControl: true
    fullscreenControl: true,
    zoomControl: false
  },

  initialize: function(mapDiv, target, options) {
+0 −18
Original line number Diff line number Diff line
@@ -75,23 +75,6 @@ export default L.Control.MousePositionControl = L.Control.extend({
    return this.container;
  },

  moveControl: function(container, isFullscreen) {
    if (isFullscreen) {
      container.appendChild(this.latDisplayElement.parentNode.parentNode);
      container.appendChild(this.lonDirectionEast.parentNode);
      container.appendChild(this.latitudeTypeOcentric.parentNode);
      container.appendChild(this.lonDomain180.parentNode);
    } else {
      let coordContainer = L.DomUtil.get("coordContainer");
      coordContainer.appendChild(this.lonDisplayElement.parentNode.parentNode);

      let lonLatContainer = L.DomUtil.get("lonLatContainer");
      lonLatContainer.appendChild(this.lonDirectionEast.parentNode);
      lonLatContainer.appendChild(this.latitudeTypeOcentric.parentNode);
      lonLatContainer.appendChild(this.lonDomain180.parentNode);
    }
  },

  /**
   * @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.
@@ -108,7 +91,6 @@ export default L.Control.MousePositionControl = L.Control.extend({
   */
  changeLatType(e) {
    this.isLatTypeOcentric = !this.isLatTypeOcentric;
    console.log(this.latitudeTypeOcentric);
  },

  /**
Loading