Skip to content

Commit

Permalink
Update to latest wax.
Browse files Browse the repository at this point in the history
  • Loading branch information
Young Hahn committed Jun 6, 2011
1 parent f105ec4 commit a1b0516
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 18 deletions.
2 changes: 1 addition & 1 deletion servers/Route.bones
Expand Up @@ -7,7 +7,7 @@ servers['Route'].augment({
], { type: '.css' }),
scripts: new mirror([
require.resolve('wax/ext/modestmaps.js'),
require.resolve('wax/build/wax.mm.min.js')
require.resolve('wax/dist/wax.mm.min.js')
], { type: '.js'})
},
initializeAssets: function(parent, app) {
Expand Down
16 changes: 6 additions & 10 deletions servers/Wax.bones
Expand Up @@ -106,7 +106,7 @@ server = Bones.Server.extend({
['@group',
['@new com.modestmaps.Map',
params.el,
['@new wax.provider',
['@new wax.mm.provider',
{
baseUrl: hosts.tileHost,
layerName: layer.get('id'),
Expand Down Expand Up @@ -138,16 +138,12 @@ server = Bones.Server.extend({
var wax = {
/*
@TODO, see: https://github.com/stamen/modestmaps-js/issues/35
zoomwheel: ['@new OpenLayers.Control.Navigation',
{'zoomWheelEnabled': true}
],
zoomwheelOff: ['@new OpenLayers.Control.Navigation',
{'zoomWheelEnabled': false}
],
zoomwheel: [],
zoomwheelOff: [],
*/
zoompan: ['@inject melt', ['@literal wax.zoomer']],
tooltips: ['@inject melt', ['@literal wax.interaction']],
legend: ['@inject melt', ['@literal wax.legend']]
zoompan: ['@inject melt', ['@literal wax.mm.zoomer']],
tooltips: ['@inject melt', ['@literal wax.mm.interaction']],
legend: ['@inject melt', ['@literal wax.mm.legend']]
};
_(controls).include('zoomwheel') || controls.unshift('zoomwheelOff');
return _(controls).map(function(c) { return wax[c]; });
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/wax/wax.center.json
@@ -1 +1 @@
{"wax":["@group",["@call w",["@group",["@new com.modestmaps.Map","map",["@new wax.provider",{"baseUrl":["http://a.localhost:8888/","http://b.localhost:8888/","http://c.localhost:8888/","http://d.localhost:8888/"],"layerName":"control_room","zoomRange":[0,4]}],null,[["@new com.modestmaps.MouseHandler"],["@new com.modestmaps.TouchHandler"]]],["@inject setCenterZoom",["@new com.modestmaps.Location",40,40],2]]],null,["@inject melt",["@literal wax.legend"]],["@inject melt",["@literal wax.interaction"]]]}
{"wax":["@group",["@call w",["@group",["@new com.modestmaps.Map","map",["@new wax.mm.provider",{"baseUrl":["http://a.localhost:8888/","http://b.localhost:8888/","http://c.localhost:8888/","http://d.localhost:8888/"],"layerName":"control_room","zoomRange":[0,4]}],null,[["@new com.modestmaps.MouseHandler"],["@new com.modestmaps.TouchHandler"]]],["@inject setCenterZoom",["@new com.modestmaps.Location",40,40],2]]],null,["@inject melt",["@literal wax.mm.legend"]],["@inject melt",["@literal wax.mm.interaction"]]]}
2 changes: 1 addition & 1 deletion test/fixtures/wax/wax.el.json
@@ -1 +1 @@
{"wax":["@group",["@call w",["@group",["@new com.modestmaps.Map","foo",["@new wax.provider",{"baseUrl":["http://a.localhost:8888/","http://b.localhost:8888/","http://c.localhost:8888/","http://d.localhost:8888/"],"layerName":"control_room","zoomRange":[0,4]}],null,[["@new com.modestmaps.MouseHandler"],["@new com.modestmaps.TouchHandler"]]],["@inject setCenterZoom",["@new com.modestmaps.Location",0,0],0]]],null,["@inject melt",["@literal wax.legend"]],["@inject melt",["@literal wax.interaction"]]]}
{"wax":["@group",["@call w",["@group",["@new com.modestmaps.Map","foo",["@new wax.mm.provider",{"baseUrl":["http://a.localhost:8888/","http://b.localhost:8888/","http://c.localhost:8888/","http://d.localhost:8888/"],"layerName":"control_room","zoomRange":[0,4]}],null,[["@new com.modestmaps.MouseHandler"],["@new com.modestmaps.TouchHandler"]]],["@inject setCenterZoom",["@new com.modestmaps.Location",0,0],0]]],null,["@inject melt",["@literal wax.mm.legend"]],["@inject melt",["@literal wax.mm.interaction"]]]}
2 changes: 1 addition & 1 deletion test/fixtures/wax/wax.layers.json
@@ -1 +1 @@
{"wax":["@group",["@call w",["@group",["@new com.modestmaps.Map","map",["@new wax.provider",{"baseUrl":["http://a.localhost:8888/","http://b.localhost:8888/","http://c.localhost:8888/","http://d.localhost:8888/"],"layerName":"control_room","zoomRange":[0,4]}],null,[["@new com.modestmaps.MouseHandler"],["@new com.modestmaps.TouchHandler"]]],["@inject setCenterZoom",["@new com.modestmaps.Location",0,0],0]]],null,["@inject melt",["@literal wax.legend"]],["@inject melt",["@literal wax.interaction"]]]}
{"wax":["@group",["@call w",["@group",["@new com.modestmaps.Map","map",["@new wax.mm.provider",{"baseUrl":["http://a.localhost:8888/","http://b.localhost:8888/","http://c.localhost:8888/","http://d.localhost:8888/"],"layerName":"control_room","zoomRange":[0,4]}],null,[["@new com.modestmaps.MouseHandler"],["@new com.modestmaps.TouchHandler"]]],["@inject setCenterZoom",["@new com.modestmaps.Location",0,0],0]]],null,["@inject melt",["@literal wax.mm.legend"]],["@inject melt",["@literal wax.mm.interaction"]]]}
2 changes: 1 addition & 1 deletion test/fixtures/wax/wax.options.json
@@ -1 +1 @@
{"wax":["@group",["@call w",["@group",["@new com.modestmaps.Map","map",["@new wax.provider",{"baseUrl":["http://a.localhost:8888/","http://b.localhost:8888/","http://c.localhost:8888/","http://d.localhost:8888/"],"layerName":"control_room","zoomRange":[0,4]}],null,[["@new com.modestmaps.MouseHandler"],["@new com.modestmaps.TouchHandler"]]],["@inject setCenterZoom",["@new com.modestmaps.Location",0,0],0]]],null,["@inject melt",["@literal wax.interaction"]]]}
{"wax":["@group",["@call w",["@group",["@new com.modestmaps.Map","map",["@new wax.mm.provider",{"baseUrl":["http://a.localhost:8888/","http://b.localhost:8888/","http://c.localhost:8888/","http://d.localhost:8888/"],"layerName":"control_room","zoomRange":[0,4]}],null,[["@new com.modestmaps.MouseHandler"],["@new com.modestmaps.TouchHandler"]]],["@inject setCenterZoom",["@new com.modestmaps.Location",0,0],0]]],null,["@inject melt",["@literal wax.mm.interaction"]]]}
7 changes: 4 additions & 3 deletions test/tilestream.test.js
Expand Up @@ -82,7 +82,7 @@ exports['mbtiles download'] = function() {
exports['load map'] = function() {
assert.response(
server,
{ url: '/api/Tileset/control_room' },
_({ url: '/api/Tileset/control_room' }).extend(request),
{ status: 200 },
function(res) {
var map;
Expand All @@ -92,14 +92,15 @@ exports['load map'] = function() {
assert.equal(map.id, 'control_room');
assert.equal(map.type, 'baselayer');
assert.equal(map.bounds, "-180,-85.05112877980659,180,89.99075251648905");
assert.deepEqual(map.host, ['http://a.localhost:8888/', 'http://b.localhost:8888/', 'http://c.localhost:8888/', 'http://d.localhost:8888/']);
}
);
};

exports['load map v1'] = function() {
assert.response(
server,
{ url: '/api/v1/Tileset/control_room' },
_({ url: '/api/v1/Tileset/control_room' }).extend(request),
{ status: 200 },
function(res) {
var map;
Expand All @@ -109,7 +110,7 @@ exports['load map v1'] = function() {
assert.equal(map.id, 'control_room');
assert.equal(map.type, 'baselayer');
assert.equal(map.bounds, '-180,-85.05112877980659,180,89.99075251648905');
assert.deepEqual(mapl.host, ['http://a.localhost:8888/', 'http://b.localhost:8888/', 'http:/c.localhost:8888/', 'http://d.localhost:8888/']);
assert.deepEqual(map.host, ['http://a.localhost:8888/', 'http://b.localhost:8888/', 'http://c.localhost:8888/', 'http://d.localhost:8888/']);

}
);
Expand Down

0 comments on commit a1b0516

Please sign in to comment.