nakarte

Source code of https://map.sikmir.ru (fork)
git clone git://git.sikmir.ru/nakarte
Log | Files | Refs | LICENSE

commit 2db092ab4deec590a79f442ff5d723ef1b3638c8
parent f3d7b01a126e21159c4783dc3f9e9a78ad3cb30f
Author: Sergey Orlov <wladimirych@gmail.com>
Date:   Thu, 16 Jul 2020 14:44:21 +0200

print: move zoom levels list from template to js code

This way I try to solve issue observed on iPhones:

Unable to process binding "options: function(){return ['auto',7,8,9,10,11,12,13,14,15,16,17,18] }"
Message: Illegal invocation

Diffstat:
Msrc/lib/leaflet.control.printPages/control.js | 2++
Msrc/lib/leaflet.control.printPages/form.html | 2+-
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/lib/leaflet.control.printPages/control.js b/src/lib/leaflet.control.printPages/control.js @@ -61,6 +61,8 @@ L.Control.PrintPages = L.Control.extend({ {name: 'A5', width: 148, height: 210} ], + zoomLevels: ['auto', 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], + initialize: function(options) { L.Control.prototype.initialize.call(this, options); this.pages = []; diff --git a/src/lib/leaflet.control.printPages/form.html b/src/lib/leaflet.control.printPages/form.html @@ -61,7 +61,7 @@ <td class="label">Source zoom<br />level</td> <td> <select name="srczoom" - data-bind="options: ['auto', 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], value: zoomLevel"> + data-bind="options: zoomLevels, value: zoomLevel"> </select> </td> </tr>