Permalink
Browse files

Push to 6.3.0 with wax.leaf.hash from @thegreat

  • Loading branch information...
1 parent 285abac commit ea9d63d6b05f3c714bce0f683d637752f38ceb91 @tmcw tmcw committed Jun 26, 2012
Showing with 50 additions and 14 deletions.
  1. +4 −0 CHANGELOG.md
  2. +1 −1 dist/wax.esri.js
  3. +1 −1 dist/wax.esri.min.js
  4. +1 −1 dist/wax.g.js
  5. +1 −1 dist/wax.g.min.js
  6. +33 −1 dist/wax.leaf.js
  7. +2 −2 dist/wax.leaf.min.js
  8. +1 −1 dist/wax.mm.js
  9. +1 −1 dist/wax.mm.min.js
  10. +1 −1 dist/wax.ol.js
  11. +1 −1 dist/wax.ol.min.js
  12. +1 −1 dist/wax.p.js
  13. +1 −1 dist/wax.p.min.js
  14. +1 −1 package.json
View
@@ -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
View
@@ -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) {
View
@@ -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) {
View
View
@@ -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) {
@@ -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;
View
@@ -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) {
View
View
@@ -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) {
View
View
@@ -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) {
View
View
@@ -1,6 +1,6 @@
{
"name": "wax",
- "version": "6.2.3",
+ "version": "6.3.0",
"description": "Tools for improving web maps.",
"repository": {
"type": "git",

0 comments on commit ea9d63d

Please sign in to comment.