Skip to content
This repository has been archived by the owner on Mar 3, 2022. It is now read-only.

Commit

Permalink
Updated print button to show when zoom level above 9 and disappear wh…
Browse files Browse the repository at this point in the history
…en zoomed out.
  • Loading branch information
ryanbharvey committed Aug 21, 2015
1 parent 8478a87 commit 0dab4a2
Show file tree
Hide file tree
Showing 40 changed files with 103 additions and 91 deletions.
14 changes: 13 additions & 1 deletion assets/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1340,7 +1340,19 @@ function setupMapControls(p) {
$(this._div).html(pb);
return this._div;
};
map.printButton.addTo(map);
map.printButton.zoomTrigger = 9;
map.printButton.onMap = false;
map.printButton.zoomHandler = function(e) {
if (map.getZoom() >= map.printButton.zoomTrigger && !map.printButton.onMap) {
map.printButton.addTo(map);
map.printButton.onMap = true;
} else if (map.getZoom() < map.printButton.zoomTrigger && map.printButton.onMap) {
map.printButton.removeFrom(map);
map.printButton.onMap = false;
}
};
map.on('zoomend', map.printButton.zoomHandler);
map.printButton.zoomHandler({});
}

// Add disclaimer control
Expand Down
10 changes: 0 additions & 10 deletions dist/gh/assets/main.20150821_015446.min.js

This file was deleted.

10 changes: 10 additions & 0 deletions dist/gh/assets/main.20150821_152753.min.js

Large diffs are not rendered by default.

10 changes: 0 additions & 10 deletions dist/gh/assets/main.ie8.20150821_015446.min.js

This file was deleted.

10 changes: 10 additions & 0 deletions dist/gh/assets/main.ie8.20150821_152753.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/gh/datasets.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<link rel="icon" type="image/x-icon" href="favicon.ico" />

<!-- Stylesheets -->
<link rel="stylesheet" href="assets/datasets_credits.20150821_015446.min.css"/>
<link rel="stylesheet" href="assets/datasets_credits.20150821_152753.min.css"/>
<style id="colorboxes"></style>
</head>

Expand All @@ -27,6 +27,6 @@ <h1>Map of Administration Community-based Initiatives<br/>Data Credits and Downl
</div>

<!-- Scripts -->
<script src="assets/datasets_credits.20150821_015446.min.js" charset="utf-8"></script>
<script src="assets/datasets_credits.20150821_152753.min.js" charset="utf-8"></script>

</body></html>
8 changes: 4 additions & 4 deletions dist/gh/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

<!-- Stylesheets -->
<!--[if (!IE)|(gte IE 9)]>-->
<link rel="stylesheet" href="assets/main.20150821_015446.min.css"/>
<link rel="stylesheet" href="assets/main.20150821_152753.min.css"/>
<!--<![endif]-->
<!--[if lt IE 9]>
<link rel="stylesheet" href="assets/main.ie8.20150821_015446.min.css"/>
<link rel="stylesheet" href="assets/main.ie8.20150821_152753.min.css"/>
<![endif]-->

<style id="colorboxes"></style>
Expand All @@ -34,11 +34,11 @@

<!-- Scripts -->
<!--[if lt IE 9]>
<script src="assets/main.ie8.20150821_015446.min.js" charset="utf-8"></script>
<script src="assets/main.ie8.20150821_152753.min.js" charset="utf-8"></script>
<![endif]-->

<!--[if (!IE)|(gte IE 9)]>-->
<script src="assets/main.20150821_015446.min.js" charset="utf-8"></script>
<script src="assets/main.20150821_152753.min.js" charset="utf-8"></script>
<!--<![endif]-->

<noscript>
Expand Down
8 changes: 4 additions & 4 deletions dist/gh/print.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

<!-- Stylesheets -->
<!--[if (!IE)|(gte IE 9)]>-->
<link rel="stylesheet" href="assets/print.20150821_015446.min.css"/>
<link rel="stylesheet" href="assets/print.20150821_152753.min.css"/>
<!--<![endif]-->
<!--[if lt IE 9]>
<link rel="stylesheet" href="assets/print.ie8.20150821_015446.min.css"/>
<link rel="stylesheet" href="assets/print.ie8.20150821_152753.min.css"/>
<![endif]-->
<style id="colorboxes"></style>
<style id="layercontrol"></style>
Expand Down Expand Up @@ -42,11 +42,11 @@ <h1>Map of Administration Community-based Initiatives: Location Report</h1>

