Skip to content

Commit

Permalink
set url from export button instead of on moveEnd
Browse files Browse the repository at this point in the history
  • Loading branch information
Gjum committed May 30, 2017
1 parent f9bfa12 commit 5712547
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion js/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import IconArrFwd from 'material-ui/svg-icons/navigation/arrow-forward';
import IconClaim from 'material-ui/svg-icons/social/public';
import IconClose from 'material-ui/svg-icons/navigation/close';
import IconHelp from 'material-ui/svg-icons/action/help';
import IconLink from 'material-ui/svg-icons/content/link';
import IconMenu from 'material-ui/svg-icons/navigation/menu';
import IconPlace from 'material-ui/svg-icons/maps/place';
import ImageTune from 'material-ui/svg-icons/image/tune';
Expand Down Expand Up @@ -172,6 +173,12 @@ export class Main extends Component {
/>
</div>

<MenuItem
primaryText='Link to current view'
leftIcon={<IconLink />}
onTouchTap={() => history.replaceState({}, document.title, viewToHash(this.map, this.state, this.viewDefaults))}
/>

<Subheader>About</Subheader>
<MenuItem
primaryText='Help'
Expand All @@ -193,7 +200,6 @@ export class Main extends Component {
zoom={minZoom}
maxZoom={5}
minZoom={minZoom}
onmoveend={e => history.replaceState({}, document.title, viewToHash(e.target, this.state, this.viewDefaults))}
onmousemove={e => this.coordsDisplay && this.coordsDisplay.setCursor(e.latlng)}
>

Expand Down

0 comments on commit 5712547

Please sign in to comment.