Skip to content

Commit

Permalink
Push to 6.3.0 with wax.leaf.hash from @thegreat
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcw committed Jun 26, 2012
1 parent 285abac commit ea9d63d
Show file tree
Hide file tree
Showing 14 changed files with 50 additions and 14 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,9 @@
## Changelog

## 6.3.0

* Adds Hash control for Leaflet by @thegreat

## 6.2.3

* Fix bug in Hash control that doubled URLs when the page
Expand Down
2 changes: 1 addition & 1 deletion dist/wax.esri.js
@@ -1,4 +1,4 @@
/* wax - 6.2.3 - 1.0.4-590-gcd05aa2 */
/* wax - 6.3.0 - 1.0.4-593-g285abac */


!function (name, context, definition) {
Expand Down
2 changes: 1 addition & 1 deletion dist/wax.esri.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/wax.g.js
@@ -1,4 +1,4 @@
/* wax - 6.2.3 - 1.0.4-590-gcd05aa2 */
/* wax - 6.3.0 - 1.0.4-593-g285abac */


!function (name, context, definition) {
Expand Down
2 changes: 1 addition & 1 deletion dist/wax.g.min.js

Large diffs are not rendered by default.

34 changes: 33 additions & 1 deletion dist/wax.leaf.js
@@ -1,4 +1,4 @@
/* wax - 6.2.3 - 1.0.4-590-gcd05aa2 */
/* wax - 6.3.0 - 1.0.4-593-g285abac */


!function (name, context, definition) {
Expand Down Expand Up @@ -3200,6 +3200,38 @@ wax.u = {
wax = wax || {};
wax.leaf = wax.leaf || {};

wax.leaf.hash = function(map) {
return wax.hash({
getCenterZoom: function () {
var center = map.getCenter(),
zoom = map.getZoom(),
precision = Math.max(
0,
Math.ceil(Math.log(zoom) / Math.LN2));

return [
zoom,
center.lat.toFixed(precision),
center.lng.toFixed(precision)
].join('/');
},

setCenterZoom: function (args) {
map.setView(new L.LatLng(args[1], args[2]), args[0]);
},

bindChange: function (fn) {
map.on('moveend', fn);
},

unbindChange: function (fn) {
map.off('moveend', fn);
}
});
};
wax = wax || {};
wax.leaf = wax.leaf || {};

wax.leaf.interaction = function() {
var dirty = false, _grid, map;

Expand Down
4 changes: 2 additions & 2 deletions dist/wax.leaf.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/wax.mm.js
@@ -1,4 +1,4 @@
/* wax - 6.2.3 - 1.0.4-590-gcd05aa2 */
/* wax - 6.3.0 - 1.0.4-593-g285abac */


!function (name, context, definition) {
Expand Down
2 changes: 1 addition & 1 deletion dist/wax.mm.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/wax.ol.js
@@ -1,4 +1,4 @@
/* wax - 6.2.3 - 1.0.4-590-gcd05aa2 */
/* wax - 6.3.0 - 1.0.4-593-g285abac */


!function (name, context, definition) {
Expand Down
2 changes: 1 addition & 1 deletion dist/wax.ol.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/wax.p.js
@@ -1,4 +1,4 @@
/* wax - 6.2.3 - 1.0.4-590-gcd05aa2 */
/* wax - 6.3.0 - 1.0.4-593-g285abac */


!function (name, context, definition) {
Expand Down
2 changes: 1 addition & 1 deletion dist/wax.p.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "wax",
"version": "6.2.3",
"version": "6.3.0",
"description": "Tools for improving web maps.",
"repository": {
"type": "git",
Expand Down

0 comments on commit ea9d63d

Please sign in to comment.