<!-- Scripts -->
<!--[if lt IE 9]>
<script src="assets/main.ie8.20150821_015446.min.js" charset="utf-8"></script>
<script src="assets/main.ie8.20150821_152753.min.js" charset="utf-8"></script>
<![endif]-->

<!--[if (!IE)|(gte IE 9)]>-->
<script src="assets/main.20150821_015446.min.js" charset="utf-8"></script>
<script src="assets/main.20150821_152753.min.js" charset="utf-8"></script>
<!--<![endif]-->

<noscript>
Expand Down
10 changes: 0 additions & 10 deletions dist/max/assets/main.20150821_015446.min.js

This file was deleted.

10 changes: 10 additions & 0 deletions dist/max/assets/main.20150821_152753.min.js

Large diffs are not rendered by default.

10 changes: 0 additions & 10 deletions dist/max/assets/main.ie8.20150821_015446.min.js

This file was deleted.

10 changes: 10 additions & 0 deletions dist/max/assets/main.ie8.20150821_152753.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/max/datasets.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<link rel="icon" type="image/x-icon" href="favicon.ico" />

<!-- Stylesheets -->
<link rel="stylesheet" href="assets/datasets_credits.20150821_015446.min.css"/>
<link rel="stylesheet" href="assets/datasets_credits.20150821_152753.min.css"/>
<style id="colorboxes"></style>
</head>

Expand All @@ -27,6 +27,6 @@ <h1>Map of Administration Community-based Initiatives<br/>Data Credits and Downl
</div>

<!-- Scripts -->
<script src="assets/datasets_credits.20150821_015446.min.js" charset="utf-8"></script>
<script src="assets/datasets_credits.20150821_152753.min.js" charset="utf-8"></script>

</body></html>
8 changes: 4 additions & 4 deletions dist/max/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

<!-- Stylesheets -->
<!--[if (!IE)|(gte IE 9)]>-->
<link rel="stylesheet" href="assets/main.20150821_015446.min.css"/>
<link rel="stylesheet" href="assets/main.20150821_152753.min.css"/>
<!--<![endif]-->
<!--[if lt IE 9]>
<link rel="stylesheet" href="assets/main.ie8.20150821_015446.min.css"/>
<link rel="stylesheet" href="assets/main.ie8.20150821_152753.min.css"/>
<![endif]-->

<style id="colorboxes"></style>
Expand All @@ -34,11 +34,11 @@

<!-- Scripts -->
<!--[if lt IE 9]>
<script src="assets/main.ie8.20150821_015446.min.js" charset="utf-8"></script>
<script src="assets/main.ie8.20150821_152753.min.js" charset="utf-8"></script>
<![endif]-->

<!--[if (!IE)|(gte IE 9)]>-->
<script src="assets/main.20150821_015446.min.js" charset="utf-8"></script>
<script src="assets/main.20150821_152753.min.js" charset="utf-8"></script>
<!--<![endif]-->

<noscript>
Expand Down
8 changes: 4 additions & 4 deletions dist/max/print.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

<!-- Stylesheets -->
<!--[if (!IE)|(gte IE 9)]>-->
<link rel="stylesheet" href="assets/print.20150821_015446.min.css"/>
<link rel="stylesheet" href="assets/print.20150821_152753.min.css"/>
<!--<![endif]-->
<!--[if lt IE 9]>
<link rel="stylesheet" href="assets/print.ie8.20150821_015446.min.css"/>
<link rel="stylesheet" href="assets/print.ie8.20150821_152753.min.css"/>
<![endif]-->
<style id="colorboxes"></style>
<style id="layercontrol"></style>
Expand Down Expand Up @@ -42,11 +42,11 @@ <h1>Map of Administration Community-based Initiatives: Location Report</h1>

<!-- Scripts -->
<!--[if lt IE 9]>
<script src="assets/main.ie8.20150821_015446.min.js" charset="utf-8"></script>
<script src="assets/main.ie8.20150821_152753.min.js" charset="utf-8"></script>
<![endif]-->

<!--[if (!IE)|(gte IE 9)]>-->
<script src="assets/main.20150821_015446.min.js" charset="utf-8"></script>
<script src="assets/main.20150821_152753.min.js" charset="utf-8"></script>
<!--<![endif]-->

