Permalink
Browse files

Push to dev6 with style updates

  • Loading branch information...
1 parent 0f0556f commit 8c100dbb6b2a6297e286a62835a2b47e33ff8de0 @tmcw tmcw committed Jul 23, 2012
Showing with 68 additions and 39 deletions.
  1. +1 −1 CHANGELOG.md
  2. +1 −1 build/header.js
  3. +1 −1 dist/wax.esri.js
  4. +1 −1 dist/wax.esri.min.js
  5. +1 −1 dist/wax.g.js
  6. +1 −1 dist/wax.g.min.js
  7. +1 −1 dist/wax.leaf.js
  8. +1 −1 dist/wax.leaf.min.js
  9. +53 −24 dist/wax.mm.js
  10. +2 −2 dist/wax.mm.min.js
  11. +1 −1 dist/wax.ol.js
  12. +1 −1 dist/wax.ol.min.js
  13. +1 −1 dist/wax.p.js
  14. +1 −1 dist/wax.p.min.js
  15. +1 −1 package.json
View
@@ -13,7 +13,7 @@
* `wax.mm.boxselector` and `wax.mm.pointselector` no longer call `.add()` automatically
* `wax.mm.zoomer` no longer calls `.add` automatically
* `wax.mm.zoomer` supports easing
-
+* Style updates
## 6.4.2
View
@@ -1,3 +1,3 @@
-/* wax - 7.0.0dev4 - v6.0.4-62-ga2b3f2b */
+/* wax - 7.0.0dev6 - v6.0.4-82-g0f0556f */
View
@@ -1,4 +1,4 @@
-/* wax - 7.0.0dev4 - v6.0.4-77-ga67c084 */
+/* wax - 7.0.0dev6 - v6.0.4-82-g0f0556f */
!function (name, context, definition) {
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -1,4 +1,4 @@
-/* wax - 7.0.0dev4 - v6.0.4-77-ga67c084 */
+/* wax - 7.0.0dev6 - v6.0.4-82-g0f0556f */
!function (name, context, definition) {
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -1,4 +1,4 @@
-/* wax - 7.0.0dev4 - v6.0.4-77-ga67c084 */
+/* wax - 7.0.0dev6 - v6.0.4-82-g0f0556f */
!function (name, context, definition) {
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -1,4 +1,4 @@
-/* wax - 7.0.0dev4 - v6.0.4-77-ga67c084 */
+/* wax - 7.0.0dev6 - v6.0.4-82-g0f0556f */
!function (name, context, definition) {
@@ -3464,11 +3464,15 @@ wax.mm.fullscreen = function() {
// false: minimized
var fullscreened = false,
fullscreen = {},
- a,
+ a = document.createElement('a'),
map,
body = document.body,
smallSize;
+ a.className = 'map-fullscreen';
+ a.href = '#fullscreen';
+ // a.innerHTML = 'fullscreen';
+
function click(e) {
if (e) e.stop();
if (fullscreened) {
@@ -3478,7 +3482,7 @@ wax.mm.fullscreen = function() {
}
}
- function ss(w, h) {
+ function setSize(w, h) {
map.dimensions = new MM.Point(w, h);
map.parent.style.width = Math.round(map.dimensions.x) + 'px';
map.parent.style.height = Math.round(map.dimensions.y) + 'px';
@@ -3495,11 +3499,14 @@ wax.mm.fullscreen = function() {
// for changes, so here we save the original size of the element and
// restore to that size on exit from fullscreen.
fullscreen.add = function() {
- a = document.createElement('a');
- a.className = 'map-fullscreen';
- a.href = '#fullscreen';
- a.innerHTML = 'fullscreen';
bean.add(a, 'click', click);
+ map.parent.appendChild(a);
+ return fullscreen;
+ };
+
+ fullscreen.remove = function() {
+ bean.remove(a, 'click', click);
+ if (a.parentNode) a.parentNode.removeChild(a);
return fullscreen;
};
@@ -3508,15 +3515,15 @@ wax.mm.fullscreen = function() {
smallSize = [map.parent.offsetWidth, map.parent.offsetHeight];
map.parent.className += ' map-fullscreen-map';
body.className += ' map-fullscreen-view';
- ss(map.parent.offsetWidth, map.parent.offsetHeight);
+ setSize(map.parent.offsetWidth, map.parent.offsetHeight);
return fullscreen;
};
fullscreen.original = function() {
if (!fullscreened) { return; } else { fullscreened = false; }
map.parent.className = map.parent.className.replace(' map-fullscreen-map', '');
body.className = body.className.replace(' map-fullscreen-view', '');
- ss(smallSize[0], smallSize[1]);
+ setSize(smallSize[0], smallSize[1]);
return fullscreen;
};
@@ -3964,32 +3971,40 @@ wax.mm = wax.mm || {};
wax.mm.zoomer = function() {
var zoomer = {},
+ smooth = true,
map;
var zoomin = document.createElement('a'),
zoomout = document.createElement('a');
- zoomin.innerHTML = '+';
- zoomin.href = '#';
- zoomin.className = 'zoomer zoomin';
- bean.add(zoomin, 'mousedown dblclick', function(e) {
+ function stopEvents(e) {
e.stop();
- });
- bean.add(zoomin, 'touchstart click', function(e) {
+ }
+
+ function zIn(e) {
+ e.stop();
+ if (smooth && map.ease) {
+ map.ease.zoom(map.zoom() + 1).run(50);
+ } else {
+ map.zoomIn();
+ }
+ }
+
+ function zOut(e) {
e.stop();
- map.zoomIn();
- }, false);
+ if (smooth && map.ease) {
+ map.ease.zoom(map.zoom() - 1).run(50);
+ } else {
+ map.zoomOut();
+ }
+ }
+ zoomin.innerHTML = '+';
+ zoomin.href = '#';
+ zoomin.className = 'zoomer zoomin';
zoomout.innerHTML = '-';
zoomout.href = '#';
zoomout.className = 'zoomer zoomout';
- bean.add(zoomout, 'mousedown dblclick', function(e) {
- e.stop();
- });
- bean.add(zoomout, 'touchstart click', function(e) {
- e.stop();
- map.zoomOut();
- });
function updateButtons(map, e) {
if (map.coordinate.zoom === map.coordLimits[0].zoom) {
@@ -4012,6 +4027,10 @@ wax.mm.zoomer = function() {
if (!map) return false;
map.addCallback('drawn', updateButtons);
zoomer.appendTo(map.parent);
+ bean.add(zoomin, 'mousedown dblclick', stopEvents);
+ bean.add(zoomout, 'mousedown dblclick', stopEvents);
+ bean.add(zoomout, 'touchstart click', zOut);
+ bean.add(zoomin, 'touchstart click', zIn);
return zoomer;
};
@@ -4020,6 +4039,10 @@ wax.mm.zoomer = function() {
map.removeCallback('drawn', updateButtons);
if (zoomin.parentNode) zoomin.parentNode.removeChild(zoomin);
if (zoomout.parentNode) zoomout.parentNode.removeChild(zoomout);
+ bean.remove(zoomin, 'mousedown dblclick', stopEvents);
+ bean.remove(zoomout, 'mousedown dblclick', stopEvents);
+ bean.remove(zoomout, 'touchstart click', zOut);
+ bean.remove(zoomin, 'touchstart click', zIn);
return zoomer;
};
@@ -4029,6 +4052,12 @@ wax.mm.zoomer = function() {
return zoomer;
};
+ zoomer.smooth = function(x) {
+ if (!arguments.length) return smooth;
+ smooth = x;
+ return zoomer;
+ };
+
return zoomer;
};
var wax = wax || {};
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -1,4 +1,4 @@
-/* wax - 7.0.0dev4 - v6.0.4-77-ga67c084 */
+/* wax - 7.0.0dev6 - v6.0.4-82-g0f0556f */
!function (name, context, definition) {
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -1,4 +1,4 @@
-/* wax - 7.0.0dev4 - v6.0.4-77-ga67c084 */
+/* wax - 7.0.0dev6 - v6.0.4-82-g0f0556f */
!function (name, context, definition) {
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -1,6 +1,6 @@
{
"name": "wax",
- "version": "7.0.0dev5",
+ "version": "7.0.0dev6",
"description": "Tools for improving web maps.",
"repository": {
"type": "git",

0 comments on commit 8c100db

Please sign in to comment.