Skip to content

Commit

Permalink
Fix to fullscreen button, removed link to old app.
Browse files Browse the repository at this point in the history
The exit fullscreen button on the map wasn't stopping click propagation,
so it was identifying the map feature under the button on exit. Also
removed link to old app now that IE9 has finally been (mostly) killed by
Microsoft.
  • Loading branch information
tobinbradley committed Jan 13, 2016
1 parent 8e2fc13 commit f294320
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
8 changes: 1 addition & 7 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,12 @@
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet">
<link rel="stylesheet" href="css/main.css?foo={{cachebuster}}">

<!--[if IE]>
<script src="//cdnjs.cloudflare.com/ajax/libs/es5-shim/4.1.7/es5-shim.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/classlist/2014.01.31/classList.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/selectivizr/1.0.2/selectivizr-min.js"></script>
<![endif]-->
</head>

<body>
<!--[if IE]>
<div class="oldie">
<p>You are using an outdated browser. <a href="http://whatbrowser.org/">Upgrade your browser today</a> to better experience this site.</p>
<p>You can view the old version of the site <a href="http://mcmap.org/ie9geoportal/">here</>.</p>
You are using an outdated browser. <a href="http://whatbrowser.org/">Upgrade your browser today</a> to better experience this site.
</div>
<![endif]-->
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-drawer mdl-layout--fixed-header">
Expand Down
3 changes: 2 additions & 1 deletion app/js/modules/fullscreen-control.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

let L = require('leaflet/dist/leaflet');

var customFullscreenToggle = L.Control.extend({
Expand All @@ -13,6 +12,8 @@ var customFullscreenToggle = L.Control.extend({

container.innerHTML = 'Exit Full Screen';

L.DomEvent.disableClickPropagation(container);

container.onclick = function() {
map.toggleFullscreen();
};
Expand Down
1 change: 1 addition & 0 deletions app/js/modules/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ global.addMarker = function(latlng, label, pid, address) {

// add point of interest (something like nearby park) marker
global.addtmpMarker = function(lat, lng, label, address) {
//document.querySelector('#map').scrollIntoView({ behavior: 'smooth', block: 'start' });
if (typeof tmpMarker === 'object') {
map.removeLayer(tmpMarker);
}
Expand Down

0 comments on commit f294320

Please sign in to comment.