<noscript>
Expand Down
4 changes: 2 additions & 2 deletions dist/wh/omb/place/datasets.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<link rel="icon" type="image/x-icon" href="/profiles/forall/themes/custom/fortyfour/favicon.ico" />

<!-- Stylesheets -->
<link rel="stylesheet" href="/sites/default/files/omb_place/assets/datasets_credits.20150821_015446.min.css"/>
<link rel="stylesheet" href="/sites/default/files/omb_place/assets/datasets_credits.20150821_152753.min.css"/>
<style id="colorboxes"></style>
</head>

Expand All @@ -27,6 +27,6 @@ <h1>Map of Administration Community-based Initiatives<br/>Data Credits and Downl
</div>

<!-- Scripts -->
<script src="/sites/default/files/omb_place/assets/datasets_credits.20150821_015446.min.js" charset="utf-8"></script>
<script src="/sites/default/files/omb_place/assets/datasets_credits.20150821_152753.min.js" charset="utf-8"></script>

</body></html>
8 changes: 4 additions & 4 deletions dist/wh/omb/place/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

<!-- Stylesheets -->
<!--[if (!IE)|(gte IE 9)]>-->
<link rel="stylesheet" href="/sites/default/files/omb_place/assets/main.20150821_015446.min.css"/>
<link rel="stylesheet" href="/sites/default/files/omb_place/assets/main.20150821_152753.min.css"/>
<!--<![endif]-->
<!--[if lt IE 9]>
<link rel="stylesheet" href="/sites/default/files/omb_place/assets/main.ie8.20150821_015446.min.css"/>
<link rel="stylesheet" href="/sites/default/files/omb_place/assets/main.ie8.20150821_152753.min.css"/>
<![endif]-->

<style id="colorboxes"></style>
Expand All @@ -34,11 +34,11 @@

<!-- Scripts -->
<!--[if lt IE 9]>
<script src="/sites/default/files/omb_place/assets/main.ie8.20150821_015446.min.js" charset="utf-8"></script>
<script src="/sites/default/files/omb_place/assets/main.ie8.20150821_152753.min.js" charset="utf-8"></script>
<![endif]-->

<!--[if (!IE)|(gte IE 9)]>-->
<script src="/sites/default/files/omb_place/assets/main.20150821_015446.min.js" charset="utf-8"></script>
<script src="/sites/default/files/omb_place/assets/main.20150821_152753.min.js" charset="utf-8"></script>
<!--<![endif]-->

<noscript>
Expand Down
8 changes: 4 additions & 4 deletions dist/wh/omb/place/print.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

<!-- Stylesheets -->
<!--[if (!IE)|(gte IE 9)]>-->
<link rel="stylesheet" href="/sites/default/files/omb_place/assets/print.20150821_015446.min.css"/>
<link rel="stylesheet" href="/sites/default/files/omb_place/assets/print.20150821_152753.min.css"/>
<!--<![endif]-->
<!--[if lt IE 9]>
<link rel="stylesheet" href="/sites/default/files/omb_place/assets/print.ie8.20150821_015446.min.css"/>
<link rel="stylesheet" href="/sites/default/files/omb_place/assets/print.ie8.20150821_152753.min.css"/>
<![endif]-->
<style id="colorboxes"></style>
<style id="layercontrol"></style>
Expand Down Expand Up @@ -42,11 +42,11 @@ <h1>Map of Administration Community-based Initiatives: Location Report</h1>

<!-- Scripts -->
<!--[if lt IE 9]>
<script src="/sites/default/files/omb_place/assets/main.ie8.20150821_015446.min.js" charset="utf-8"></script>
<script src="/sites/default/files/omb_place/assets/main.ie8.20150821_152753.min.js" charset="utf-8"></script>
<![endif]-->

<!--[if (!IE)|(gte IE 9)]>-->
<script src="/sites/default/files/omb_place/assets/main.20150821_015446.min.js" charset="utf-8"></script>
<script src="/sites/default/files/omb_place/assets/main.20150821_152753.min.js" charset="utf-8"></script>
<!--<![endif]-->

<noscript>
Expand Down

This file was deleted.

Large diffs are not rendered by default.

This file was deleted.

Large diffs are not rendered by default.

0 comments on commit 0dab4a2

Please sign in to comment.