zoom update

This commit is contained in:
Peter Cottle 2013-01-08 14:45:02 -08:00
parent d7bb4064dc
commit 1ea23f7b32
3 changed files with 12 additions and 6 deletions

View file

@ -6354,7 +6354,7 @@ var init = function() {
if (level > Constants.VIEWPORT.maxZoom || if (level > Constants.VIEWPORT.maxZoom ||
level < Constants.VIEWPORT.minZoom) { level < Constants.VIEWPORT.minZoom) {
var Views = require('../views'); var Views = require('../views');
var view = new Views.ZoomAlertWindow(); var view = new Views.ZoomAlertWindow({level: level});
} }
}); });
eventBaton.stealBaton('windowSizeCheck', function(size) { eventBaton.stealBaton('windowSizeCheck', function(size) {
@ -10004,9 +10004,11 @@ var WindowSizeAlertWindow = ViewportAlert.extend({
var ZoomAlertWindow = ViewportAlert.extend({ var ZoomAlertWindow = ViewportAlert.extend({
initialize: function(options) { initialize: function(options) {
if (!options || !options.level) { throw new Error('need level'); }
this.eventBatonName = 'zoomChange'; this.eventBatonName = 'zoomChange';
this.markdowns = [ this.markdowns = [
'## That zoom level is not supported :-/', '## That zoom level of ' + options.level + ' is not supported :-/',
'Please zoom back to a supported zoom level with Ctrl + and Ctrl -', 'Please zoom back to a supported zoom level with Ctrl + and Ctrl -',
'', '',
'(and of course, pull requests to fix this are appreciated :D)' '(and of course, pull requests to fix this are appreciated :D)'
@ -16630,7 +16632,7 @@ var init = function() {
if (level > Constants.VIEWPORT.maxZoom || if (level > Constants.VIEWPORT.maxZoom ||
level < Constants.VIEWPORT.minZoom) { level < Constants.VIEWPORT.minZoom) {
var Views = require('../views'); var Views = require('../views');
var view = new Views.ZoomAlertWindow(); var view = new Views.ZoomAlertWindow({level: level});
} }
}); });
eventBaton.stealBaton('windowSizeCheck', function(size) { eventBaton.stealBaton('windowSizeCheck', function(size) {
@ -21774,9 +21776,11 @@ var WindowSizeAlertWindow = ViewportAlert.extend({
var ZoomAlertWindow = ViewportAlert.extend({ var ZoomAlertWindow = ViewportAlert.extend({
initialize: function(options) { initialize: function(options) {
if (!options || !options.level) { throw new Error('need level'); }
this.eventBatonName = 'zoomChange'; this.eventBatonName = 'zoomChange';
this.markdowns = [ this.markdowns = [
'## That zoom level is not supported :-/', '## That zoom level of ' + options.level + ' is not supported :-/',
'Please zoom back to a supported zoom level with Ctrl + and Ctrl -', 'Please zoom back to a supported zoom level with Ctrl + and Ctrl -',
'', '',
'(and of course, pull requests to fix this are appreciated :D)' '(and of course, pull requests to fix this are appreciated :D)'

View file

@ -80,7 +80,7 @@ var init = function() {
if (level > Constants.VIEWPORT.maxZoom || if (level > Constants.VIEWPORT.maxZoom ||
level < Constants.VIEWPORT.minZoom) { level < Constants.VIEWPORT.minZoom) {
var Views = require('../views'); var Views = require('../views');
var view = new Views.ZoomAlertWindow(); var view = new Views.ZoomAlertWindow({level: level});
} }
}); });
eventBaton.stealBaton('windowSizeCheck', function(size) { eventBaton.stealBaton('windowSizeCheck', function(size) {

View file

@ -439,9 +439,11 @@ var WindowSizeAlertWindow = ViewportAlert.extend({
var ZoomAlertWindow = ViewportAlert.extend({ var ZoomAlertWindow = ViewportAlert.extend({
initialize: function(options) { initialize: function(options) {
if (!options || !options.level) { throw new Error('need level'); }
this.eventBatonName = 'zoomChange'; this.eventBatonName = 'zoomChange';
this.markdowns = [ this.markdowns = [
'## That zoom level is not supported :-/', '## That zoom level of ' + options.level + ' is not supported :-/',
'Please zoom back to a supported zoom level with Ctrl + and Ctrl -', 'Please zoom back to a supported zoom level with Ctrl + and Ctrl -',
'', '',
'(and of course, pull requests to fix this are appreciated :D)' '(and of course, pull requests to fix this are appreciated :D)'