From b86fd98a5cbd0741a1164cc2ae35aa3976652294 Mon Sep 17 00:00:00 2001
From: Malik <75104021+7malikk@users.noreply.github.com>
Date: Mon, 20 Feb 2023 16:16:59 +0100
Subject: [PATCH] save map dropdown (#1357)
* save map dropdown
* save and recover map
* hot fix
* quick fixes
---
dist/leaflet.distortableimage.js | 801 +++++++++++++++++++++------
dist/leaflet.distortableimage.js.map | 2 +-
examples/archive.html | 42 +-
examples/js/archive.js | 202 +++++--
4 files changed, 839 insertions(+), 208 deletions(-)
diff --git a/dist/leaflet.distortableimage.js b/dist/leaflet.distortableimage.js
index a2adbdd52..634bf43b3 100644
--- a/dist/leaflet.distortableimage.js
+++ b/dist/leaflet.distortableimage.js
@@ -195,9 +195,13 @@ ansiHTML.reset()
/***/ (function() {
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
-function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
+
+function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
+
var arr = [];
L.DistortableCollection = L.FeatureGroup.extend({
options: {
@@ -217,14 +221,16 @@ L.DistortableCollection = L.FeatureGroup.extend({
onAdd: function onAdd(map) {
L.FeatureGroup.prototype.onAdd.call(this, map);
this._map = map;
+
if (this.editable) {
this.editing.enable();
}
-
/**
* although we have a DistortableCollection.Edit class that handles collection events to keep our code managable,
* events that need to be added on individual images are kept here to do so through `layeradd`.
*/
+
+
this.on('layeradd', this._addEvents, this);
this.on('layerremove', this._removeEvents, this);
},
@@ -232,6 +238,7 @@ L.DistortableCollection = L.FeatureGroup.extend({
if (this.editing) {
this.editing.disable();
}
+
this.off('layeradd', this._addEvents, this);
this.off('layerremove', this._removeEvents, this);
},
@@ -243,6 +250,7 @@ L.DistortableCollection = L.FeatureGroup.extend({
}, this);
L.DomEvent.on(layer.getElement(), {
mousedown: this._deselectOthers,
+
/* Enable longpress for multi select for touch devices. */
contextmenu: this._longPressMultiSelect
}, this);
@@ -260,16 +268,21 @@ L.DistortableCollection = L.FeatureGroup.extend({
},
_longPressMultiSelect: function _longPressMultiSelect(e) {
var _this = this;
+
if (!this.editable) {
return;
}
+
e.preventDefault();
this.eachLayer(function (layer) {
var edit = layer.editing;
+
if (layer.getElement() === e.target && edit.enabled()) {
L.DomUtil.toggleClass(layer.getElement(), 'collected');
+
if (_this.anyCollected()) {
layer.deselect();
+
_this.editing._addToolbar();
} else {
_this.editing._removeToolbar();
@@ -288,12 +301,13 @@ L.DistortableCollection = L.FeatureGroup.extend({
if (e.shiftKey) {
/* conditional prevents disabled images from flickering multi-select mode */
if (layer.editing.enabled()) {
- L.DomUtil.toggleClass(e.target, 'collected');
- // re-order layers by _leaflet_id to match their display order in UI
+ L.DomUtil.toggleClass(e.target, 'collected'); // re-order layers by _leaflet_id to match their display order in UI
// add new layer to right position and avoid repitition
+
var newArr = arr.every(function (each) {
return each._leaflet_id !== layer._leaflet_id;
});
+
if (newArr) {
arr.push(layer);
} else {
@@ -301,6 +315,7 @@ L.DistortableCollection = L.FeatureGroup.extend({
}
}
}
+
if (this.anyCollected()) {
layer.deselect();
} else {
@@ -309,9 +324,11 @@ L.DistortableCollection = L.FeatureGroup.extend({
},
_deselectOthers: function _deselectOthers(e) {
var _this2 = this;
+
if (!this.editable) {
return;
}
+
this.eachLayer(function (layer) {
if (layer.getElement() !== e.target) {
layer.deselect();
@@ -319,6 +336,7 @@ L.DistortableCollection = L.FeatureGroup.extend({
_this2._toggleCollected(e, layer);
}
});
+
if (e) {
L.DomEvent.stopPropagation(e);
}
@@ -327,12 +345,15 @@ L.DistortableCollection = L.FeatureGroup.extend({
var overlay = e.target;
var map = this._map;
var i;
+
if (!this.isCollected(overlay)) {
return;
}
+
this.eachLayer(function (layer) {
layer._dragStartPoints = {};
layer.deselect();
+
for (i = 0; i < 4; i++) {
var c = layer.getCorner(i);
layer._dragStartPoints[i] = map.latLngToLayerPoint(c);
@@ -342,15 +363,20 @@ L.DistortableCollection = L.FeatureGroup.extend({
_dragMultiple: function _dragMultiple(e) {
var overlay = e.target;
var map = this._map;
+
if (!this.isCollected(overlay)) {
return;
}
+
var topLeft = map.latLngToLayerPoint(overlay.getCorner(0));
+
var delta = overlay._dragStartPoints[0].subtract(topLeft);
+
this._updateCollectionFromPoints(delta, overlay);
},
_toRemove: function _toRemove() {
var _this3 = this;
+
var layerArr = this.getLayers();
return layerArr.filter(function (layer) {
var mode = layer.editing._mode;
@@ -359,6 +385,7 @@ L.DistortableCollection = L.FeatureGroup.extend({
},
_toMove: function _toMove(overlay) {
var _this4 = this;
+
var layerArr = this.getLayers();
return layerArr.filter(function (layer) {
var mode = layer.editing._mode;
@@ -367,13 +394,16 @@ L.DistortableCollection = L.FeatureGroup.extend({
},
_updateCollectionFromPoints: function _updateCollectionFromPoints(delta, overlay) {
var layersToMove = this._toMove(overlay);
+
var p = new L.Transformation(1, -delta.x, 1, -delta.y);
var i;
layersToMove.forEach(function (layer) {
var movedPoints = {};
+
for (i = 0; i < 4; i++) {
movedPoints[i] = p.transform(layer._dragStartPoints[i]);
}
+
layer.setCornersFromPoints(movedPoints);
});
},
@@ -396,16 +426,20 @@ L.DistortableCollection = L.FeatureGroup.extend({
_context.prev = 2;
_context.next = 5;
return axios.get(url);
+
case 5:
response = _context.sent;
+
if (!response.data.hasOwnProperty('avg_cm_per_pixel')) {
_context.next = 14;
break;
}
+
if (!(response.data.collection.length > 1)) {
_context.next = 10;
break;
}
+
response.data.collection.forEach(function (data) {
imgCollectionProps[index] = data;
index++;
@@ -414,17 +448,20 @@ L.DistortableCollection = L.FeatureGroup.extend({
avg_cm_per_pixel: response.data.avg_cm_per_pixel,
imgCollectionProps: imgCollectionProps
});
+
case 10:
imgCollectionProps[index] = response.data.collection;
return _context.abrupt("return", {
avg_cm_per_pixel: response.data.avg_cm_per_pixel,
imgCollectionProps: imgCollectionProps
});
+
case 14:
if (!(response.data.length > 1)) {
_context.next = 17;
break;
}
+
response.data.forEach(function (data) {
imgCollectionProps[index] = data;
index++;
@@ -432,18 +469,22 @@ L.DistortableCollection = L.FeatureGroup.extend({
return _context.abrupt("return", {
imgCollectionProps: imgCollectionProps
});
+
case 17:
imgCollectionProps[index] = response.data;
return _context.abrupt("return", {
imgCollectionProps: imgCollectionProps
});
+
case 19:
_context.next = 24;
break;
+
case 21:
_context.prev = 21;
_context.t0 = _context["catch"](2);
console.log('err', _context.t0);
+
case 24:
case "end":
return _context.stop();
@@ -455,6 +496,7 @@ L.DistortableCollection = L.FeatureGroup.extend({
// expects url in this format: https://archive.org/download/mkl-1/mkl-1.json
recreateImagesFromJsonUrl: function recreateImagesFromJsonUrl(url) {
var _this5 = this;
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
var imageCollectionObj;
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
@@ -462,18 +504,23 @@ L.DistortableCollection = L.FeatureGroup.extend({
switch (_context2.prev = _context2.next) {
case 0:
imageCollectionObj = {};
+
if (!url) {
_context2.next = 6;
break;
}
+
_context2.next = 4;
return _this5.fetchRemoteJson(url);
+
case 4:
imageCollectionObj = _context2.sent;
return _context2.abrupt("return", imageCollectionObj);
+
case 6:
;
return _context2.abrupt("return", imageCollectionObj);
+
case 8:
case "end":
return _context2.stop();
@@ -489,6 +536,7 @@ L.DistortableCollection = L.FeatureGroup.extend({
this.eachLayer(function (layer) {
if (allImages || this.isCollected(layer)) {
var sections = layer._image.src.split('/');
+
var filename = sections[sections.length - 1];
var zc = layer.getCorners();
var corners = [{
@@ -521,6 +569,7 @@ L.DistortableCollection = L.FeatureGroup.extend({
return json;
}
});
+
L.distortableCollection = function (id, options) {
return new L.DistortableCollection(id, options);
};
@@ -558,44 +607,57 @@ L.DistortableImageOverlay = L.ImageOverlay.extend({
},
onAdd: function onAdd(map) {
var _this = this;
+
this._map = map;
+
if (!this.getElement()) {
this._initImage();
}
+
map.on('viewreset', this._reset, this);
+
if (this.options.corners) {
this._corners = this.options.corners;
+
if (map.options.zoomAnimation && L.Browser.any3d) {
map.on('zoomanim', this._animateZoom, this);
}
- }
+ } // Have to wait for the image to load because need to access its w/h
+
- // Have to wait for the image to load because need to access its w/h
L.DomEvent.on(this.getElement(), 'load', function () {
_this.getPane().appendChild(_this.getElement());
+
_this._initImageDimensions();
+
if (_this.options.rotation) {
var units = _this.options.rotation.deg >= 0 ? 'deg' : 'rad';
+
_this.setAngle(_this.options.rotation[units], units);
} else {
_this.rotation = {
deg: 0,
rad: 0
};
+
_this._reset();
}
-
/* Initialize default corners if not already set */
+
+
if (!_this._corners) {
if (map.options.zoomAnimation && L.Browser.any3d) {
map.on('zoomanim', _this._animateZoom, _this);
}
}
-
/** if there is a featureGroup, only its editable option matters */
+
+
var eventParents = _this._eventParents;
+
if (eventParents) {
_this.eP = eventParents[Object.keys(eventParents)[0]];
+
if (_this.eP.editable) {
_this.editing.enable();
}
@@ -603,6 +665,7 @@ L.DistortableImageOverlay = L.ImageOverlay.extend({
if (_this.editable) {
_this.editing.enable();
}
+
_this.eP = null;
}
});
@@ -612,14 +675,15 @@ L.DistortableImageOverlay = L.ImageOverlay.extend({
singleclickoff: this._resetClickListeners,
singleclick: this._singleClick
}, this);
-
/**
* custom events fired from DoubleClickLabels.js. Used to differentiate
* single / dblclick to not deselect images on map dblclick.
*/
+
if (!(map.doubleClickZoom.enabled() || map.doubleClickLabels.enabled())) {
L.DomEvent.on(map, 'click', this.deselect, this);
}
+
this.fire('add');
L.DomEvent.on(this.getElement(), 'mousemove', this.activateTooltip, this);
L.DomEvent.on(this.getElement(), 'mouseout', this.closeTooltip, this);
@@ -632,9 +696,11 @@ L.DistortableImageOverlay = L.ImageOverlay.extend({
singleclick: this._singleClick
}, this);
L.DomEvent.off(map, 'click', this.deselect, this);
+
if (this.editing) {
this.editing.disable();
}
+
this.fire('remove');
L.ImageOverlay.prototype.onRemove.call(this, map);
L.DomEvent.on(this.getElement(), 'mouseout', this.closeTooltip, this);
@@ -649,11 +715,13 @@ L.DistortableImageOverlay = L.ImageOverlay.extend({
var imageWidth = parseInt(aspectRatio * imageHeight);
var center = map.project(map.getCenter());
var offset = L.point(imageWidth, imageHeight).divideBy(2);
+
if (this.options.corners) {
this._corners = this.options.corners;
} else {
this._corners = [map.unproject(center.subtract(offset)), map.unproject(center.add(L.point(offset.x, -offset.y))), map.unproject(center.add(L.point(-offset.x, offset.y))), map.unproject(center.add(offset))];
}
+
this._initialDimensions = {
'center': center,
'offset': offset,
@@ -683,11 +751,15 @@ L.DistortableImageOverlay = L.ImageOverlay.extend({
},
deselect: function deselect() {
var edit = this.editing;
+
if (!edit.enabled()) {
return;
}
+
edit._removeToolbar();
+
edit._hideMarkers();
+
this._selected = false;
this.fire('deselect');
return this;
@@ -695,25 +767,31 @@ L.DistortableImageOverlay = L.ImageOverlay.extend({
select: function select(e) {
var edit = this.editing;
var eP = this.eP;
+
if (!edit.enabled()) {
return;
}
+
if (e) {
L.DomEvent.stopPropagation(e);
- }
+ } // this ensures deselection of all other images, allowing us to keep collection group optional
+
- // this ensures deselection of all other images, allowing us to keep collection group optional
this._programmaticGrouping();
+
this._selected = true;
+
edit._addToolbar();
+
edit._showMarkers();
- this.fire('select');
- // we run the selection logic 1st anyway because the collection group's _addToolbar method depends on it
+ this.fire('select'); // we run the selection logic 1st anyway because the collection group's _addToolbar method depends on it
+
if (eP && eP.anyCollected()) {
this.deselect();
return;
}
+
return this;
},
_programmaticGrouping: function _programmaticGrouping() {
@@ -728,9 +806,11 @@ L.DistortableImageOverlay = L.ImageOverlay.extend({
this._corners[corner] = latlng;
this.setBounds(L.latLngBounds(this.getCorners()));
this.fire('update');
+
if (edit.toolbar && edit.toolbar instanceof L.DistortableImage.PopupBar) {
edit._updateToolbarPos();
}
+
this.edited = true;
return this;
},
@@ -740,6 +820,7 @@ L.DistortableImageOverlay = L.ImageOverlay.extend({
} else {
var exceedsTop;
var exceedsBottom;
+
if (zoom === 0) {
exceedsTop = map.project(corner).y < 2;
exceedsBottom = map.project(corner).y >= 255;
@@ -747,6 +828,7 @@ L.DistortableImageOverlay = L.ImageOverlay.extend({
exceedsTop = map.project(corner).y / zoom < 2;
exceedsBottom = map.project(corner).y / Math.pow(2, zoom) >= 255;
}
+
return exceedsTop || exceedsBottom;
}
},
@@ -770,9 +852,8 @@ L.DistortableImageOverlay = L.ImageOverlay.extend({
var map = this._map;
var zoom = map.getZoom();
var edit = this.editing;
- var i = 0;
+ var i = 0; // this is to fix https://github.com/publiclab/Leaflet.DistortableImage/issues/402
- // this is to fix https://github.com/publiclab/Leaflet.DistortableImage/issues/402
for (var k in latlngObj) {
if (this._cornerExceedsMapLats(zoom, latlngObj[k], map)) {
// calling reset / update w/ the same corners bc it prevents a marker flicker for rotate
@@ -781,15 +862,19 @@ L.DistortableImageOverlay = L.ImageOverlay.extend({
return;
}
}
+
for (var _k in latlngObj) {
this._corners[i] = latlngObj[_k];
i += 1;
}
+
this.setBounds(L.latLngBounds(this.getCorners()));
this.fire('update');
+
if (edit.toolbar && edit.toolbar instanceof L.DistortableImage.PopupBar) {
edit._updateToolbarPos();
}
+
this.edited = true;
return this;
},
@@ -798,8 +883,10 @@ L.DistortableImageOverlay = L.ImageOverlay.extend({
var zoom = map.getZoom();
var edit = this.editing;
var i = 0;
+
for (var k in pointsObj) {
var corner = map.layerPointToLatLng(pointsObj[k]);
+
if (this._cornerExceedsMapLats(zoom, corner, map)) {
// calling reset / update w/ the same corners bc it prevents a marker flicker for rotate
this.setBounds(L.latLngBounds(this.getCorners()));
@@ -807,15 +894,19 @@ L.DistortableImageOverlay = L.ImageOverlay.extend({
return;
}
}
+
for (var _k2 in pointsObj) {
this._corners[i] = map.layerPointToLatLng(pointsObj[_k2]);
i += 1;
}
+
this.setBounds(L.latLngBounds(this.getCorners()));
this.fire('update');
+
if (edit.toolbar && edit.toolbar instanceof L.DistortableImage.PopupBar) {
edit._updateToolbarPos();
}
+
this.edited = true;
return this;
},
@@ -825,13 +916,16 @@ L.DistortableImageOverlay = L.ImageOverlay.extend({
var i;
var p;
var scaledCorners = {};
+
if (scale === 0) {
return;
}
+
for (i = 0; i < 4; i++) {
p = map.project(this.getCorner(i)).subtract(center).multiplyBy(scale).add(center);
scaledCorners[i] = map.unproject(p);
}
+
this.setCorners(scaledCorners);
return this;
},
@@ -844,12 +938,15 @@ L.DistortableImageOverlay = L.ImageOverlay.extend({
var row1y = matrix[5];
var determinant = row0x * row1y - row0y * row1x;
var angle = L.TrigUtil.calcAngle(row0x, row0y, 'rad');
+
if (determinant < 0) {
angle += angle < 0 ? Math.PI : -Math.PI;
}
+
if (angle < 0) {
angle = 2 * Math.PI + angle;
}
+
return unit === 'deg' ? Math.round(L.TrigUtil.radiansToDegrees(angle)) : L.Util.formatNum(angle, 2);
},
setAngle: function setAngle(angle) {
@@ -867,14 +964,17 @@ L.DistortableImageOverlay = L.ImageOverlay.extend({
var i;
var p;
var q;
+
if (unit === 'deg') {
angle = L.TrigUtil.degreesToRadians(angle);
}
+
for (i = 0; i < 4; i++) {
p = map.project(this.getCorner(i)).subtract(center);
q = L.point(Math.cos(angle) * p.x - Math.sin(angle) * p.y, Math.sin(angle) * p.x + Math.cos(angle) * p.y);
corners[i] = map.unproject(q.add(center));
}
+
this.setCorners(corners);
return this;
},
@@ -884,10 +984,12 @@ L.DistortableImageOverlay = L.ImageOverlay.extend({
var p;
var transCorners = {};
var delta = map.project(formerPoint).subtract(map.project(newPoint));
+
for (i = 0; i < 4; i++) {
p = map.project(this.getCorner(i)).subtract(delta);
transCorners[i] = map.unproject(p);
}
+
this.setCorners(transCorners);
},
restore: function restore() {
@@ -896,16 +998,20 @@ L.DistortableImageOverlay = L.ImageOverlay.extend({
var offset = this._initialDimensions.offset;
var zoom = this._initialDimensions.zoom;
var corners = [center.subtract(offset), center.add(L.point(offset.x, -offset.y)), center.add(L.point(-offset.x, offset.y)), center.add(offset)];
+
for (var i = 0; i < 4; i++) {
if (!map.unproject(corners[i], zoom).equals(this.getCorner(i))) {
this.setCorner(i, map.unproject(corners[i], zoom));
}
}
+
this.edited = false;
this.fire('restore');
return this;
},
+
/* Copied from Leaflet v0.7 https://github.com/Leaflet/Leaflet/blob/66282f14bcb180ec87d9818d9f3c9f75afd01b30/src/dom/DomUtil.js#L189-L199 */
+
/* since L.DomUtil.getTranslateString() is deprecated in Leaflet v1.0 */
_getTranslateString: function _getTranslateString(point) {
// on WebKit browsers (Chrome/Safari/iOS Safari/Android)
@@ -913,7 +1019,6 @@ L.DistortableImageOverlay = L.ImageOverlay.extend({
// makes animation smoother as it ensures HW accel is used.
// Firefox 13 doesn't care
// (same speed either way), Opera 12 doesn't support translate3d
-
var is3d = L.Browser.webkit3d;
var open = 'translate' + (is3d ? '3d' : '') + '(';
var close = (is3d ? ',0' : '') + ')';
@@ -923,22 +1028,27 @@ L.DistortableImageOverlay = L.ImageOverlay.extend({
var map = this._map;
var image = this.getElement();
var latLngToLayerPoint = L.bind(map.latLngToLayerPoint, map);
+
var transformMatrix = this._calculateProjectiveTransform(latLngToLayerPoint);
+
var topLeft = latLngToLayerPoint(this.getCorner(0));
var warp = L.DomUtil.getMatrixString(transformMatrix);
- var translation = this._getTranslateString(topLeft);
+ var translation = this._getTranslateString(topLeft);
/* See L.DomUtil.setPosition. Mainly for the purposes of L.Draggable. */
+
+
image._leaflet_pos = topLeft;
image.style[L.DomUtil.TRANSFORM] = [translation, warp].join(' ');
-
/* Set origin to the upper-left corner rather than
* the center of the image, which is the default.
*/
+
image.style[L.DomUtil.TRANSFORM + '-origin'] = '0 0 0';
this.rotation.deg = this.getAngle();
this.rotation.rad = this.getAngle('rad');
},
+
/*
* Calculates the transform string that will be
* correct *at the end* of zooming.
@@ -948,15 +1058,20 @@ L.DistortableImageOverlay = L.ImageOverlay.extend({
_animateZoom: function _animateZoom(event) {
var map = this._map;
var image = this.getElement();
+
var latLngToNewLayerPoint = function latLngToNewLayerPoint(latlng) {
return map._latLngToNewLayerPoint(latlng, event.zoom, event.center);
};
+
var transformMatrix = this._calculateProjectiveTransform(latLngToNewLayerPoint);
+
var topLeft = latLngToNewLayerPoint(this.getCorner(0));
var warp = L.DomUtil.getMatrixString(transformMatrix);
- var translation = this._getTranslateString(topLeft);
+ var translation = this._getTranslateString(topLeft);
/* See L.DomUtil.setPosition. Mainly for the purposes of L.Draggable. */
+
+
image._leaflet_pos = topLeft;
image.style[L.DomUtil.TRANSFORM] = [translation, warp].join(' ');
},
@@ -984,10 +1099,10 @@ L.DistortableImageOverlay = L.ImageOverlay.extend({
var c = [];
var j;
/* Convert corners to container points (i.e. cartesian coordinates). */
+
for (j = 0; j < 4; j++) {
c.push(latLngToCartesian(this.getCorner(j))._subtract(offset));
}
-
/*
* This matrix describes the action of
* the CSS transform on each corner of the image.
@@ -999,12 +1114,16 @@ L.DistortableImageOverlay = L.ImageOverlay.extend({
* says that the upper-left corner of the image
* maps to the first latlng in this._corners.
*/
+
+
return L.MatrixUtil.general2DProjection(0, 0, c[0].x, c[0].y, w, 0, c[1].x, c[1].y, 0, h, c[2].x, c[2].y, w, h, c[3].x, c[3].y);
}
});
+
L.distortableImageOverlay = function (id, options) {
return new L.DistortableImageOverlay(id, options);
};
+
L.Map.addInitHook(function () {
if (!L.DomUtil.hasClass(this.getContainer(), 'ldi')) {
L.DomUtil.addClass(this.getContainer(), 'ldi');
@@ -1020,6 +1139,7 @@ L.Map.addInitHook(function () {
/***/ (function() {
var _this = this;
+
L.DomUtil = L.DomUtil || {};
L.DistortableImage = L.DistortableImage || {};
L.distortableImage = L.DistortableImage;
@@ -1036,7 +1156,9 @@ L.DistortableImage.Keymapper = L.Handler.extend({
this._container = this._buildContainer();
this._scrollWrapper = this._wrap();
this._toggler = this._createButton();
+
this._setMapper(this._container, this._scrollWrapper, this._toggler);
+
L.DomEvent.on(this._toggler, 'click', this._toggleKeymapper, this);
L.DomEvent.disableClickPropagation(this._container);
L.DomEvent.disableScrollPropagation(this._container);
@@ -1063,8 +1185,8 @@ L.DistortableImage.Keymapper = L.Handler.extend({
toggler.innerHTML = L.IconUtil.create('keyboard_open');
toggler.setAttribute('id', 'toggle-keymapper');
toggler.setAttribute('href', '#');
- toggler.setAttribute('title', 'Show keymap');
- // Will force screen readers like VoiceOver to read this as "Show keymap - button"
+ toggler.setAttribute('title', 'Show keymap'); // Will force screen readers like VoiceOver to read this as "Show keymap - button"
+
toggler.setAttribute('role', 'button');
toggler.setAttribute('aria-label', 'Show keymap');
return toggler;
@@ -1079,14 +1201,18 @@ L.DistortableImage.Keymapper = L.Handler.extend({
this._keymapper = L.control({
position: this.options.position
});
+
this._keymapper.onAdd = function () {
container.appendChild(wrap);
- wrap.insertAdjacentHTML('beforeend', '
' + '
' + /* eslint-disable */
+ wrap.insertAdjacentHTML('beforeend', '' + '
' +
+ /* eslint-disable */
'Rotate Mode R |
' + 'RotateScale Mode r |
' + 'Scale Mode s |
' + 'Distort Mode d |
' + 'Drag Mode D |
' + 'Lock (Mode) / Unlock Image l\xa0u |
' + 'Stack up / down q\xa0a |
' + 'Add / Remove Image Border b |
' + 'Toggle Opacity o |
' + 'Deselect All esc |
' + 'Delete Image(s) delete\xa0backspace |
' + 'Export Image(s) e |
' + '
');
/* eslint-enable */
+
container.appendChild(button);
return container;
};
+
this._keymapper.addTo(this._map);
},
_toggleKeymapper: function _toggleKeymapper(e) {
@@ -1101,6 +1227,7 @@ L.DistortableImage.Keymapper = L.Handler.extend({
if (document.querySelector('#keymapper-iconset')) {
return;
}
+
var el = L.DomUtil.create('div', '');
el.id = 'keymapper-iconset';
el.setAttribute('hidden', 'hidden');
@@ -1110,13 +1237,15 @@ L.DistortableImage.Keymapper = L.Handler.extend({
}
});
L.DistortableImage.Keymapper.addInitHook(function () {
- L.DistortableImage.Keymapper.prototype._n = L.DistortableImage.Keymapper.prototype._n ? L.DistortableImage.Keymapper.prototype._n + 1 : 1;
- // dont enable keymapper for mobile
+ L.DistortableImage.Keymapper.prototype._n = L.DistortableImage.Keymapper.prototype._n ? L.DistortableImage.Keymapper.prototype._n + 1 : 1; // dont enable keymapper for mobile
+
if (L.DistortableImage.Keymapper.prototype._n === 1 && !L.Browser.mobile) {
_this.enable();
+
_this._injectIconSet();
}
});
+
L.distortableImage.keymapper = function (map, options) {
return new L.DistortableImage.Keymapper(map, options);
};
@@ -1129,9 +1258,8 @@ L.distortableImage.keymapper = function (map, options) {
\************************************************/
/***/ (function() {
-L.DistortableImage = L.DistortableImage || {};
+L.DistortableImage = L.DistortableImage || {}; // this class holds the keybindings and toolbar API for an image collection instance
-// this class holds the keybindings and toolbar API for an image collection instance
L.DistortableCollection.Edit = L.Handler.extend({
options: {
keymap: L.distortableImage.group_action_map
@@ -1148,9 +1276,11 @@ L.DistortableCollection.Edit = L.Handler.extend({
this.editActions = this.options.actions;
this.runExporter = L.bind(L.Utils.getNestedVal(this, '_exportOpts', 'exporter') || this.startExport, this);
L.DomEvent.on(document, 'keydown', this._onKeyDown, this);
+
if (!(map.doubleClickZoom.enabled() || map.doubleClickLabels.enabled())) {
L.DomEvent.on(map, 'click', this._decollectAll, this);
}
+
L.DomEvent.on(map, {
singleclickon: this._singleClickListeners,
singleclickoff: this._resetClickListeners,
@@ -1158,6 +1288,7 @@ L.DistortableCollection.Edit = L.Handler.extend({
boxcollectend: this._addCollections
}, this);
this._group.editable = true;
+
this._group.eachLayer(function (layer) {
return layer.editing.enable();
});
@@ -1166,17 +1297,22 @@ L.DistortableCollection.Edit = L.Handler.extend({
var group = this._group;
var map = group._map;
L.DomEvent.off(document, 'keydown', this._onKeyDown, this);
+
if (!(map.doubleClickZoom.enabled() || map.doubleClickLabels.enabled())) {
L.DomEvent.off(map, 'click', this._decollectAll, this);
}
+
L.DomEvent.off(map, {
singleclickon: this._singleClickListeners,
singleclickoff: this._resetClickListeners,
singleclick: this._singleClick,
boxcollectend: this._addCollections
}, this);
+
this._decollectAll();
+
this._group.editable = false;
+
this._group.eachLayer(function (layer) {
return layer.editing.disable();
});
@@ -1194,9 +1330,11 @@ L.DistortableCollection.Edit = L.Handler.extend({
_onKeyDown: function _onKeyDown(e) {
var keymap = this.options.keymap;
var handlerName = keymap[e.key];
+
if (!this[handlerName]) {
return;
}
+
if (this._group.anyCollected()) {
this[handlerName].call(this);
}
@@ -1220,6 +1358,7 @@ L.DistortableCollection.Edit = L.Handler.extend({
},
_decollectAll: function _decollectAll(e) {
var oe;
+
if (e) {
oe = e.originalEvent;
}
@@ -1227,86 +1366,113 @@ L.DistortableCollection.Edit = L.Handler.extend({
* prevents image deselection following the 'boxcollectend' event - note 'shift' must not be released until dragging is complete
* also prevents deselection following a click on a disabled img by differentiating it from the map
*/
+
+
if (oe && (oe.shiftKey || oe.target instanceof HTMLImageElement)) {
return;
}
+
this._group.eachLayer(function (layer) {
L.DomUtil.removeClass(layer.getElement(), 'collected');
layer.deselect();
});
+
this._removeToolbar();
+
if (e) {
L.DomEvent.stopPropagation(e);
}
},
_unlockGroup: function _unlockGroup() {
var _this = this;
+
if (!this.hasTool(L.UnlockAction)) {
return;
}
+
this._group.eachLayer(function (layer) {
if (_this._group.isCollected(layer)) {
var edit = layer.editing;
- edit._unlock();
- // unlock updates the layer's handles; deselect to ensure they're hidden
+
+ edit._unlock(); // unlock updates the layer's handles; deselect to ensure they're hidden
+
+
layer.deselect();
}
});
},
_lockGroup: function _lockGroup() {
var _this2 = this;
+
if (!this.hasTool(L.LockAction)) {
return;
}
+
this._group.eachLayer(function (layer) {
if (_this2._group.isCollected(layer)) {
var edit = layer.editing;
- edit._lock();
- // map.addLayer also deselects the image, so we reselect here
+
+ edit._lock(); // map.addLayer also deselects the image, so we reselect here
+
+
L.DomUtil.addClass(layer.getElement(), 'collected');
}
});
},
_addCollections: function _addCollections(e) {
var _this3 = this;
+
var box = e.boxCollectBounds;
var map = this._group._map;
+
this._group.eachLayer(function (layer) {
var edit = layer.editing;
+
if (layer.isSelected()) {
layer.deselect();
}
+
var zoom = map.getZoom();
var center = map.getCenter();
var imgBounds = L.latLngBounds(layer.getCorner(2), layer.getCorner(1));
imgBounds = map._latLngBoundsToNewLayerBounds(imgBounds, zoom, center);
+
if (box.intersects(imgBounds) && edit.enabled()) {
if (!_this3.toolbar) {
_this3._addToolbar();
}
+
L.DomUtil.addClass(layer.getElement(), 'collected');
}
});
},
_removeGroup: function _removeGroup(e) {
var _this4 = this;
+
if (!this.hasTool(L.DeleteAction)) {
return;
}
+
var layersToRemove = this._group._toRemove();
+
var n = layersToRemove.length;
+
if (n === 0) {
return;
}
+
var choice = L.DomUtil.confirmDeletes(n);
+
if (choice) {
layersToRemove.forEach(function (layer) {
_this4._group.removeLayer(layer);
});
+
if (!this._group.anyCollected()) {
this._removeToolbar();
}
}
+
if (e) {
L.DomEvent.stopPropagation(e);
}
@@ -1315,14 +1481,17 @@ L.DistortableCollection.Edit = L.Handler.extend({
if (!this.customCollection) {
this._exportOpts.collection = undefined;
}
+
clearInterval(this.updateInterval);
},
_addToolbar: function _addToolbar() {
var group = this._group;
var map = group._map;
+
if (group.options.suppressToolbar || this.toolbar) {
return;
}
+
this.toolbar = L.distortableImage.controlBar({
actions: this.editActions,
position: 'topleft'
@@ -1330,6 +1499,7 @@ L.DistortableCollection.Edit = L.Handler.extend({
},
_removeToolbar: function _removeToolbar() {
var map = this._group._map;
+
if (this.toolbar) {
map.removeLayer(this.toolbar);
this.toolbar = false;
@@ -1345,18 +1515,25 @@ L.DistortableCollection.Edit = L.Handler.extend({
addTool: function addTool(value) {
if (value.baseClass === 'leaflet-toolbar-icon' && !this.hasTool(value)) {
this._removeToolbar();
+
this.editActions.push(value);
+
this._addToolbar();
}
+
return this;
},
removeTool: function removeTool(value) {
var _this5 = this;
+
this.editActions.some(function (item, idx) {
if (_this5.editActions[idx] === value) {
_this5._removeToolbar();
+
_this5.editActions.splice(idx, 1);
+
_this5._addToolbar();
+
return true;
} else {
return false;
@@ -1366,51 +1543,54 @@ L.DistortableCollection.Edit = L.Handler.extend({
},
startExport: function startExport() {
var _this6 = this;
+
if (!this.hasTool(L.ExportAction)) {
return;
}
+
return new Promise(function (resolve) {
var opts = _this6._exportOpts;
opts.resolve = resolve; // allow resolving promise in user-defined functions, to stop spinner on completion
var statusUrl;
- _this6.updateInterval = null;
+ _this6.updateInterval = null; // this may be overridden to update the UI to show export progress or completion
- // this may be overridden to update the UI to show export progress or completion
var _defaultUpdater = function _defaultUpdater(data) {
- data = JSON.parse(data);
- // optimization: fetch status directly from google storage:
+ data = JSON.parse(data); // optimization: fetch status directly from google storage:
+
if (data.status_url) {
if (statusUrl !== data.status_url && data.status_url.match('.json')) {
// if (data.status_url && data.status_url.substr(0,1) === "/") {
// opts.statusUrl = opts.statusUrl + data.status_url;
// } else {
- statusUrl = data.status_url;
- // }
+ statusUrl = data.status_url; // }
}
if (data.status === 'complete') {
clearInterval(_this6.updateInterval);
+
if (!_this6.customCollection) {
_this6._exportOpts.collection = undefined;
}
+
resolve();
+
if (data.jpg !== null) {
alert('Export succeeded. ' + opts.exportUrl + data.jpg);
}
- }
-
- // TODO: update to clearInterval when status == "failed" if we update that in this file:
+ } // TODO: update to clearInterval when status == "failed" if we update that in this file:
// https://github.com/publiclab/mapknitter-exporter/blob/main/lib/mapknitterExporter.rb
+
+
console.log(data);
}
- };
-
- // receives the URL of status.json, and starts running the updater to repeatedly fetch from status.json;
+ }; // receives the URL of status.json, and starts running the updater to repeatedly fetch from status.json;
// this may be overridden to integrate with any UI
+
+
var _defaultHandleStatusRes = function _defaultHandleStatusRes(data) {
- statusUrl = opts.statusUrl + data;
- // repeatedly fetch the status.json
+ statusUrl = opts.statusUrl + data; // repeatedly fetch the status.json
+
_this6.updateInterval = setInterval(function () {
var reqOpts = {
method: 'GET'
@@ -1422,9 +1602,9 @@ L.DistortableCollection.Edit = L.Handler.extend({
}
}).then(opts.updater);
}, opts.frequency);
- };
+ }; // initiate the export
+
- // initiate the export
var _defaultFetchStatusUrl = function _defaultFetchStatusUrl(mergedOpts) {
var form = new FormData();
form.append('collection', JSON.stringify(mergedOpts.collection));
@@ -1440,15 +1620,18 @@ L.DistortableCollection.Edit = L.Handler.extend({
return res.text();
}
}).then(mergedOpts.handleStatusRes);
- };
+ }; // If the user has passed collection property
+
- // If the user has passed collection property
_this6.customCollection = !!opts.collection;
+
if (!_this6.customCollection) {
opts.collection = _this6._group.generateExportJson().images;
}
+
opts.frequency = opts.frequency || 3000;
opts.scale = opts.scale || 100; // switch it to _getAvgCmPerPixel !
+
opts.updater = opts.updater || _defaultUpdater;
opts.handleStatusRes = opts.handleStatusRes || _defaultHandleStatusRes;
opts.fetchStatusUrl = opts.fetchStatusUrl || _defaultFetchStatusUrl;
@@ -1456,6 +1639,7 @@ L.DistortableCollection.Edit = L.Handler.extend({
});
}
});
+
L.distortableCollection.edit = function (group, options) {
return new L.DistortableCollection.Edit(group, options);
};
@@ -1468,9 +1652,8 @@ L.distortableCollection.edit = function (group, options) {
\*******************************************/
/***/ (function() {
-L.DistortableImage = L.DistortableImage || {};
+L.DistortableImage = L.DistortableImage || {}; // holds the keybindings & toolbar API for an individual image instance
-// holds the keybindings & toolbar API for an individual image instance
L.DistortableImage.Edit = L.Handler.extend({
options: {
opacity: 0.5,
@@ -1487,47 +1670,60 @@ L.DistortableImage.Edit = L.Handler.extend({
L.setOptions(this, options);
L.distortableImage.action_map.Escape = '_deselect';
},
- /* Run on image selection. */addHooks: function addHooks() {
+
+ /* Run on image selection. */
+ addHooks: function addHooks() {
var overlay = this._overlay;
this.editActions = this.options.actions;
-
/* bring the selected image into view */
+
overlay.bringToFront();
+
this._initModes();
+
this._initHandles();
+
this._appendHandlesandDragable();
+
if (overlay.isSelected() && !overlay.options.suppressToolbar) {
this._addToolbar();
}
+
this.parentGroup = overlay.eP ? overlay.eP : false;
L.DomEvent.on(overlay.getElement(), {
dblclick: this.nextMode
}, this);
L.DomEvent.on(window, 'keydown', this._onKeyDown, this);
},
- /* Run on image deselection. */removeHooks: function removeHooks() {
+
+ /* Run on image deselection. */
+ removeHooks: function removeHooks() {
var overlay = this._overlay;
- var eP = this.parentGroup;
+ var eP = this.parentGroup; // First, check if dragging exists - it may be off due to locking
- // First, check if dragging exists - it may be off due to locking
this._disableDragging();
+
if (this.toolbar) {
this._removeToolbar();
}
+
for (var handle in this._handles) {
L.DomUtil.remove(handle);
}
-
/**
* ensures if you disable an image while it is multi-selected
* additional deselection logic is run
*/
+
+
if (L.DomUtil.hasClass(overlay.getElement(), 'collected')) {
L.DomUtil.removeClass(overlay.getElement(), 'collected');
}
+
if (eP && !eP.anyCollected() && eP.editing.toolbar) {
eP.editing._removeToolbar();
}
+
L.DomEvent.off(overlay.getElement(), {
dblclick: this.nextMode
}, this);
@@ -1537,24 +1733,27 @@ L.DistortableImage.Edit = L.Handler.extend({
if (!this._enabled) {
return this;
}
+
this._overlay.deselect();
+
this._enabled = false;
this.removeHooks();
return this;
},
_initModes: function _initModes() {
- this._modes = {};
- // passed from L.DistortablImage.PopupBar. If the mode is one
+ this._modes = {}; // passed from L.DistortablImage.PopupBar. If the mode is one
// of the current toolbar actions, adds it to this._modes
+
for (var mode in L.DistortableImage.Edit.MODES) {
var action = L.DistortableImage.Edit.MODES[mode];
+
if (this.editActions.indexOf(action) !== -1) {
this._modes[mode] = action;
}
- }
-
- // sets the current mode to the 1st available one if the one selected
+ } // sets the current mode to the 1st available one if the one selected
// during initialization is not available
+
+
if (!this._modes[this._mode]) {
this._mode = Object.keys(this._modes)[0];
}
@@ -1563,33 +1762,44 @@ L.DistortableImage.Edit = L.Handler.extend({
var overlay = this._overlay;
var i;
this._dragHandles = L.layerGroup();
+
for (i = 0; i < 4; i++) {
this._dragHandles.addLayer(L.dragHandle(overlay, i));
}
+
this._scaleHandles = L.layerGroup();
+
for (i = 0; i < 4; i++) {
this._scaleHandles.addLayer(L.scaleHandle(overlay, i));
}
+
this._distortHandles = L.layerGroup();
+
for (i = 0; i < 4; i++) {
this._distortHandles.addLayer(L.distortHandle(overlay, i));
}
+
this._rotateHandles = L.layerGroup(); // individual rotate
+
for (i = 0; i < 4; i++) {
this._rotateHandles.addLayer(L.rotateHandle(overlay, i));
- }
+ } // handle includes rotate AND scale
+
- // handle includes rotate AND scale
this._freeRotateHandles = L.layerGroup();
+
for (i = 0; i < 4; i++) {
this._freeRotateHandles.addLayer(L.freeRotateHandle(overlay, i));
}
+
this._lockHandles = L.layerGroup();
+
for (i = 0; i < 4; i++) {
this._lockHandles.addLayer(L.lockHandle(overlay, i, {
draggable: false
}));
}
+
this._handles = {
drag: this._dragHandles,
scale: this._scaleHandles,
@@ -1600,22 +1810,26 @@ L.DistortableImage.Edit = L.Handler.extend({
};
},
_appendHandlesandDragable: function _appendHandlesandDragable() {
- var ov = this._overlay;
+ var ov = this._overlay; // won't throw error if user adds 0 mode actions to toolbar
- // won't throw error if user adds 0 mode actions to toolbar
if (!this._mode) {
this._enableDragging();
+
return;
}
+
this._updateHandle();
+
if (!ov.isSelected() && this.currentHandle) {
this.currentHandle.eachLayer(function (handle) {
handle.setOpacity(0);
+
if (handle.dragging) {
handle.dragging.disable();
}
});
}
+
if (!this.isMode('lock')) {
this._enableDragging();
}
@@ -1625,9 +1839,11 @@ L.DistortableImage.Edit = L.Handler.extend({
var handlerName = keymap[e.key];
var ov = this._overlay;
var eP = this.parentGroup;
+
if (eP && eP.anyCollected()) {
return;
}
+
if (this[handlerName] !== undefined && !ov.options.suppressToolbar) {
if (ov.isSelected() && this.toolbar) {
this[handlerName].call(this);
@@ -1636,22 +1852,29 @@ L.DistortableImage.Edit = L.Handler.extend({
},
replaceTool: function replaceTool(old, next) {
var _this = this;
+
if (next.baseClass !== 'leaflet-toolbar-icon' || this.hasTool(next)) {
return this;
}
+
this.editActions.some(function (item, idx) {
if (item === old) {
_this._removeToolbar();
+
_this.editActions[idx] = next;
+
_this._addToolbar();
+
for (var mode in L.DistortableImage.Edit.MODES) {
if (L.DistortableImage.Edit.MODES[mode] === old) {
delete _this._modes[mode];
+
_this._nextOrNone(mode);
} else if (L.DistortableImage.Edit.MODES[mode] === next) {
_this._modes[mode] = next;
}
}
+
return true;
}
});
@@ -1660,17 +1883,22 @@ L.DistortableImage.Edit = L.Handler.extend({
addTool: function addTool(value) {
if (value.baseClass === 'leaflet-toolbar-icon' && !this.hasTool(value)) {
this._removeToolbar();
+
this.editActions.push(value);
+
this._addToolbar();
+
for (var mode in L.DistortableImage.Edit.MODES) {
if (L.DistortableImage.Edit.MODES[mode] === value) {
this._modes[mode] = value;
}
}
+
if (!this._overlay.isSelected()) {
this._removeToolbar();
}
}
+
return this;
},
hasTool: function hasTool(value) {
@@ -1680,23 +1908,31 @@ L.DistortableImage.Edit = L.Handler.extend({
},
removeTool: function removeTool(value) {
var _this2 = this;
+
this.editActions.some(function (item, idx) {
if (item === value) {
_this2._removeToolbar();
+
_this2.editActions.splice(idx, 1);
+
_this2._addToolbar();
+
for (var mode in L.DistortableImage.Edit.MODES) {
if (L.DistortableImage.Edit.MODES[mode] === value) {
delete _this2._modes[mode];
+
_this2._nextOrNone(mode);
}
}
+
return true;
}
});
+
if (!this._overlay.isSelected()) {
this._removeToolbar();
}
+
return this;
},
// set the mode to the next mode or if that was the last one set mode to ''
@@ -1708,7 +1944,9 @@ L.DistortableImage.Edit = L.Handler.extend({
if (mode === 'lock') {
this._enableDragging();
}
+
this._mode = '';
+
this._updateHandle();
}
}
@@ -1716,6 +1954,7 @@ L.DistortableImage.Edit = L.Handler.extend({
_removeToolbar: function _removeToolbar() {
var ov = this._overlay;
var map = ov._map;
+
if (this.toolbar) {
map.removeLayer(this.toolbar);
this.toolbar = false;
@@ -1723,36 +1962,43 @@ L.DistortableImage.Edit = L.Handler.extend({
},
_enableDragging: function _enableDragging() {
var _this3 = this;
+
var overlay = this._overlay;
var map = overlay._map;
this.dragging = new L.Draggable(overlay.getElement());
this.dragging.enable();
-
/* Hide toolbars and markers while dragging; click will re-show it */
+
this.dragging.on('dragstart', function () {
overlay.fire('dragstart');
+
_this3._removeToolbar();
});
-
/*
* Adjust default behavior of L.Draggable, which overwrites the CSS3
* distort transformations that we set when it calls L.DomUtil.setPosition.
*/
+
this.dragging._updatePosition = function () {
var topLeft = overlay.getCorner(0);
+
var delta = this._newPos.subtract(map.latLngToLayerPoint(topLeft));
+
var currentPoint;
var corners = {};
var i;
this.fire('predrag');
+
for (i = 0; i < 4; i++) {
currentPoint = map.latLngToLayerPoint(overlay.getCorner(i));
corners[i] = map.layerPointToLatLng(currentPoint.add(delta));
}
+
overlay.setCorners(corners);
overlay.fire('drag');
this.fire('drag');
};
+
this.dragging.on('dragend', function () {
overlay.fire('dragend');
});
@@ -1787,34 +2033,44 @@ L.DistortableImage.Edit = L.Handler.extend({
},
_toggleOpacity: function _toggleOpacity() {
var image = this._overlay.getElement();
+
if (!this.hasTool(L.OpacityAction)) {
return;
}
+
this._transparent = !this._transparent;
var opacity = this._transparent ? this.options.opacity : 1;
L.DomUtil.setOpacity(image, opacity);
image.setAttribute('opacity', opacity);
+
this._refresh();
},
_setOpacities: function _setOpacities(o) {
var image = this._overlay.getElement();
+
this._opacity = o;
+
if (!this.hasTool(L.OpacitiesAction)) {
return;
}
+
this._opacity < 1 ? this._transparent = true : this._transparent = false;
L.DomUtil.setOpacity(image, this._opacity);
image.setAttribute('opacity', this._opacity);
+
this._refresh();
},
_toggleBorder: function _toggleBorder() {
var image = this._overlay.getElement();
+
if (!this.hasTool(L.BorderAction)) {
return;
}
+
this._outlined = !this._outlined;
var outline = this._outlined ? this.options.outline : 'none';
image.style.outline = outline;
+
this._refresh();
},
// compare this to using overlay zIndex
@@ -1828,14 +2084,19 @@ L.DistortableImage.Edit = L.Handler.extend({
_removeOverlay: function _removeOverlay() {
var ov = this._overlay;
var eP = this.parentGroup;
+
if (this.isMode('lock') || !this.hasTool(L.DeleteAction)) {
return;
}
+
var choice = L.DomUtil.confirmDelete();
+
if (!choice) {
return;
}
+
this._removeToolbar();
+
if (eP) {
eP.removeLayer(ov);
} else {
@@ -1847,45 +2108,43 @@ L.DistortableImage.Edit = L.Handler.extend({
var overlay = this._overlay;
var map = overlay._map;
var img = overlay.getElement();
+
if (!this.hasTool(L.ExportAction)) {
return;
- }
+ } // make a new image
+
- // make a new image
var downloadable = new Image();
downloadable.id = downloadable.id || 'tempId12345';
document.body.appendChild(downloadable);
+
downloadable.onload = function onLoadDownloadableImage() {
var height = downloadable.height;
var width = downloadable.width;
var nw = map.latLngToLayerPoint(overlay.getCorner(0));
var ne = map.latLngToLayerPoint(overlay.getCorner(1));
var sw = map.latLngToLayerPoint(overlay.getCorner(2));
- var se = map.latLngToLayerPoint(overlay.getCorner(3));
-
- // I think this is to move the image to the upper left corner,
+ var se = map.latLngToLayerPoint(overlay.getCorner(3)); // I think this is to move the image to the upper left corner,
// eslint-disable-next-line max-len
// jywarren: i think we may need these or the image goes off the edge of the canvas
// jywarren: but these seem to break the distortion math...
-
// jywarren: i think it should be rejiggered so it
// finds the most negative values of x and y and then
// adds those to all coordinates
-
// nw.x -= nw.x;
// ne.x -= nw.x;
// se.x -= nw.x;
// sw.x -= nw.x;
-
// nw.y -= nw.y;
// ne.y -= nw.y;
// se.y -= nw.y;
// sw.y -= nw.y;
-
// run once warping is complete
+
downloadable.onload = function () {
L.DomUtil.remove(downloadable);
};
+
if (window && window.hasOwnProperty('warpWebGl')) {
warpWebGl(downloadable.id, [0, 0, width, 0, width, height, 0, height], [nw.x, nw.y, ne.x, ne.y, se.x, se.y, sw.x, sw.y], true // trigger download
);
@@ -1896,65 +2155,87 @@ L.DistortableImage.Edit = L.Handler.extend({
},
_stackUp: function _stackUp() {
var t = this._toggledImage;
+
if (!t || !this.hasTool(L.StackAction)) {
return;
}
+
this._toggledImage = false;
+
this._overlay.bringToFront();
+
this._refresh();
},
_stackDown: function _stackDown() {
var t = this._toggledImage;
+
if (t || !this.hasTool(L.StackAction)) {
return;
}
+
this._toggledImage = true;
+
this._overlay.bringToBack();
+
this._refresh();
},
_unlock: function _unlock() {
var ov = this._overlay;
var map = ov._map;
var eP = this.parentGroup;
+
if (!this.isMode('lock')) {
return;
}
+
if (eP && !eP.isCollected(ov) || !eP) {
if (!this.hasTool(L.LockAction)) {
return;
}
}
+
if (this.currentHandle) {
map.removeLayer(this.currentHandle);
}
+
if (ov.options.mode === 'lock' || !this.hasMode(ov.options.mode)) {
this._mode = '';
this.currentHandle = '';
} else {
this._mode = ov.options.mode;
}
+
this._updateHandle();
+
this._enableDragging();
+
this._refresh();
},
_lock: function _lock() {
var ov = this._overlay;
var map = ov._map;
var eP = this.parentGroup;
+
if (this.isMode('lock')) {
return;
}
+
if (eP && !eP.isCollected(ov) || !eP) {
if (!this.hasTool(L.LockAction)) {
return;
}
}
+
if (this.currentHandle) {
map.removeLayer(this.currentHandle);
}
+
this._mode = 'lock';
+
this._updateHandle();
+
this._disableDragging();
+
this._refresh();
},
_deselect: function _deselect() {
@@ -1962,40 +2243,49 @@ L.DistortableImage.Edit = L.Handler.extend({
},
_showMarkers: function _showMarkers(e) {
var eP = this.parentGroup;
+
if (!this.currentHandle) {
return;
- }
- // only markers we want in collect interface for now is lock
+ } // only markers we want in collect interface for now is lock
+
+
if (!this.isMode('lock') && eP && eP.anyCollected()) {
return;
}
+
this.currentHandle.eachLayer(function (handle) {
handle.setOpacity(1);
+
if (handle.dragging) {
handle.dragging.enable();
}
+
L.DomUtil.addClass(handle.getElement(), 'leaflet-interactive');
});
},
_hideMarkers: function _hideMarkers() {
var ov = this._overlay;
- var eP = this.parentGroup;
+ var eP = this.parentGroup; // workaround for race condition w/ feature group
- // workaround for race condition w/ feature group
if (!this._handles) {
this._initHandles();
}
+
if (!this.currentHandle) {
return;
}
+
if (this.isMode('lock') && eP && eP.isCollected(ov)) {
return;
}
+
this.currentHandle.eachLayer(function (handle) {
handle.setOpacity(0);
+
if (handle.dragging) {
handle.dragging.disable();
}
+
L.DomUtil.removeClass(handle.getElement(), 'leaflet-interactive');
});
},
@@ -2003,10 +2293,13 @@ L.DistortableImage.Edit = L.Handler.extend({
var ov = this._overlay;
var map = ov._map;
var mode = this.getMode();
+
if (this.currentHandle) {
map.removeLayer(this.currentHandle);
}
+
this.currentHandle = mode === '' ? '' : this._handles[mode];
+
if (this.currentHandle !== '') {
map.addLayer(this.currentHandle);
}
@@ -2014,24 +2307,28 @@ L.DistortableImage.Edit = L.Handler.extend({
_addToolbar: function _addToolbar() {
var ov = this._overlay;
var eP = this.parentGroup;
- var map = ov._map;
- // Find the topmost point on the image.
+ var map = ov._map; // Find the topmost point on the image.
+
var corners = ov.getCorners();
var maxLat = -Infinity;
+
if (eP && eP.anyCollected()) {
eP.editing._addToolbar();
+
return;
}
+
if (ov.options.suppressToolbar || this.toolbar) {
return;
}
+
for (var i = 0; i < corners.length; i++) {
if (corners[i].lat > maxLat) {
maxLat = corners[i].lat;
}
- }
+ } // Longitude is based on the centroid of the image.
+
- // Longitude is based on the centroid of the image.
var raisedPoint = ov.getCenter();
raisedPoint.lat = maxLat;
this.toolbar = L.distortableImage.popupBar(raisedPoint, {
@@ -2043,24 +2340,27 @@ L.DistortableImage.Edit = L.Handler.extend({
if (this.toolbar) {
this._removeToolbar();
}
+
this._addToolbar();
},
_updateToolbarPos: function _updateToolbarPos() {
- var overlay = this._overlay;
- // Find the topmost point on the image.
+ var overlay = this._overlay; // Find the topmost point on the image.
+
var corners = overlay.getCorners();
var toolbar = this.toolbar;
var maxLat = -Infinity;
+
if (toolbar && toolbar instanceof L.DistortableImage.PopupBar) {
for (var i = 0; i < corners.length; i++) {
if (corners[i].lat > maxLat) {
maxLat = corners[i].lat;
}
- }
+ } // Longitude is based on the centroid of the image.
+
- // Longitude is based on the centroid of the image.
var raisedPoint = overlay.getCenter();
raisedPoint.lat = maxLat;
+
if (!overlay.options.suppressToolbar) {
this.toolbar.setLatLng(raisedPoint);
}
@@ -2073,6 +2373,7 @@ L.DistortableImage.Edit = L.Handler.extend({
if (!this.enabled()) {
return;
}
+
return this._mode;
},
getModes: function getModes() {
@@ -2082,32 +2383,43 @@ L.DistortableImage.Edit = L.Handler.extend({
if (!this.enabled()) {
return false;
}
+
return this._mode === mode;
},
setMode: function setMode(newMode) {
var ov = this._overlay;
var eP = this.parentGroup;
var mode = this.getMode();
+
if (mode === newMode || !this.hasMode(newMode) || !this.enabled()) {
return;
}
+
if (this.toolbar) {
this.toolbar.clickTool(newMode);
}
+
if (this.isMode('lock') && !this.dragging) {
this._enableDragging();
}
+
this._mode = newMode;
+
if (this.isMode('lock')) {
this._disableDragging();
}
+
this._updateHandle();
+
this._refresh();
+
if (eP && eP.isCollected(ov)) {
ov.deselect();
}
+
return this;
},
+
/**
* need to attach a stop to img dblclick or it will propagate to
* the map and fire the handler that shows map location labels on map dblclick.
@@ -2119,15 +2431,19 @@ L.DistortableImage.Edit = L.Handler.extend({
var idx = modesArray.indexOf(mode);
var nextIdx = (idx + 1) % modesArray.length;
var newMode = modesArray[nextIdx];
+
if (e) {
if (eP && eP.anyCollected()) {
return;
}
+
L.DomEvent.stop(e);
}
+
return this.setMode(newMode);
}
});
+
L.distortableImage.edit = function (overlay, options) {
return new L.DistortableImage.Edit(overlay, options);
};
@@ -2146,6 +2462,7 @@ L.BorderAction = L.EditAction.extend({
var mode = edit._mode;
var use;
var tooltip;
+
if (edit._outlined) {
use = 'border_outer';
tooltip = overlay.options.translation.removeBorder;
@@ -2153,15 +2470,15 @@ L.BorderAction = L.EditAction.extend({
use = 'border_clear';
tooltip = overlay.options.translation.addBorder;
}
+
options = options || {};
options.toolbarIcon = {
svg: true,
html: use,
tooltip: tooltip,
className: mode === 'lock' ? 'disabled' : ''
- };
+ }; // conditional for disabling keybindings for this action when the image is locked.
- // conditional for disabling keybindings for this action when the image is locked.
L.DistortableImage.action_map.b = mode === 'lock' ? '' : '_toggleBorder';
L.EditAction.prototype.initialize.call(this, map, overlay, options);
},
@@ -2169,6 +2486,7 @@ L.BorderAction = L.EditAction.extend({
var edit = this._overlay.editing;
L.IconUtil.toggleXlink(this._link, 'border_clear', 'border_outer');
L.IconUtil.toggleTitle(this._link, 'Remove Border', 'Add Border');
+
edit._toggleBorder();
}
});
@@ -2190,14 +2508,16 @@ L.DeleteAction = L.EditAction.extend({
* we can tell whether the overlay is an instance of `L.DistortableImageOverlay` or `L.DistortableCollection` bc only
* the former should have `parentGroup` defined on it. From there we call the apporpriate keybindings and methods.
*/
+
if (edit instanceof L.DistortableImage.Edit) {
- tooltip = overlay.options.translation.deleteImage;
- // backspace windows / delete mac
+ tooltip = overlay.options.translation.deleteImage; // backspace windows / delete mac
+
L.DistortableImage.action_map.Backspace = edit._mode === 'lock' ? '' : '_removeOverlay';
} else {
tooltip = overlay.options.translation.deleteImages;
L.DistortableImage.group_action_map.Backspace = edit._mode === 'lock' ? '' : '_removeGroup';
}
+
options = options || {};
options.toolbarIcon = {
svg: true,
@@ -2209,6 +2529,7 @@ L.DeleteAction = L.EditAction.extend({
},
addHooks: function addHooks() {
var edit = this._overlay.editing;
+
if (edit instanceof L.DistortableImage.Edit) {
edit._removeOverlay();
} else {
@@ -2239,6 +2560,7 @@ L.DistortAction = L.EditAction.extend({
},
addHooks: function addHooks() {
var edit = this._overlay.editing;
+
edit._distortMode();
}
});
@@ -2265,6 +2587,7 @@ L.DragAction = L.EditAction.extend({
},
addHooks: function addHooks() {
var edit = this._overlay.editing;
+
edit._dragMode();
}
});
@@ -2294,10 +2617,12 @@ L.EditAction = L.Toolbar2.Action.extend({
this._map = map;
L.setOptions(this, options);
L.Toolbar2.Action.prototype.initialize.call(this, options);
+
this._injectIconSet();
},
_createIcon: function _createIcon(toolbar, container, args) {
var _this = this;
+
var iconOptions = this.options.toolbarIcon;
var className = iconOptions.className;
var edit = this._overlay.editing;
@@ -2305,45 +2630,58 @@ L.EditAction = L.Toolbar2.Action.extend({
this.toolbar = toolbar;
this._icon = L.DomUtil.create('li', '', container);
this._link = L.DomUtil.create('a', '', this._icon);
+
if (iconOptions.svg) {
this._link.innerHTML = L.IconUtil.create(iconOptions.html);
} else {
this._link.innerHTML = iconOptions.html;
}
+
this._link.setAttribute('href', '#');
+
this._link.setAttribute('title', iconOptions.tooltip);
+
if (style) {
this._link.setAttribute('style', style);
}
+
;
+
this._link.setAttribute('role', 'button');
+
L.DomUtil.addClass(this._link, this.constructor.baseClass);
+
if (className) {
L.DomUtil.addClass(this._link, className);
+
if (className === 'disabled') {
L.DomUtil.addClass(this._icon, className);
}
+
if (className === edit._mode) {
L.DomUtil.addClass(this._link, 'selected-mode');
} else {
L.DomUtil.removeClass(this._link, 'selected-mode');
}
}
+
L.DomEvent.on(this._link, 'click', this.enable, this);
L.DomEvent.on(this._overlay, 'update', function () {
var match = _this._link.innerHTML.match(/xlink:href="#restore"/);
+
if (match && match.length === 1) {
_this._enableAction();
}
});
-
/* Add secondary toolbar */
+
this._addSubToolbar(toolbar, this._icon, args);
},
_injectIconSet: function _injectIconSet() {
if (document.querySelector('#iconset')) {
return;
}
+
var el = document.createElement('div');
el.id = 'iconset';
el.setAttribute('hidden', 'hidden');
@@ -2359,6 +2697,7 @@ L.EditAction = L.Toolbar2.Action.extend({
L.DomUtil.addClass(this._link, 'disabled');
}
});
+
L.editAction = function (map, overlay, options) {
return new L.EditAction(map, overlay, options);
};
@@ -2379,6 +2718,7 @@ L.ExportAction = L.EditAction.extend({
this.isExporting = false;
this.mouseLeaveSkip = true;
this.isHooksExecuted = false;
+
if (edit instanceof L.DistortableImage.Edit) {
L.DistortableImage.action_map.e = '_getExport';
tooltip = overlay.options.translation.exportImage;
@@ -2386,6 +2726,7 @@ L.ExportAction = L.EditAction.extend({
L.DistortableImage.group_action_map.e = 'runExporter';
tooltip = overlay.options.translation.exportImages;
}
+
options = options || {};
options.toolbarIcon = {
svg: true,
@@ -2396,17 +2737,20 @@ L.ExportAction = L.EditAction.extend({
},
addHooks: function addHooks() {
var edit = this._overlay.editing;
+
if (edit instanceof L.DistortableImage.Edit) {
edit._getExport();
+
return;
- }
+ } // Make sure that addHooks is executed only once, event listeners will handle the rest
+
- // Make sure that addHooks is executed only once, event listeners will handle the rest
if (this.isHooksExecuted) {
return;
} else {
this.isHooksExecuted = true;
}
+
var exportTool = this._link.parentElement;
this.mouseEnterHandler = this.handleMouseEnter.bind(this);
this.mouseLeaveHandler = this.handleMouseLeave.bind(this);
@@ -2424,6 +2768,7 @@ L.ExportAction = L.EditAction.extend({
if (this.mouseLeaveSkip) {
return;
}
+
this.resetState();
this.detachMouseEventListeners(exportTool);
edit.cancelExport();
@@ -2492,6 +2837,7 @@ L.FreeRotateAction = L.EditAction.extend({
},
addHooks: function addHooks() {
var edit = this._overlay.editing;
+
edit._freeRotateMode();
}
});
@@ -2518,6 +2864,7 @@ L.GeolocateAction = L.EditAction.extend({
},
addHooks: function addHooks() {
var image = this._overlay.getElement();
+
EXIF.getData(image, L.EXIF(image));
}
});
@@ -2535,6 +2882,7 @@ L.LockAction = L.EditAction.extend({
var edit = overlay.editing;
var use;
var tooltip;
+
if (edit instanceof L.DistortableImage.Edit) {
L.DistortableImage.action_map.u = '_unlock';
L.DistortableImage.action_map.l = '_lock';
@@ -2545,6 +2893,7 @@ L.LockAction = L.EditAction.extend({
tooltip = overlay.options.translation.lockImages;
use = 'lock';
}
+
options = options || {};
options.toolbarIcon = {
svg: true,
@@ -2556,6 +2905,7 @@ L.LockAction = L.EditAction.extend({
},
addHooks: function addHooks() {
var edit = this._overlay.editing;
+
if (edit instanceof L.DistortableImage.Edit) {
edit._toggleLockMode();
} else {
@@ -2573,8 +2923,8 @@ L.LockAction = L.EditAction.extend({
/***/ (function() {
var opacities = [100, 80, 60, 40, 20, 0]; // Set numeric values from 0 to 100.
-
// Add custom CSS scripts and overwrites. Pending for better implementation of CSSStyleSheet in browsers.
+
var subtoolbarCss = new CSSStyleSheet();
subtoolbarCss.replaceSync(".leaflet-toolbar-icon-vertical {\n box-sizing: border-box !important;\n display: block !important;\n width: 30px !important;\n height: 30px !important;\n line-height: 30px !important;\n padding: 0 !important;\n text-align: center !important;\n text-decoration: none !important;\n background-color: #fff;\n border: inset 0.5px lightgray !important;\n font-size: 12px !important;\n font-weight: bold !important;\n color:#0087A8 !important;\n float: none !important;\n margin: auto !important;\n z-index:900 !important;\n }\n ");
subtoolbarCss.insertRule(".leaflet-toolbar-1 li:first-child a {\n border-radius: 4px 4px 0px 0px !important;\n }");
@@ -2607,6 +2957,7 @@ L.OpacitiesToolbar2 = L.Toolbar2.extend({
},
appendToContainer: function appendToContainer(container) {
var baseClass = this.constructor.baseClass + '-' + this._calculateDepth();
+
var className = baseClass + ' ' + this.options.className;
var Action;
var action;
@@ -2616,23 +2967,25 @@ L.OpacitiesToolbar2 = L.Toolbar2.extend({
var m;
this._container = container;
this._ul = L.DomUtil.create('ul', className, container);
- this._ul.style.transform = this.options.style ? this.options.style : '';
-
- // Ensure that clicks, drags, etc. don't bubble up to the map.
+ this._ul.style.transform = this.options.style ? this.options.style : ''; // Ensure that clicks, drags, etc. don't bubble up to the map.
// These are the map events that the L.Draw.Polyline handler listens for.
// Note that L.Draw.Polyline listens to 'mouseup', not 'mousedown', but
// if only 'mouseup' is silenced, then the map gets stuck in a halfway
// state because it receives a 'mousedown' event and is waiting for the
// corresponding 'mouseup' event.
+
this._disabledEvents = ['click', 'mousemove', 'dblclick', 'mousedown', 'mouseup', 'touchstart'];
+
for (j = 0, m = this._disabledEvents.length; j < m; j++) {
L.DomEvent.on(this._ul, this._disabledEvents[j], L.DomEvent.stopPropagation);
}
-
/* Instantiate each toolbar action and add its corresponding toolbar icon. */
+
+
for (i = 0, l = this.options.actions.length; i < l; i++) {
Action = this._getActionConstructor(this.options.actions[i]);
action = new Action();
+
action._createIcon(this, this._ul, this._arguments);
}
}
@@ -2656,7 +3009,9 @@ L.OpacitiesAction = L.EditAction.extend({
},
addHooks: function addHooks() {
var _this = this;
+
var link = this._link;
+
if (L.DomUtil.hasClass(link, 'subtoolbar_enabled')) {
L.DomUtil.removeClass(link, 'subtoolbar_enabled');
setTimeout(function () {
@@ -2665,6 +3020,7 @@ L.OpacitiesAction = L.EditAction.extend({
} else {
L.DomUtil.addClass(link, 'subtoolbar_enabled');
}
+
;
L.IconUtil.toggleXlink(link, 'opacities', 'cancel');
L.IconUtil.toggleTitle(link, 'Make Image Transparent', 'Cancel');
@@ -2685,6 +3041,7 @@ L.OpacityAction = L.EditAction.extend({
var mode = edit._mode;
var use;
var tooltip;
+
if (edit._transparent) {
use = 'opacity_empty';
tooltip = overlay.options.translation.makeImageOpaque;
@@ -2692,6 +3049,7 @@ L.OpacityAction = L.EditAction.extend({
use = 'opacity';
tooltip = overlay.options.translation.makeImageTransparent;
}
+
options = options || {};
options.toolbarIcon = {
svg: true,
@@ -2707,6 +3065,7 @@ L.OpacityAction = L.EditAction.extend({
var link = this._link;
L.IconUtil.toggleXlink(link, 'opacity', 'opacity_empty');
L.IconUtil.toggleTitle(link, 'Make Image Transparent', 'Make Image Opaque');
+
edit._toggleOpacity();
}
});
@@ -2764,6 +3123,7 @@ L.RotateAction = L.EditAction.extend({
},
addHooks: function addHooks() {
var edit = this._overlay.editing;
+
edit._rotateMode();
}
});
@@ -2790,6 +3150,7 @@ L.ScaleAction = L.EditAction.extend({
},
addHooks: function addHooks() {
var edit = this._overlay.editing;
+
edit._scaleMode();
}
});
@@ -2807,6 +3168,7 @@ L.StackAction = L.EditAction.extend({
var edit = overlay.editing;
var use;
var tooltip;
+
if (edit._toggledImage) {
use = 'flip_to_back';
tooltip = overlay.options.translation.stackToFront;
@@ -2814,6 +3176,7 @@ L.StackAction = L.EditAction.extend({
use = 'flip_to_front';
tooltip = overlay.options.translation.stackToBack;
}
+
options = options || {};
options.toolbarIcon = {
svg: true,
@@ -2829,6 +3192,7 @@ L.StackAction = L.EditAction.extend({
var edit = this._overlay.editing;
L.IconUtil.toggleXlink(this._link, 'flip_to_front', 'flip_to_back');
L.IconUtil.toggleTitle(this._link, 'Stack to Front', 'Stack to Back');
+
edit._toggleOrder();
}
});
@@ -2854,6 +3218,7 @@ L.UnlockAction = L.EditAction.extend({
},
addHooks: function addHooks() {
var edit = this._overlay.editing;
+
edit._unlockGroup();
}
});
@@ -2872,37 +3237,38 @@ L.EXIF = function getEXIFdata(img) {
console.log(EXIF.getAllTags(img));
var GPS = EXIF.getAllTags(img);
var altitude;
-
/* If the lat/lng is available. */
+
if (typeof GPS.GPSLatitude !== 'undefined' && typeof GPS.GPSLongitude !== 'undefined') {
// sadly, encoded in [degrees,minutes,seconds]
// primitive value = GPS.GPSLatitude[x].numerator
var lat = GPS.GPSLatitude[0] + GPS.GPSLatitude[1] / 60 + GPS.GPSLatitude[2] / 3600;
var lng = GPS.GPSLongitude[0] + GPS.GPSLongitude[1] / 60 + GPS.GPSLongitude[2] / 3600;
+
if (GPS.GPSLatitudeRef !== 'N') {
lat = lat * -1;
}
+
if (GPS.GPSLongitudeRef === 'W') {
lng = lng * -1;
}
- }
-
- // Attempt to use GPS compass heading; will require
+ } // Attempt to use GPS compass heading; will require
// some trig to calc corner points, which you can find below:
- var angle = 0;
- // "T" refers to "True north", so -90.
+
+ var angle = 0; // "T" refers to "True north", so -90.
+
if (GPS.GPSImgDirectionRef === 'T') {
- angle = Math.PI / 180 * (GPS.GPSImgDirection.numerator / GPS.GPSImgDirection.denominator - 90);
- // "M" refers to "Magnetic north"
+ angle = Math.PI / 180 * (GPS.GPSImgDirection.numerator / GPS.GPSImgDirection.denominator - 90); // "M" refers to "Magnetic north"
} else if (GPS.GPSImgDirectionRef === 'M') {
angle = Math.PI / 180 * (GPS.GPSImgDirection.numerator / GPS.GPSImgDirection.denominator - 90);
} else {
console.log('No compass data found');
}
- console.log('Orientation:', GPS.Orientation);
+ console.log('Orientation:', GPS.Orientation);
/* If there is orientation data -- i.e. landscape/portrait etc */
+
if (GPS.Orientation === 6) {
// CCW
angle += Math.PI / 180 * -90;
@@ -2913,8 +3279,9 @@ L.EXIF = function getEXIFdata(img) {
// 180
angle += Math.PI / 180 * 180;
}
-
/* If there is altitude data */
+
+
if (typeof GPS.GPSAltitude !== 'undefined' && typeof GPS.GPSAltitudeRef !== 'undefined') {
// Attempt to use GPS altitude:
// (may eventually need to find EXIF field of view for correction)
@@ -2941,8 +3308,7 @@ L.DistortHandle = L.EditHandle.extend({
options: {
TYPE: 'distort',
icon: L.icon({
- iconUrl:
- // eslint-disable-next-line max-len
+ iconUrl: // eslint-disable-next-line max-len
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAklEQVR4AewaftIAAAChSURBVO3BIU4DURgGwNkvL2B6AkQTLBqP4QCoSm7DDXoBLBZHDbfgICAIZjEV3YTn9uVHdMZZtcnCfI13bIzxg0emg6Nm6QVbYz3jylEsXRrvwommb49X67jFkz80fR9Mb1YxTzqiWBSLYlEsikWxKBbFolgUi2JRLIpFsSgWxaJY03fHHOu40dH07bAzWCx9Ge/TiWbpHgdsjPGNB2f/yS+7xRCyiiZPJQAAAABJRU5ErkJggg==',
iconSize: [32, 32],
iconAnchor: [16, 16]
@@ -2956,6 +3322,7 @@ L.DistortHandle = L.EditHandle.extend({
this.setLatLng(this._handled.getCorner(this._corner));
}
});
+
L.distortHandle = function (overlay, idx, options) {
return new L.DistortHandle(overlay, idx, options);
};
@@ -2988,6 +3355,7 @@ L.DragHandle = L.EditHandle.extend({
this.setLatLng(this._handled.getCorner(this._corner));
}
});
+
L.dragHandle = function (overlay, idx, options) {
return new L.DragHandle(overlay, idx, options);
};
@@ -3010,18 +3378,23 @@ L.EditHandle = L.Marker.extend({
draggable: true,
zIndexOffset: 10
};
+
if (options && options.hasOwnProperty('draggable')) {
markerOptions.draggable = options.draggable;
}
+
L.Marker.prototype.initialize.call(this, latlng, markerOptions);
},
onAdd: function onAdd(map) {
L.Marker.prototype.onAdd.call(this, map);
+
this._bindListeners();
+
this.updateHandle();
},
onRemove: function onRemove(map) {
this._unbindListeners();
+
L.Marker.prototype.onRemove.call(this, map);
},
_onHandleDragStart: function _onHandleDragStart() {
@@ -3032,6 +3405,7 @@ L.EditHandle = L.Marker.extend({
},
_fireEdit: function _fireEdit() {
this._handled.edited = true;
+
this._handled.fire('edit');
},
_bindListeners: function _bindListeners() {
@@ -3041,7 +3415,9 @@ L.EditHandle = L.Marker.extend({
drag: this._onHandleDrag,
dragend: this._onHandleDragEnd
}, this);
+
this._handled._map.on('zoomend', this.updateHandle, this);
+
this._handled.on('update', this.updateHandle, this);
},
_unbindListeners: function _unbindListeners() {
@@ -3051,25 +3427,36 @@ L.EditHandle = L.Marker.extend({
drag: this._onHandleDrag,
dragend: this._onHandleDragEnd
}, this);
+
this._handled._map.off('zoomend', this.updateHandle, this);
+
this._handled.off('update', this.updateHandle, this);
},
- /* Takes two latlngs and calculates the scaling difference. */_calculateScalingFactor: function _calculateScalingFactor(latlngA, latlngB) {
+
+ /* Takes two latlngs and calculates the scaling difference. */
+ _calculateScalingFactor: function _calculateScalingFactor(latlngA, latlngB) {
var overlay = this._handled;
var map = overlay._map;
var centerPoint = map.latLngToLayerPoint(overlay.getCenter());
var formerPoint = map.latLngToLayerPoint(latlngA);
var newPoint = map.latLngToLayerPoint(latlngB);
+
var formerRadiusSquared = this._d2(centerPoint, formerPoint);
+
var newRadiusSquared = this._d2(centerPoint, newPoint);
+
return Math.sqrt(newRadiusSquared / formerRadiusSquared);
},
- /* Distance between two points in cartesian space, squared (distance formula). */_d2: function _d2(a, b) {
+
+ /* Distance between two points in cartesian space, squared (distance formula). */
+ _d2: function _d2(a, b) {
var dx = a.x - b.x;
var dy = a.y - b.y;
return Math.pow(dx, 2) + Math.pow(dy, 2);
},
- /* Takes two latlngs and calculates the angle between them. */calculateAngleDelta: function calculateAngleDelta(latlngA, latlngB) {
+
+ /* Takes two latlngs and calculates the angle between them. */
+ calculateAngleDelta: function calculateAngleDelta(latlngA, latlngB) {
var overlay = this._handled;
var map = overlay._map;
var centerPoint = map.latLngToLayerPoint(overlay.getCenter());
@@ -3093,8 +3480,7 @@ L.FreeRotateHandle = L.EditHandle.extend({
options: {
TYPE: 'freeRotate',
icon: L.icon({
- iconUrl:
- // eslint-disable-next-line max-len
+ iconUrl: // eslint-disable-next-line max-len
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAklEQVR4AewaftIAAAHiSURBVMXBa3HbShgA0PMp/1sCCo8oCEpgTaCXgIXAJiDzyCJoAUTm4UVQAns1Y8+snWnTvJyeE16hkjDgDrfoNTMKcpC9UPiLSo8JyetkjEHxjPCMyoS199kFoz8Iv1HpMaN3qWDCHoegOKkkRwnJpRmroHgiPFEZ8IBekzEGxQtUEhKSS/fB7Ew4U+lxcGkVZG9QWWPSFAxBcdK59KApuA+yNwp2uEdx1GN25sZJZULSfAtm77SlbNjju6MvG75u+WHRWVR6rDVjMPsgwYyVZl3pLTpHkyYHOx8syMiayaJzlDTZ9YyaZNFVkiYH2ZUEBcVJJXVImuz6Js3Qofe59pq7DoOTILu+g+a288mCouk7/1iH4qTS+2QdDppbV1ZJmrnDXnPnc5UOs2Z0fUmTuyBr+krvSioJyUmQO0dZM7mepMkWnaNRkyrJB6uskTSjxY3Fll8bvmJwlDb83FJ8gMqAB80uyBY3Trb82PAfvjj6vuHnluIdKgMeNXOwctK5NKBoHitrb1RJeHRp5Ux4ojLg0aWMHGQvUOkxIWkKVsHsTPiNSo8HDC5lZIsgO6n0uMUdRvQuFQxB8UR4RmXC2vvsgtEfhL+o9JiQvE7GGBTPCK9QSUjoMWgKDthjDrIX+h/k0I7gth6N5gAAAABJRU5ErkJggg==',
iconSize: [32, 32],
iconAnchor: [16, 16]
@@ -3106,20 +3492,27 @@ L.FreeRotateHandle = L.EditHandle.extend({
var formerLatLng = overlay.getCorner(this._corner);
var newLatLng = this.getLatLng();
var angle = this.calculateAngleDelta(formerLatLng, newLatLng);
+
var scale = this._calculateScalingFactor(formerLatLng, newLatLng);
+
if (angle !== 0) {
overlay.rotateBy(angle, 'rad');
}
+
var edgeMinWidth = overlay.edgeMinWidth;
+
if (!edgeMinWidth) {
edgeMinWidth = 50;
- } /* just in case */
+ }
+ /* just in case */
+
var corner1 = map.latLngToContainerPoint(overlay.getCorner(0));
var corner2 = map.latLngToContainerPoint(overlay.getCorner(1));
var w = Math.abs(corner1.x - corner2.x);
var h = Math.abs(corner1.y - corner2.y);
var distance = Math.sqrt(w * w + h * h);
+
if (distance > edgeMinWidth || scale > 1) {
overlay.scaleBy(scale);
} else {
@@ -3130,6 +3523,7 @@ L.FreeRotateHandle = L.EditHandle.extend({
this.setLatLng(this._handled.getCorner(this._corner));
}
});
+
L.freeRotateHandle = function (overlay, idx, options) {
return new L.FreeRotateHandle(overlay, idx, options);
};
@@ -3159,7 +3553,9 @@ L.LockHandle = L.EditHandle.extend({
},
_bindListeners: function _bindListeners() {
var icon = this.getElement();
+
L.EditHandle.prototype._bindListeners.call(this);
+
L.DomEvent.on(icon, {
mousedown: this._tooltipOn,
mouseup: this._tooltipOff
@@ -3168,31 +3564,39 @@ L.LockHandle = L.EditHandle.extend({
},
_unbindListeners: function _unbindListeners() {
var icon = this.getElement();
+
L.EditHandle.prototype._bindListeners.call(this);
+
L.DomEvent.off(icon, {
mousedown: this._tooltipOn,
mouseup: this._tooltipOff
}, this);
L.DomEvent.off(document, 'pointerleave', this._tooltipOff, this);
},
- /* cannot be dragged */_onHandleDrag: function _onHandleDrag() {},
+
+ /* cannot be dragged */
+ _onHandleDrag: function _onHandleDrag() {},
updateHandle: function updateHandle() {
this.setLatLng(this._handled.getCorner(this._corner));
},
_tooltipOn: function _tooltipOn(e) {
var eP = this._handled.parentGroup;
var edit = eP ? eP.editing : this._handled.editing;
+
if (e.shiftKey) {
return;
}
+
if (!this._handled.isSelected() && eP && !eP.isCollected(this._handled)) {
return;
}
+
var handlesArr = edit._lockHandles;
this._timer = setTimeout(L.bind(function () {
if (this._timeout) {
clearTimeout(this._timeout);
}
+
if (!this.getTooltip()) {
this.bindTooltip('Locked!', {
permanent: true
@@ -3204,32 +3608,40 @@ L.LockHandle = L.EditHandle.extend({
}
});
}
+
this.openTooltip();
}, this), 500);
},
_tooltipOff: function _tooltipOff(e) {
var eP = this._handled.parentGroup;
var edit = eP ? eP.editing : this._handled.editing;
+
if (e.shiftKey) {
return;
}
+
if (!this._handled.isSelected() && eP && !eP.isCollected(this._handled)) {
return;
}
+
var handlesArr = edit._lockHandles;
+
if (e.currentTarget === document) {
handlesArr.eachLayer(function (handle) {
handle.closeTooltip();
});
}
+
if (this._timer) {
clearTimeout(this._timer);
}
+
this._timeout = setTimeout(L.bind(function () {
this.closeTooltip();
}, this), 400);
}
});
+
L.lockHandle = function (overlay, idx, options) {
return new L.LockHandle(overlay, idx, options);
};
@@ -3246,8 +3658,7 @@ L.RotateHandle = L.EditHandle.extend({
options: {
TYPE: 'rotate',
icon: L.icon({
- iconUrl:
- // eslint-disable-next-line max-len
+ iconUrl: // eslint-disable-next-line max-len
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAklEQVR4AewaftIAAAHiSURBVMXBa3HbShgA0PMp/1sCCo8oCEpgTaCXgIXAJiDzyCJoAUTm4UVQAns1Y8+snWnTvJyeE16hkjDgDrfoNTMKcpC9UPiLSo8JyetkjEHxjPCMyoS199kFoz8Iv1HpMaN3qWDCHoegOKkkRwnJpRmroHgiPFEZ8IBekzEGxQtUEhKSS/fB7Ew4U+lxcGkVZG9QWWPSFAxBcdK59KApuA+yNwp2uEdx1GN25sZJZULSfAtm77SlbNjju6MvG75u+WHRWVR6rDVjMPsgwYyVZl3pLTpHkyYHOx8syMiayaJzlDTZ9YyaZNFVkiYH2ZUEBcVJJXVImuz6Js3Qofe59pq7DoOTILu+g+a288mCouk7/1iH4qTS+2QdDppbV1ZJmrnDXnPnc5UOs2Z0fUmTuyBr+krvSioJyUmQO0dZM7mepMkWnaNRkyrJB6uskTSjxY3Fll8bvmJwlDb83FJ8gMqAB80uyBY3Trb82PAfvjj6vuHnluIdKgMeNXOwctK5NKBoHitrb1RJeHRp5Ux4ojLg0aWMHGQvUOkxIWkKVsHsTPiNSo8HDC5lZIsgO6n0uMUdRvQuFQxB8UR4RmXC2vvsgtEfhL+o9JiQvE7GGBTPCK9QSUjoMWgKDthjDrIX+h/k0I7gth6N5gAAAABJRU5ErkJggg==',
iconSize: [32, 32],
iconAnchor: [16, 16]
@@ -3258,17 +3669,18 @@ L.RotateHandle = L.EditHandle.extend({
var formerLatLng = overlay.getCorner(this._corner);
var newLatLng = this.getLatLng();
var angle = this.calculateAngleDelta(formerLatLng, newLatLng);
-
/*
* running rotation logic even for an angle delta of 0
* prevents a small, occasional marker flicker
*/
+
overlay.rotateBy(angle, 'rad');
},
updateHandle: function updateHandle() {
this.setLatLng(this._handled.getCorner(this._corner));
}
});
+
L.rotateHandle = function (overlay, idx, options) {
return new L.RotateHandle(overlay, idx, options);
};
@@ -3285,8 +3697,7 @@ L.ScaleHandle = L.EditHandle.extend({
options: {
TYPE: 'scale',
icon: L.icon({
- iconUrl:
- // eslint-disable-next-line max-len
+ iconUrl: // eslint-disable-next-line max-len
'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSI0NTkiIGhlaWdodD0iNDY0IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA1MTIgNTEyIiB4bWw6c3BhY2U9InByZXNlcnZlIiBzdHlsZT0iIj48cmVjdCBpZD0iYmFja2dyb3VuZHJlY3QiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHg9IjAiIHk9IjAiIGZpbGw9Im5vbmUiIHN0cm9rZT0ibm9uZSIgY2xhc3M9IiIgc3R5bGU9IiIvPjxnIGNsYXNzPSJjdXJyZW50TGF5ZXIiIHN0eWxlPSIiPjx0aXRsZT5MYXllciAxPC90aXRsZT48cGF0aCBkPSJNNDU5LjA0OTE1OTUzMDQ3MTM0LDg2LjkyNjIzNDUxMjU1MDAyIFYwIGgtODUuNzE0NTczMzU2MzEyMDkgdjI3LjA0MzcxNzQwMzkwNDQ1MiBIODUuNzE0NTczMzU2MzEyMDMgVjAgSDAgdjg2LjkyNjIzNDUxMjU1MDAyIGgyNS43MTQzNzIwMDY4OTM2MjYgdjI4OS43NTQxMTUwNDE4MzM0IEgwIHY4Ni45MjYyMzQ1MTI1NTAwMiBoODUuNzE0NTczMzU2MzEyMDkgdi0yNy4wNDM3MTc0MDM5MDQ0NTIgaDI4NS43MTUyNDQ1MjEwNDAzIHYyNy4wNDM3MTc0MDM5MDQ0NTIgaDg1LjcxNDU3MzM1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DIxODc5MDUyOTg5IGgzNC4yODU4MjkzNDI1MjQ4MzUgVjM3Ni42ODAzNDk1NTQzODM0NCB6IiBpZD0ic3ZnXzIiIGNsYXNzPSIiIGZpbGw9IiMxYTFhZWIiIGZpbGwtb3BhY2l0eT0iMSIvPjwvZz48L3N2Zz4=',
iconSize: [32, 32],
iconAnchor: [16, 16]
@@ -3298,21 +3709,26 @@ L.ScaleHandle = L.EditHandle.extend({
var edgeMinWidth = overlay.edgeMinWidth;
var formerLatLng = overlay.getCorner(this._corner);
var newLatLng = this.getLatLng();
- var scale = this._calculateScalingFactor(formerLatLng, newLatLng);
+ var scale = this._calculateScalingFactor(formerLatLng, newLatLng);
/*
* checks whether the "edgeMinWidth" property is set and tracks the minimum edge length;
* this enables preventing scaling to zero, but we might also add an overall scale limit
*/
+
if (!edgeMinWidth) {
edgeMinWidth = 50;
- } /* just in case */
+ }
+ /* just in case */
+
+
var corner1 = map.latLngToLayerPoint(overlay.getCorner(0));
var corner2 = map.latLngToLayerPoint(overlay.getCorner(1));
var w = Math.abs(corner1.x - corner2.x);
var h = Math.abs(corner1.y - corner2.y);
var distance = Math.sqrt(w * w + h * h);
+
if (distance > edgeMinWidth || scale > 1) {
overlay.scaleBy(scale);
/*
@@ -3327,6 +3743,7 @@ L.ScaleHandle = L.EditHandle.extend({
this.setLatLng(this._handled.getCorner(this._corner));
}
});
+
L.scaleHandle = function (overlay, idx, options) {
return new L.ScaleHandle(overlay, idx, options);
};
@@ -3343,16 +3760,17 @@ L.distortableImage = L.DistortableImage || {};
L.distortableImage = L.DistortableImage;
L.DistortableImage.group_action_map = {};
L.DistortableImage.ControlBar = L.Toolbar2.Control.extend({});
+
L.distortableImage.controlBar = function (options) {
return new L.DistortableImage.ControlBar(options);
};
-
/** addInitHooks run before onAdd */
+
+
L.DistortableCollection.addInitHook(function () {
/** Default actions */
- this.ACTIONS = [L.ExportAction, L.DeleteAction, L.LockAction, L.UnlockAction];
+ this.ACTIONS = [L.ExportAction, L.DeleteAction, L.LockAction, L.UnlockAction]; // all possible modes
- // all possible modes
L.DistortableCollection.Edit.MODES = {
lock: L.LockAction,
unlock: L.UnlockAction
@@ -3393,24 +3811,28 @@ L.DistortableImage.PopupBar = L.Toolbar2.Popup.extend({
},
clickTool: function clickTool(name) {
var tools = this.tools();
+
for (var i = 0; i < tools.length; i++) {
var tool = tools.item(i).children[0];
+
if (L.DomUtil.hasClass(tool, name)) {
tool.click();
return tool;
}
}
+
return false;
}
});
+
L.distortableImage.popupBar = function (latlng, options) {
return new L.DistortableImage.PopupBar(latlng, options);
};
+
L.DistortableImageOverlay.addInitHook(function () {
/** Default actions */
- this.ACTIONS = [L.DragAction, L.ScaleAction, L.DistortAction, L.RotateAction, L.FreeRotateAction, L.LockAction, L.OpacityAction, L.OpacitiesAction, L.BorderAction, L.ExportAction, L.DeleteAction];
+ this.ACTIONS = [L.DragAction, L.ScaleAction, L.DistortAction, L.RotateAction, L.FreeRotateAction, L.LockAction, L.OpacityAction, L.OpacitiesAction, L.BorderAction, L.ExportAction, L.DeleteAction]; // all possible modes
- // all possible modes
L.DistortableImage.Edit.MODES = {
drag: L.DragAction,
scale: L.ScaleAction,
@@ -3456,8 +3878,7 @@ L.IconSet = L.Class.extend({
/***/ (function() {
L.KeymapperIconSet = L.IconSet.extend({
- _symbols:
- // eslint-disable-next-line max-len
+ _symbols: // eslint-disable-next-line max-len
''
});
@@ -3486,11 +3907,11 @@ L.Map.mergeOptions({
boxCollector: true,
boxZoom: false
});
-
/**
* primarily Leaflet 1.5.1 source code. Overriden so that it's a collection box used with
* our `L.DistortableCollection` class instead of a zoom box.
* */
+
L.Map.BoxCollector = L.Map.BoxZoom.extend({
initialize: function initialize(map) {
this._map = map;
@@ -3525,12 +3946,14 @@ L.Map.BoxCollector = L.Map.BoxZoom.extend({
_onMouseDown: function _onMouseDown(e) {
if (!e.shiftKey || e.which !== 1 && e.button !== 1) {
return false;
- }
-
- // Clear the deferred resetState if it hasn't executed yet, otherwise it
+ } // Clear the deferred resetState if it hasn't executed yet, otherwise it
// will interrupt the interaction and orphan a box element in the container.
+
+
this._clearDeferredResetState();
+
this._resetState();
+
L.DomUtil.disableTextSelection();
L.DomUtil.disableImageDrag();
this._startPoint = this._map.mouseEventToContainerPoint(e);
@@ -3545,11 +3968,15 @@ L.Map.BoxCollector = L.Map.BoxZoom.extend({
this._moved = true;
this._box = L.DomUtil.create('div', 'leaflet-zoom-box', this._container);
L.DomUtil.addClass(this._container, 'leaflet-crosshair');
+
this._map.fire('boxzoomstart');
}
+
this._point = this._map.mouseEventToContainerPoint(e);
this._bounds = L.bounds(this._startPoint, this._point);
+
var size = this._bounds.getSize();
+
L.DomUtil.setPosition(this._box, this._bounds.min);
this._box.style.width = size.x + 'px';
this._box.style.height = size.y + 'px';
@@ -3559,6 +3986,7 @@ L.Map.BoxCollector = L.Map.BoxZoom.extend({
L.DomUtil.remove(this._box);
L.DomUtil.removeClass(this._container, 'leaflet-crosshair');
}
+
L.DomUtil.enableTextSelection();
L.DomUtil.enableImageDrag();
L.DomEvent.off(document, {
@@ -3571,21 +3999,27 @@ L.Map.BoxCollector = L.Map.BoxZoom.extend({
if (e.which !== 1 && e.button !== 1) {
return;
}
+
this._finish();
+
if (!this._moved) {
return;
- }
-
- // Postpone to next JS tick so internal click event handling
+ } // Postpone to next JS tick so internal click event handling
// still see it as "moved".
+
+
this._clearDeferredResetState();
+
this._resetStateTimeout = setTimeout(L.Util.bind(this._resetState, this), 0);
var bounds = L.latLngBounds(this._map.containerPointToLatLng(this._bounds.getBottomLeft()), this._map.containerPointToLatLng(this._bounds.getTopRight()));
+
var zoom = this._map.getZoom();
- var center = this._map.getCenter();
- // calls the `project` method but 1st updates the pixel origin - see https://github.com/publiclab/Leaflet.DistortableImage/pull/344
+ var center = this._map.getCenter(); // calls the `project` method but 1st updates the pixel origin - see https://github.com/publiclab/Leaflet.DistortableImage/pull/344
+
+
bounds = this._map._latLngBoundsToNewLayerBounds(bounds, zoom, center);
+
this._map.fire('boxcollectend', {
boxCollectBounds: bounds
});
@@ -3604,23 +4038,26 @@ L.Map.addInitHook('addHandler', 'boxCollector', L.Map.BoxCollector);
L.Map.mergeOptions({
doubleClickLabels: true
});
-
/**
* The `doubleClickLabels` handler replaces `doubleClickZoom` by default if `#addGoogleMutant`
* is used unless the options 'labels: false' or 'doubleClickZoom: false` were passed to it.
*/
+
L.Map.DoubleClickLabels = L.Map.DoubleClickZoom.extend({
enable: function enable() {
var map = this._map;
+
if (this._enabled) {
return this;
- }
+ } // disable 'doubleClickZoom' if 'doubleClickLabels' is enabled.
+
- // disable 'doubleClickZoom' if 'doubleClickLabels' is enabled.
if (map.doubleClickZoom.enabled()) {
map.doubleClickZoom.disable();
}
+
this._map.fire('singleclickon');
+
this._enabled = true;
this.addHooks();
return this;
@@ -3629,18 +4066,19 @@ L.Map.DoubleClickLabels = L.Map.DoubleClickZoom.extend({
if (!this._enabled) {
return this;
}
+
this._enabled = false;
this.removeHooks();
return this;
},
_fireIfSingle: function _fireIfSingle(e) {
var map = this._map;
- var oe = e.originalEvent;
+ var oe = e.originalEvent; // prevents deselection in case of box selector
- // prevents deselection in case of box selector
if (oe && oe.shiftKey) {
return;
}
+
map._clicked += 1;
this._map._clickTimeout = setTimeout(function () {
if (map._clicked === 1) {
@@ -3663,9 +4101,11 @@ L.Map.DoubleClickLabels = L.Map.DoubleClickZoom.extend({
map._clicked = 0;
clearTimeout(map._clickTimeout);
}, 0);
+
if (!labels) {
return;
}
+
if (labels.options.opacity === 1) {
labels.options.opacity = 0;
labels.setOpacity(0);
@@ -3706,17 +4146,18 @@ L.Map.DoubleClickZoom.include({
enable: function enable() {
if (this._enabled) {
return this;
- }
+ } // don't enable 'doubleClickZoom' unless 'doubleClickLabels' is disabled first
+
- // don't enable 'doubleClickZoom' unless 'doubleClickLabels' is disabled first
if (this._map.doubleClickLabels) {
if (this._map.doubleClickLabels.enabled()) {
return this;
}
- }
+ } // signify to collection/instance classes to turn on 'singleclick' listeners
+
- // signify to collection/instance classes to turn on 'singleclick' listeners
this._map.fire('singleclickon');
+
this._enabled = true;
this.addHooks();
return this;
@@ -3724,22 +4165,23 @@ L.Map.DoubleClickZoom.include({
disable: function disable() {
if (!this._enabled) {
return this;
- }
+ } // signify to collection/instance safe to swap 'singleclick' listeners with 'click' listeners.
+
- // signify to collection/instance safe to swap 'singleclick' listeners with 'click' listeners.
this._map.fire('singleclickoff');
+
this._enabled = false;
this.removeHooks();
return this;
},
_fireIfSingle: function _fireIfSingle(e) {
var map = this._map;
- var oe = e.originalEvent;
+ var oe = e.originalEvent; // prevents deselection in case of box selector
- // prevents deselection in case of box selector
if (oe && oe.shiftKey) {
return;
}
+
map._clicked += 1;
this._map._clickTimeout = setTimeout(function () {
if (map._clicked === 1) {
@@ -3765,12 +4207,15 @@ L.Map.DoubleClickZoom.include({
map._clicked = 0;
clearTimeout(map._clickTimeout);
}, 0);
+
if (!oe) {
return false;
}
+
var oldZoom = map.getZoom();
var delta = map.options.zoomDelta;
var zoom = oe.shiftKey ? oldZoom - delta : oldZoom + delta;
+
if (map.options.doubleClickZoom === 'center') {
map.setZoom(zoom);
} else {
@@ -3801,32 +4246,37 @@ L.Map.include({
labelOpacity: 1,
doubleClickLabels: true
}, opts);
+
if (!opts.labels) {
this.mutantOptions = L.extend(this.mutantOptions, {
labelOpacity: opts.labels ? 1 : undefined,
doubleClickLabels: opts.labels ? true : undefined
});
}
+
this._googleMutant = L.tileLayer(url, {
maxZoom: opts.maxZoom,
maxNativeZoom: opts.maxNativeZoom,
minZoom: opts.minZoom,
opacity: opts.mutantOpacity
}).addTo(this);
+
if (opts.labels) {
this._addLabels(opts);
- }
- // shouldn't have this handler at all if there are no labels to toggle
+ } // shouldn't have this handler at all if there are no labels to toggle
else {
this.doubleClickLabels = undefined;
}
+
return this;
},
_addLabels: function _addLabels(opts) {
var url = 'https://stamen-tiles-{s}.a.ssl.fastly.net/toner-labels/{z}/{x}/{y}{r}.{ext}';
+
if (opts.labelOpacity !== 0 && opts.labelOpacity !== 1) {
opts.labelOpacity = 1;
}
+
this._labels = L.tileLayer(url, {
attribution: 'Map tiles by Stamen Design, CC BY 3.0 — Map data © OpenStreetMap contributors',
subdomains: 'abcd',
@@ -3837,14 +4287,16 @@ L.Map.include({
minZoom: opts.minZoom,
ext: 'png'
}).addTo(this);
+
if (this.mutantOptions.doubleClickLabels) {
this.doubleClickLabels.enable();
}
+
return this;
}
-});
-// start off with doubleClickZoom enabled, doubleClickLabels can later be enabled instead
+}); // start off with doubleClickZoom enabled, doubleClickLabels can later be enabled instead
// during initialization
+
L.Map.addInitHook(function () {
this.doubleClickLabels.disable();
this.doubleClickZoom.enable();
@@ -3864,7 +4316,6 @@ L.DomUtil = L.extend(L.DomUtil, {
},
getMatrixString: function getMatrixString(m) {
var is3d = L.Browser.webkit3d || L.Browser.gecko3d || L.Browser.ie3d;
-
/*
* Since matrix3d takes a 4*4 matrix, we add in an empty row and column,
* which act as the identity on the z-axis.
@@ -3872,11 +4323,14 @@ L.DomUtil = L.extend(L.DomUtil, {
* http://franklinta.com/2014/09/08/computing-css-matrix3d-transforms/
* https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function#M.C3.B6bius'_homogeneous_coordinates_in_projective_geometry
*/
+
var matrix = [m[0], m[3], 0, m[6], m[1], m[4], 0, m[7], 0, 0, 1, 0, m[2], m[5], 0, m[8]];
var str = is3d ? 'matrix3d(' + matrix.join(',') + ')' : '';
+
if (!is3d) {
console.log('Your browser must support 3D CSS transforms' + 'in order to use DistortableImageOverlay.');
}
+
return str;
},
toggleClass: function toggleClass(el, className) {
@@ -3890,13 +4344,16 @@ L.DomUtil = L.extend(L.DomUtil, {
if (n === 1) {
return this.confirmDelete();
}
+
var translation = this.translation.confirmImagesDeletes;
var warningMsg = '';
+
if (typeof translation === 'function') {
warningMsg = translation(n);
} else {
warningMsg = translation;
}
+
return window.confirm(warningMsg);
}
});
@@ -3919,10 +4376,12 @@ L.IconUtil = {
if (/^#/.test(ref)) {
ref = ref.replace(/^#/, '');
}
+
return '';
},
addClassToSvg: function addClassToSvg(container, loader) {
var svg = container.querySelector('svg');
+
if (svg) {
L.DomUtil.addClass(svg, loader);
}
@@ -3932,23 +4391,29 @@ L.IconUtil = {
if (!/^#/.test(ref1)) {
ref1 = '#' + ref1;
}
+
if (!/^#/.test(ref2)) {
ref2 = '#' + ref2;
}
+
var use = container.querySelector('use');
+
if (use) {
var toggled = use.getAttribute('xlink:href') === ref1 ? ref2 : ref1;
use.setAttribute('xlink:href', toggled);
return toggled;
}
+
return false;
},
toggleTitle: function toggleTitle(container, title1, title2) {
var toggled = container.getAttribute('title') === title1 ? title2 : title1;
container.setAttribute('title', toggled);
+
if (container.hasAttribute('aria-label')) {
container.setAttribute('aria-label', toggled);
}
+
return toggled;
}
};
@@ -3986,15 +4451,19 @@ L.MatrixUtil = {
multmm: function multmm(a, b) {
var c = [];
var i;
+
for (i = 0; i < 3; i++) {
for (var j = 0; j < 3; j++) {
var cij = 0;
+
for (var k = 0; k < 3; k++) {
cij += a[3 * i + k] * b[3 * k + j];
}
+
c[3 * i + j] = cij;
}
}
+
return c;
},
// multiply a 3*3 matrix and a 3-vector
@@ -4004,9 +4473,11 @@ L.MatrixUtil = {
// multiply a scalar and a 3*3 matrix
multsm: function multsm(s, m) {
var matrix = [];
+
for (var i = 0, l = m.length; i < l; i++) {
matrix.push(s * m[i]);
}
+
return matrix;
},
basisToPoints: function basisToPoints(x1, y1, x2, y2, x3, y3, x4, y4) {
@@ -4021,9 +4492,7 @@ L.MatrixUtil = {
general2DProjection: function general2DProjection(x1s, y1s, x1d, y1d, x2s, y2s, x2d, y2d, x3s, y3s, x3d, y3d, x4s, y4s, x4d, y4d) {
var s = L.MatrixUtil.basisToPoints(x1s, y1s, x2s, y2s, x3s, y3s, x4s, y4s);
var d = L.MatrixUtil.basisToPoints(x1d, y1d, x2d, y2d, x3d, y3d, x4d, y4d);
- var m = L.MatrixUtil.multmm(d, L.MatrixUtil.adj(s));
-
- // Normalize to the unique matrix with m[8] == 1.
+ var m = L.MatrixUtil.multmm(d, L.MatrixUtil.adj(s)); // Normalize to the unique matrix with m[8] == 1.
// See: http://franklinta.com/2014/09/08/computing-css-matrix3d-transforms/
return L.MatrixUtil.multsm(1 / m[8], m);
@@ -4085,6 +4554,7 @@ L.Utils = {
confirmImageDelete: 'Are you sure? This image will be permanently deleted from the map.',
confirmImagesDeletes: 'Are you sure? These images will be permanently deleted from the map.'
};
+
if (!this.options.translation) {
this.options.translation = translation;
} else {
@@ -4095,6 +4565,7 @@ L.Utils = {
}
}
}
+
L.DomUtil.initTranslation(this.options.translation);
},
getNestedVal: function getNestedVal(obj, key, nestedKey) {
@@ -7080,7 +7551,7 @@ module.exports.formatError = function (err) {
/******/
/******/ /* webpack/runtime/getFullHash */
/******/ !function() {
-/******/ __webpack_require__.h = function() { return "596d30b46f68213e18b2"; }
+/******/ __webpack_require__.h = function() { return "b664115763eb65292f36"; }
/******/ }();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
diff --git a/dist/leaflet.distortableimage.js.map b/dist/leaflet.distortableimage.js.map
index 2b1544f88..828169f3d 100644
--- a/dist/leaflet.distortableimage.js.map
+++ b/dist/leaflet.distortableimage.js.map
@@ -1 +1 @@
-{"version":3,"file":"leaflet.distortableimage.js","mappings":";;;;;;;;;;AAAY;;AAEZ;;AAEA;AACA,mDAAmD,IAAI,SAAS,MAAM,IAAI;;AAE1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;AACD;AACA,CAAC;;AAED;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3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AAC4C,OAAO,CAAC7B,eAAe,CAAC,IAAI,CAACX,OAAO,CAACgR,WAAW,CAAC;EACrD,CAAC;EAED0E,YAAY,wBAACyb,GAAG,EAAEjb,GAAG,EAAEqe,SAAS,EAAE;IAChC,IAAMC,GAAG,GAAG,CAACte,GAAG,EAAEqe,SAAS,CAAC;IAC5B,OAAOC,GAAG,CAAChvB,MAAM,CAAC,UAAS2rB,GAAG,EAAEpjB,CAAC,EAAE;MACjC,OAAOojB,GAAG,IAAIA,GAAG,CAACpjB,CAAC,CAAC;IACtB,CAAC,EAAEojB,GAAG,CAAC;EACT;AACF,CAAC;;;;;;;;;;;ACjDD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;AChfa;AACb;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,yBAAyB,mBAAO,CAAC,gFAAoB;AACrD,4BAA4B,mBAAO,CAAC,sFAAuB;AAC3D,wBAAwB,mBAAO,CAAC,8EAAmB;AACnD,6CAA6C,yCAAyC,+CAA+C;AACrI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF;AACrF;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,sDAAsD;AACtD,0DAA0D;AAC1D;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,wBAAwB,8BAA8B;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,WAAW;AAC/K;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,yCAAyC,SAAS;AAClD;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA,aAAa,UAAU;AACvB;;AAEA,CAAC;AACD;AACA,cAAc,sCAAsC;;AAEpD,0EAA0E,WAAW;AACrF,6EAA6E,WAAW;AACxF,wFAAwF,WAAW;;AAEnG;AACA;AACA,aAAa,qCAAqC;AAClD,aAAa,sDAAsD;AACnE;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,0EAA0E,aAAa;AACvF;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,6EAA6E,eAAe;AAC5F;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,6EAA6E,eAAe;AAC5F;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,6EAA6E,eAAe;AAC5F;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,6EAA6E,eAAe;AAC5F;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,mGAAmG,eAAe;AAClH;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,6EAA6E,eAAe;AAC5F;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,6EAA6E,eAAe;AAC5F;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,6EAA6E,eAAe;AAC5F;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,gFAAgF,iBAAiB;AACjG;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,CAAC;;AAED;;AAEA,OAAO;;AAEP;AACA;AACA;AACA;AACA,kDAAkD,gCAAmB;;AAErE;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sEAAsE,WAAW,mFAAmF,WAAW;AAC/K;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,yCAAyC,SAAS;AAClD;AACA;;AAEA;AACA;;AAEA,eAAe,gCAAmB;AAClC;AACA,cAAc,6DAA6D;;AAE3E,cAAc,yDAAyD;;AAEvE,cAAc,gCAAgC;;AAE9C,cAAc,2BAA2B;;AAEzC;AACA,aAAa,QAAQ;AACrB,cAAc,kBAAkB;AAChC,cAAc,kBAAkB;AAChC,cAAc,0BAA0B;AACxC,cAAc,0BAA0B;AACxC,cAAc,0BAA0B;AACxC,cAAc,0BAA0B;AACxC,cAAc,2BAA2B;AACzC,cAAc,2BAA2B;AACzC,cAAc,2BAA2B;AACzC,cAAc,2BAA2B;AACzC,cAAc,2BAA2B;AACzC,cAAc,2BAA2B;AACzC,cAAc,2BAA2B;AACzC,cAAc,2BAA2B;AACzC;;AAEA;AACA,aAAa,QAAQ;AACrB,cAAc,yDAAyD;AACvE,cAAc,qBAAqB;AACnC,cAAc,eAAe;AAC7B;;AAEA;AACA,WAAW,iBAAiB;AAC5B,aAAa,gBAAgB;AAC7B;;;AAGA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,eAAe;AAC1B,aAAa,4CAA4C;AACzD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,aAAa,mBAAmB;AAChC;AACA,aAAa,QAAQ;;AAErB;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,aAAa;AAC1B,aAAa,OAAO;AACpB,eAAe;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA,4BAA4B;;AAE5B;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,uDAAuD;;AAEvD;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;;AAEA;AACA,uDAAuD;;AAEvD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,uDAAuD;;AAEvD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,OAAO;;AAEP;AACA;AACA;AACA;AACA,kDAAkD,gCAAmB;;AAErE;AACA;AACA;AACA;;;AAGA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,gCAAmB;;AAEtC,eAAe,gCAAmB;AAClC;;AAEA,0BAA0B,gCAAmB;AAC7C,WAAW,mCAAmC;;;AAG9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA,WAAW,mCAAmC;AAC9C,aAAa;AACb;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,OAAO;;AAEP,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,mBAAmB,gCAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,gCAAmB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gCAAmB;AAC9B;AACA,gBAAgB,gCAAmB,wBAAwB,gCAAmB;AAC9E,oDAAoD,wCAAwC;AAC5F;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW,gCAAmB,2BAA2B;AACzD,WAAW;AACX;AACA;AACA;AACA;AACA,WAAW,gCAAmB;AAC9B;AACA,kEAAkE,iBAAiB;AACnF;AACA,2DAA2D,aAAa;AACxE;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAmB;AACnB,qBAAqB,gCAAmB;AACxC,+CAA+C;AAC/C,sBAAsB;AACtB,uFAAuF,gCAAmB;;AAE1G,CAAC;AACD;AACA;AACA,oGAAoG,aAAa;AACjH,UAAU;AACV;;;;;;;;;;;;;;;;;;;;;AC1zBA;AACA;AAC2C;AACJ;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;;AAEjD;AACA,WAAW,mCAAmC;;AAE9C;AACA,WAAW,0CAA0C;;AAErD;AACA,WAAW,+BAA+B;;AAE1C;AACA,oEAAkB;AAClB;AACA,WAAW,eAAe;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,UAAU;;AAEzB,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;;AAEjD;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,eAAe,UAAU;;AAEzB,eAAe,mBAAmB;AAClC;AACA;AACA;AACA,iBAAiB,gBAAgB;AACjC;AACA,KAAK;AACL;AACA,eAAe,mBAAmB;;AAElC;AACA;;AAEA;AACA;AACA;AACA,WAAW,mCAAmC;AAC9C,WAAW,eAAe;AAC1B;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;;AAGF;AACA;AACA;AAC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IAAI;AACJ;AACA,kBAAkB,mBAAO,CAAC,wDAAW;AACrC;AACA;AACA,qBAAqB,UAAU;AAC/B;AACA;AACA;AACA,EAAE;AACF;AACA,EAAE,KAAK,EAEN;;;;;;;;;;;AC5DD,mBAAmB,mBAAO,CAAC,+CAAQ;AACnC;;;;;;;;;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF,WAAW,mBAAO,CAAC,gDAAO;;AAE1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3CA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB;;AAEpB,6BAA6B;;AAE7B,uBAAuB;;AAEvB,0BAA0B;AAC1B;AACA;;AAEA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;;;;;;UC1DA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;UACA,sBAAsB;UACtB,oDAAoD,uBAAuB;UAC3E;UACA;UACA,GAAG;UACH;UACA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;;;;WCxCA;WACA;WACA;WACA,eAAe,4BAA4B;WAC3C,eAAe;WACf,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;WACA;WACA;WACA;WACA;;;;;WCJA,wCAAwC;;;;;WCAxC,qCAAqC;;;;;WCArC,8CAA8C;;;;;WCA9C;WACA;WACA;WACA;WACA,uBAAuB,4BAA4B;WACnD;WACA;WACA;WACA,iBAAiB,oBAAoB;WACrC;WACA,mGAAmG,YAAY;WAC/G;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,4CAA4C,mBAAmB;WAC/D;WACA;WACA;WACA,mEAAmE,iCAAiC;WACpG;WACA;WACA;WACA;;;;;WCzCA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;WACA;;WAEA;WACA;WACA;;WAEA;WACA;WACA;;WAEA;WACA;WACA;;WAEA;WACA;WACA;;WAEA;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,CAAC;;WAED;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA,IAAI;WACJ;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,IAAI;WACJ;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA,2BAA2B;WAC3B,4BAA4B;WAC5B,2BAA2B;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,GAAG;;WAEH;WACA;WACA;WACA;WACA;WACA;WACA,oBAAoB,gBAAgB;WACpC;WACA;WACA;WACA,KAAK;WACL;WACA;WACA;WACA,GAAG;WACH;WACA;WACA;WACA,oBAAoB,gBAAgB;WACpC;WACA;WACA,GAAG;WACH;WACA;WACA,GAAG;WACH;WACA;WACA,GAAG;WACH;WACA;WACA;WACA,GAAG;WACH;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM;WACN;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM;WACN;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,GAAG;;WAEH;WACA;WACA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA,GAAG;WACH;WACA;WACA;WACA,GAAG;;WAEH;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;WAEA,iBAAiB,qCAAqC;WACtD;;WAEA;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA,oBAAoB,iBAAiB;WACrC;WACA;WACA;WACA,GAAG;WACH;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA,GAAG;WACH,EAAE;WACF;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM;WACN;WACA;WACA;WACA;WACA;WACA,QAAQ;WACR;WACA;WACA,QAAQ;WACR;WACA,MAAM;WACN,KAAK;WACL,IAAI;WACJ,GAAG;WACH;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA;;WAEA;WACA;;WAEA;;WAEA;WACA;WACA,EAAE;WACF;;WAEA;WACA;WACA;WACA,GAAG;WACH;;WAEA;WACA;WACA;WACA,GAAG;WACH;;WAEA;WACA;;WAEA;WACA;WACA,EAAE;;WAEF;WACA;;WAEA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA,oBAAoB,oBAAoB;WACxC;WACA;WACA;WACA;WACA,EAAE;;WAEF;WACA;WACA;WACA;WACA;WACA,IAAI;WACJ;;WAEA;WACA;WACA;WACA;WACA,KAAK;WACL;WACA,IAAI;WACJ;;WAEA;WACA;WACA,GAAG;WACH,EAAE;WACF;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,IAAI;WACJ,GAAG;WACH;WACA;WACA;WACA;;;;;WCrYA;;;;;WCAA;;WAEA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,EAAE;WACF;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,mBAAmB,2BAA2B;WAC9C;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,KAAK;WACL;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA,kBAAkB,cAAc;WAChC;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA,cAAc,MAAM;WACpB;WACA;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA,cAAc,aAAa;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA,iBAAiB,4BAA4B;WAC7C;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,IAAI;WACJ;WACA;;WAEA;;WAEA;WACA;WACA;WACA;WACA,IAAI;WACJ;;WAEA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;WACA;WACA,gBAAgB,4BAA4B;WAC5C;WACA;WACA;;WAEA;WACA;;WAEA;WACA;;WAEA;WACA;;WAEA;WACA,gBAAgB,4BAA4B;WAC5C;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,kBAAkB,uCAAuC;WACzD;WACA;WACA;WACA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA,mBAAmB,iCAAiC;WACpD;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,sBAAsB,uCAAuC;WAC7D;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,sBAAsB,sBAAsB;WAC5C;WACA;WACA,SAAS;WACT;WACA;WACA;WACA;WACA;WACA,WAAW;WACX,WAAW;WACX;WACA;WACA;WACA;WACA;WACA;WACA;WACA,YAAY;WACZ;WACA;WACA;WACA;WACA;WACA;WACA,UAAU;WACV;WACA;WACA;WACA;WACA;WACA;WACA,WAAW;WACX;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA,mBAAmB,wCAAwC;WAC3D;WACA;WACA;WACA;WACA,MAAM;WACN;WACA;WACA;WACA;WACA;WACA,QAAQ;WACR,QAAQ;WACR;WACA;WACA;WACA;WACA;WACA;WACA,SAAS;WACT;WACA;WACA;WACA;WACA;WACA;WACA,OAAO;WACP;WACA;WACA;WACA;WACA;WACA,QAAQ;WACR;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,EAAE,IAAI;WACN;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,IAAI;WACJ;WACA;WACA,EAAE;WACF;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA,sCAAsC;WACtC;WACA;WACA,EAAE;WACF;;WAEA;;WAEA;;;;;UE9fA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA","sources":["webpack://leaflet-distortableimage/./node_modules/ansi-html-community/index.js","webpack://leaflet-distortableimage/./src/DistortableCollection.js","webpack://leaflet-distortableimage/./src/DistortableImageOverlay.js","webpack://leaflet-distortableimage/./src/components/DistortableImage.Keymapper.js","webpack://leaflet-distortableimage/./src/edit/DistortableCollection.Edit.js","webpack://leaflet-distortableimage/./src/edit/DistortableImage.Edit.js","webpack://leaflet-distortableimage/./src/edit/actions/BorderAction.js","webpack://leaflet-distortableimage/./src/edit/actions/DeleteAction.js","webpack://leaflet-distortableimage/./src/edit/actions/DistortAction.js","webpack://leaflet-distortableimage/./src/edit/actions/DragAction.js","webpack://leaflet-distortableimage/./src/edit/actions/EditAction.js","webpack://leaflet-distortableimage/./src/edit/actions/ExportAction.js","webpack://leaflet-distortableimage/./src/edit/actions/FreeRotateAction.js","webpack://leaflet-distortableimage/./src/edit/actions/GeolocateAction.js","webpack://leaflet-distortableimage/./src/edit/actions/LockAction.js","webpack://leaflet-distortableimage/./src/edit/actions/OpacitiesAction.js","webpack://leaflet-distortableimage/./src/edit/actions/OpacityAction.js","webpack://leaflet-distortableimage/./src/edit/actions/RestoreAction.js","webpack://leaflet-distortableimage/./src/edit/actions/RotateAction.js","webpack://leaflet-distortableimage/./src/edit/actions/ScaleAction.js","webpack://leaflet-distortableimage/./src/edit/actions/StackAction.js","webpack://leaflet-distortableimage/./src/edit/actions/UnlockAction.js","webpack://leaflet-distortableimage/./src/edit/getEXIFdata.js","webpack://leaflet-distortableimage/./src/edit/handles/DistortHandle.js","webpack://leaflet-distortableimage/./src/edit/handles/DragHandle.js","webpack://leaflet-distortableimage/./src/edit/handles/EditHandle.js","webpack://leaflet-distortableimage/./src/edit/handles/FreeRotateHandle.js","webpack://leaflet-distortableimage/./src/edit/handles/LockHandle.js","webpack://leaflet-distortableimage/./src/edit/handles/RotateHandle.js","webpack://leaflet-distortableimage/./src/edit/handles/ScaleHandle.js","webpack://leaflet-distortableimage/./src/edit/toolbars/DistortableImage.ControlBar.js","webpack://leaflet-distortableimage/./src/edit/toolbars/DistortableImage.PopupBar.js","webpack://leaflet-distortableimage/./src/iconsets/IconSet.js","webpack://leaflet-distortableimage/./src/iconsets/KeymapperIconSet.js","webpack://leaflet-distortableimage/./src/iconsets/ToolbarIconSet.js","webpack://leaflet-distortableimage/./src/mapmixins/BoxCollector.js","webpack://leaflet-distortableimage/./src/mapmixins/DoubleClickLabels.js","webpack://leaflet-distortableimage/./src/mapmixins/DoubleClickZoom.js","webpack://leaflet-distortableimage/./src/mapmixins/MapMixins.js","webpack://leaflet-distortableimage/./src/util/DomUtil.js","webpack://leaflet-distortableimage/./src/util/IconUtil.js","webpack://leaflet-distortableimage/./src/util/ImageUtil.js","webpack://leaflet-distortableimage/./src/util/MatrixUtil.js","webpack://leaflet-distortableimage/./src/util/TrigUtil.js","webpack://leaflet-distortableimage/./src/util/Utils.js","webpack://leaflet-distortableimage/./node_modules/events/events.js","webpack://leaflet-distortableimage/./node_modules/html-entities/lib/index.js","webpack://leaflet-distortableimage/./node_modules/html-entities/lib/named-references.js","webpack://leaflet-distortableimage/./node_modules/html-entities/lib/numeric-unicode-map.js","webpack://leaflet-distortableimage/./node_modules/html-entities/lib/surrogate-pairs.js","webpack://leaflet-distortableimage/./node_modules/webpack-dev-server/client/clients/WebSocketClient.js","webpack://leaflet-distortableimage/./node_modules/webpack-dev-server/client/index.js","webpack://leaflet-distortableimage/./node_modules/webpack-dev-server/client/modules/logger/index.js","webpack://leaflet-distortableimage/./node_modules/webpack-dev-server/client/overlay.js","webpack://leaflet-distortableimage/./node_modules/webpack-dev-server/client/socket.js","webpack://leaflet-distortableimage/./node_modules/webpack-dev-server/client/utils/createSocketURL.js","webpack://leaflet-distortableimage/./node_modules/webpack-dev-server/client/utils/getCurrentScriptSource.js","webpack://leaflet-distortableimage/./node_modules/webpack-dev-server/client/utils/log.js","webpack://leaflet-distortableimage/./node_modules/webpack-dev-server/client/utils/parseURL.js","webpack://leaflet-distortableimage/./node_modules/webpack-dev-server/client/utils/reloadApp.js","webpack://leaflet-distortableimage/./node_modules/webpack-dev-server/client/utils/sendMessage.js","webpack://leaflet-distortableimage/./node_modules/webpack-dev-server/client/utils/stripAnsi.js","webpack://leaflet-distortableimage/./node_modules/webpack/hot/dev-server.js","webpack://leaflet-distortableimage/./node_modules/webpack/hot/emitter.js","webpack://leaflet-distortableimage/./node_modules/webpack/hot/log-apply-result.js","webpack://leaflet-distortableimage/./node_modules/webpack/hot/log.js","webpack://leaflet-distortableimage/webpack/bootstrap","webpack://leaflet-distortableimage/webpack/runtime/compat get default export","webpack://leaflet-distortableimage/webpack/runtime/define property getters","webpack://leaflet-distortableimage/webpack/runtime/get javascript update chunk filename","webpack://leaflet-distortableimage/webpack/runtime/get update manifest filename","webpack://leaflet-distortableimage/webpack/runtime/getFullHash","webpack://leaflet-distortableimage/webpack/runtime/hasOwnProperty shorthand","webpack://leaflet-distortableimage/webpack/runtime/load script","webpack://leaflet-distortableimage/webpack/runtime/make namespace object","webpack://leaflet-distortableimage/webpack/runtime/hot module replacement","webpack://leaflet-distortableimage/webpack/runtime/publicPath","webpack://leaflet-distortableimage/webpack/runtime/jsonp chunk loading","webpack://leaflet-distortableimage/webpack/before-startup","webpack://leaflet-distortableimage/webpack/startup","webpack://leaflet-distortableimage/webpack/after-startup"],"sourcesContent":["'use strict'\n\nmodule.exports = ansiHTML\n\n// Reference to https://github.com/sindresorhus/ansi-regex\nvar _regANSI = /(?:(?:\\u001b\\[)|\\u009b)(?:(?:[0-9]{1,3})?(?:(?:;[0-9]{0,3})*)?[A-M|f-m])|\\u001b[A-M]/\n\nvar _defColors = {\n reset: ['fff', '000'], // [FOREGROUD_COLOR, BACKGROUND_COLOR]\n black: '000',\n red: 'ff0000',\n green: '209805',\n yellow: 'e8bf03',\n blue: '0000ff',\n magenta: 'ff00ff',\n cyan: '00ffee',\n lightgrey: 'f0f0f0',\n darkgrey: '888'\n}\nvar _styles = {\n 30: 'black',\n 31: 'red',\n 32: 'green',\n 33: 'yellow',\n 34: 'blue',\n 35: 'magenta',\n 36: 'cyan',\n 37: 'lightgrey'\n}\nvar _openTags = {\n '1': 'font-weight:bold', // bold\n '2': 'opacity:0.5', // dim\n '3': '', // italic\n '4': '', // underscore\n '8': 'display:none', // hidden\n '9': '' // delete\n}\nvar _closeTags = {\n '23': '', // reset italic\n '24': '', // reset underscore\n '29': '' // reset delete\n}\n\n;[0, 21, 22, 27, 28, 39, 49].forEach(function (n) {\n _closeTags[n] = ''\n})\n\n/**\n * Converts text with ANSI color codes to HTML markup.\n * @param {String} text\n * @returns {*}\n */\nfunction ansiHTML (text) {\n // Returns the text if the string has no ANSI escape code.\n if (!_regANSI.test(text)) {\n return text\n }\n\n // Cache opened sequence.\n var ansiCodes = []\n // Replace with markup.\n var ret = text.replace(/\\033\\[(\\d+)m/g, function (match, seq) {\n var ot = _openTags[seq]\n if (ot) {\n // If current sequence has been opened, close it.\n if (!!~ansiCodes.indexOf(seq)) { // eslint-disable-line no-extra-boolean-cast\n ansiCodes.pop()\n return ''\n }\n // Open tag.\n ansiCodes.push(seq)\n return ot[0] === '<' ? ot : ''\n }\n\n var ct = _closeTags[seq]\n if (ct) {\n // Pop sequence\n ansiCodes.pop()\n return ct\n }\n return ''\n })\n\n // Make sure tags are closed.\n var l = ansiCodes.length\n ;(l > 0) && (ret += Array(l + 1).join(''))\n\n return ret\n}\n\n/**\n * Customize colors.\n * @param {Object} colors reference to _defColors\n */\nansiHTML.setColors = function (colors) {\n if (typeof colors !== 'object') {\n throw new Error('`colors` parameter must be an Object.')\n }\n\n var _finalColors = {}\n for (var key in _defColors) {\n var hex = colors.hasOwnProperty(key) ? colors[key] : null\n if (!hex) {\n _finalColors[key] = _defColors[key]\n continue\n }\n if ('reset' === key) {\n if (typeof hex === 'string') {\n hex = [hex]\n }\n if (!Array.isArray(hex) || hex.length === 0 || hex.some(function (h) {\n return typeof h !== 'string'\n })) {\n throw new Error('The value of `' + key + '` property must be an Array and each item could only be a hex string, e.g.: FF0000')\n }\n var defHexColor = _defColors[key]\n if (!hex[0]) {\n hex[0] = defHexColor[0]\n }\n if (hex.length === 1 || !hex[1]) {\n hex = [hex[0]]\n hex.push(defHexColor[1])\n }\n\n hex = hex.slice(0, 2)\n } else if (typeof hex !== 'string') {\n throw new Error('The value of `' + key + '` property must be a hex string, e.g.: FF0000')\n }\n _finalColors[key] = hex\n }\n _setTags(_finalColors)\n}\n\n/**\n * Reset colors.\n */\nansiHTML.reset = function () {\n _setTags(_defColors)\n}\n\n/**\n * Expose tags, including open and close.\n * @type {Object}\n */\nansiHTML.tags = {}\n\nif (Object.defineProperty) {\n Object.defineProperty(ansiHTML.tags, 'open', {\n get: function () { return _openTags }\n })\n Object.defineProperty(ansiHTML.tags, 'close', {\n get: function () { return _closeTags }\n })\n} else {\n ansiHTML.tags.open = _openTags\n ansiHTML.tags.close = _closeTags\n}\n\nfunction _setTags (colors) {\n // reset all\n _openTags['0'] = 'font-weight:normal;opacity:1;color:#' + colors.reset[0] + ';background:#' + colors.reset[1]\n // inverse\n _openTags['7'] = 'color:#' + colors.reset[1] + ';background:#' + colors.reset[0]\n // dark grey\n _openTags['90'] = 'color:#' + colors.darkgrey\n\n for (var code in _styles) {\n var color = _styles[code]\n var oriColor = colors[color] || '000'\n _openTags[code] = 'color:#' + oriColor\n code = parseInt(code)\n _openTags[(code + 10).toString()] = 'background:#' + oriColor\n }\n}\n\nansiHTML.reset()\n","const arr = [];\nL.DistortableCollection = L.FeatureGroup.extend({\n options: {\n editable: true,\n exportOpts: {\n exportStartUrl: '//export.mapknitter.org/export',\n statusUrl: '//export.mapknitter.org',\n exportUrl: 'http://export.mapknitter.org/',\n },\n },\n\n initialize(options) {\n L.setOptions(this, options);\n L.FeatureGroup.prototype.initialize.call(this, options);\n L.Utils.initTranslation.call(this);\n\n this.editable = this.options.editable;\n },\n\n onAdd(map) {\n L.FeatureGroup.prototype.onAdd.call(this, map);\n\n this._map = map;\n\n if (this.editable) { this.editing.enable(); }\n\n /**\n * although we have a DistortableCollection.Edit class that handles collection events to keep our code managable,\n * events that need to be added on individual images are kept here to do so through `layeradd`.\n */\n this.on('layeradd', this._addEvents, this);\n this.on('layerremove', this._removeEvents, this);\n },\n\n onRemove() {\n if (this.editing) { this.editing.disable(); }\n this.off('layeradd', this._addEvents, this);\n this.off('layerremove', this._removeEvents, this);\n },\n\n _addEvents(e) {\n const layer = e.layer;\n\n L.DomEvent.on(layer, {\n dragstart: this._dragStartMultiple,\n drag: this._dragMultiple,\n }, this);\n\n L.DomEvent.on(layer.getElement(), {\n mousedown: this._deselectOthers,\n /* Enable longpress for multi select for touch devices. */\n contextmenu: this._longPressMultiSelect,\n }, this);\n },\n\n _removeEvents(e) {\n const layer = e.layer;\n\n L.DomEvent.off(layer, {\n dragstart: this._dragStartMultiple,\n drag: this._dragMultiple,\n }, this);\n\n L.DomEvent.off(layer.getElement(), {\n mousedown: this._deselectOthers,\n contextmenu: this._longPressMultiSelect,\n }, this);\n },\n\n _longPressMultiSelect(e) {\n if (!this.editable) { return; }\n\n e.preventDefault();\n\n this.eachLayer((layer) => {\n const edit = layer.editing;\n if (layer.getElement() === e.target && edit.enabled()) {\n L.DomUtil.toggleClass(layer.getElement(), 'collected');\n if (this.anyCollected()) {\n layer.deselect();\n this.editing._addToolbar();\n } else {\n this.editing._removeToolbar();\n }\n }\n });\n },\n\n isCollected(overlay) {\n return L.DomUtil.hasClass(overlay.getElement(), 'collected');\n },\n\n anyCollected() {\n const layerArr = this.getLayers();\n return layerArr.some(this.isCollected.bind(this));\n },\n\n _toggleCollected(e, layer) {\n if (e.shiftKey) {\n /* conditional prevents disabled images from flickering multi-select mode */\n if (layer.editing.enabled()) {\n L.DomUtil.toggleClass(e.target, 'collected');\n // re-order layers by _leaflet_id to match their display order in UI\n // add new layer to right position and avoid repitition\n const newArr = arr.every((each) => {\n return each._leaflet_id !== layer._leaflet_id;\n });\n if (newArr) {\n arr.push(layer);\n } else {\n arr.splice(arr.indexOf(layer), 1);\n }\n }\n }\n\n if (this.anyCollected()) { layer.deselect(); }\n else { this.editing._removeToolbar(); }\n },\n\n _deselectOthers(e) {\n if (!this.editable) { return; }\n\n this.eachLayer((layer) => {\n if (layer.getElement() !== e.target) {\n layer.deselect();\n } else {\n this._toggleCollected(e, layer);\n }\n });\n\n if (e) { L.DomEvent.stopPropagation(e); }\n },\n\n _dragStartMultiple(e) {\n const overlay = e.target;\n const map = this._map;\n let i;\n\n if (!this.isCollected(overlay)) { return; }\n\n this.eachLayer((layer) => {\n layer._dragStartPoints = {};\n layer.deselect();\n for (i = 0; i < 4; i++) {\n const c = layer.getCorner(i);\n layer._dragStartPoints[i] = map.latLngToLayerPoint(c);\n }\n });\n },\n\n _dragMultiple(e) {\n const overlay = e.target;\n const map = this._map;\n\n if (!this.isCollected(overlay)) { return; }\n\n const topLeft = map.latLngToLayerPoint(overlay.getCorner(0));\n const delta = overlay._dragStartPoints[0].subtract(topLeft);\n\n this._updateCollectionFromPoints(delta, overlay);\n },\n\n _toRemove() {\n const layerArr = this.getLayers();\n\n return layerArr.filter((layer) => {\n const mode = layer.editing._mode;\n return (this.isCollected(layer) && mode !== 'lock');\n });\n },\n\n _toMove(overlay) {\n const layerArr = this.getLayers();\n\n return layerArr.filter((layer) => {\n const mode = layer.editing._mode;\n return layer !== overlay && this.isCollected(layer) && mode !== 'lock';\n });\n },\n\n _updateCollectionFromPoints(delta, overlay) {\n const layersToMove = this._toMove(overlay);\n const p = new L.Transformation(1, -delta.x, 1, -delta.y);\n let i;\n\n layersToMove.forEach((layer) => {\n const movedPoints = {};\n for (i = 0; i < 4; i++) {\n movedPoints[i] = p.transform(layer._dragStartPoints[i]);\n }\n layer.setCornersFromPoints(movedPoints);\n });\n },\n\n _getAvgCmPerPixel(imgs) {\n const reduce = imgs.reduce(function(sum, img) {\n return sum + img.cm_per_pixel;\n }, 0);\n return reduce / imgs.length;\n },\n\n // connects to JSON file and fetches JSON data therein from remote source\n async fetchRemoteJson(url) {\n let index = 0;\n const imgCollectionProps = [];\n\n try {\n const response = await axios.get(url);\n if (response.data.hasOwnProperty('avg_cm_per_pixel')) {\n if (response.data.collection.length > 1) {\n response.data.collection.forEach((data) => {\n imgCollectionProps[index] = data;\n index++;\n });\n return {\n avg_cm_per_pixel: response.data.avg_cm_per_pixel,\n imgCollectionProps,\n };\n }\n imgCollectionProps[index] = response.data.collection;\n\n return {\n avg_cm_per_pixel: response.data.avg_cm_per_pixel,\n imgCollectionProps,\n };\n } else {\n if (response.data.length > 1) {\n response.data.forEach((data) => {\n imgCollectionProps[index] = data;\n index++;\n });\n return {\n imgCollectionProps,\n };\n }\n imgCollectionProps[index] = response.data;\n\n return {\n imgCollectionProps,\n };\n }\n } catch (err) {\n console.log('err', err);\n }\n },\n\n // expects url in this format: https://archive.org/download/mkl-1/mkl-1.json\n async recreateImagesFromJsonUrl(url) {\n let imageCollectionObj = {};\n\n if (url) {\n imageCollectionObj = await this.fetchRemoteJson(url);\n return imageCollectionObj;\n };\n\n return imageCollectionObj;\n },\n\n generateExportJson(allImages = false) {\n const json = {};\n json.images = [];\n\n this.eachLayer(function(layer) {\n if (allImages || this.isCollected(layer)) {\n const sections = layer._image.src.split('/');\n const filename = sections[sections.length - 1];\n const zc = layer.getCorners();\n const corners = [\n {lat: zc[0].lat, lon: zc[0].lng},\n {lat: zc[1].lat, lon: zc[1].lng},\n {lat: zc[2].lat, lon: zc[2].lng},\n {lat: zc[3].lat, lon: zc[3].lng},\n ];\n json.images.push({\n id: layer._leaflet_id,\n src: layer._image.src,\n width: layer._image.width,\n height: layer._image.height,\n tooltipText: layer.getTooltipText(),\n image_file_name: filename,\n nodes: corners,\n cm_per_pixel: L.ImageUtil.getCmPerPixel(layer),\n });\n }\n }, this);\n\n json.images = json.images.reverse();\n json.avg_cm_per_pixel = this._getAvgCmPerPixel(json.images);\n return json;\n },\n});\n\nL.distortableCollection = function(id, options) {\n return new L.DistortableCollection(id, options);\n};\n","L.DistortableImageOverlay = L.ImageOverlay.extend({\n options: {\n height: 200,\n crossOrigin: true,\n // todo: find ideal number to prevent distortions during RotateScale, and make it dynamic (remove hardcoding)\n edgeMinWidth: 50,\n editable: true,\n mode: 'distort',\n selected: false,\n interactive: true,\n tooltipText: '',\n },\n\n initialize(url, options) {\n L.setOptions(this, options);\n L.Utils.initTranslation.call(this);\n\n this.edgeMinWidth = this.options.edgeMinWidth;\n this.editable = this.options.editable;\n this._selected = this.options.selected;\n this._url = url;\n this.rotation = {};\n\n this.interactive = this.options.interactive;\n this.tooltipText = this.options.tooltipText;\n },\n\n onAdd(map) {\n this._map = map;\n if (!this.getElement()) { this._initImage(); }\n\n map.on('viewreset', this._reset, this);\n\n if (this.options.corners) {\n this._corners = this.options.corners;\n if (map.options.zoomAnimation && L.Browser.any3d) {\n map.on('zoomanim', this._animateZoom, this);\n }\n }\n\n // Have to wait for the image to load because need to access its w/h\n L.DomEvent.on(this.getElement(), 'load', () => {\n this.getPane().appendChild(this.getElement());\n this._initImageDimensions();\n\n if (this.options.rotation) {\n const units = this.options.rotation.deg >= 0 ? 'deg' : 'rad';\n this.setAngle(this.options.rotation[units], units);\n } else {\n this.rotation = {deg: 0, rad: 0};\n this._reset();\n }\n\n /* Initialize default corners if not already set */\n if (!this._corners) {\n if (map.options.zoomAnimation && L.Browser.any3d) {\n map.on('zoomanim', this._animateZoom, this);\n }\n }\n\n /** if there is a featureGroup, only its editable option matters */\n const eventParents = this._eventParents;\n if (eventParents) {\n this.eP = eventParents[Object.keys(eventParents)[0]];\n if (this.eP.editable) { this.editing.enable(); }\n } else {\n if (this.editable) { this.editing.enable(); }\n this.eP = null;\n }\n });\n\n L.DomEvent.on(this.getElement(), 'click', this.select, this);\n L.DomEvent.on(map, {\n singleclickon: this._singleClickListeners,\n singleclickoff: this._resetClickListeners,\n singleclick: this._singleClick,\n }, this);\n\n /**\n * custom events fired from DoubleClickLabels.js. Used to differentiate\n * single / dblclick to not deselect images on map dblclick.\n */\n if (!(map.doubleClickZoom.enabled() || map.doubleClickLabels.enabled())) {\n L.DomEvent.on(map, 'click', this.deselect, this);\n }\n\n this.fire('add');\n\n L.DomEvent.on(this.getElement(), 'mousemove', this.activateTooltip, this);\n L.DomEvent.on(this.getElement(), 'mouseout', this.closeTooltip, this);\n },\n\n onRemove(map) {\n L.DomEvent.off(this.getElement(), 'click', this.select, this);\n L.DomEvent.off(map, {\n singleclickon: this._singleClickListeners,\n singleclickoff: this._resetClickListeners,\n singleclick: this._singleClick,\n }, this);\n L.DomEvent.off(map, 'click', this.deselect, this);\n\n if (this.editing) { this.editing.disable(); }\n this.fire('remove');\n\n L.ImageOverlay.prototype.onRemove.call(this, map);\n\n L.DomEvent.on(this.getElement(), 'mouseout', this.closeTooltip, this);\n L.DomEvent.off(this.getElement(), 'mousemove', this.deactivateTooltip, this);\n },\n\n _initImageDimensions() {\n const map = this._map;\n const originalImageWidth = L.DomUtil.getStyle(this.getElement(), 'width');\n const originalImageHeight = L.DomUtil.getStyle(this.getElement(), 'height');\n const aspectRatio =\n parseInt(originalImageWidth) / parseInt(originalImageHeight);\n const imageHeight = this.options.height;\n const imageWidth = parseInt(aspectRatio * imageHeight);\n const center = map.project(map.getCenter());\n const offset = L.point(imageWidth, imageHeight).divideBy(2);\n if (this.options.corners) {\n this._corners = this.options.corners;\n } else {\n this._corners = [\n map.unproject(center.subtract(offset)),\n map.unproject(center.add(L.point(offset.x, -offset.y))),\n map.unproject(center.add(L.point(-offset.x, offset.y))),\n map.unproject(center.add(offset)),\n ];\n }\n\n this._initialDimensions = {\n 'center': center,\n 'offset': offset,\n 'zoom': map.getZoom(),\n };\n this.setBounds(L.latLngBounds(this.getCorners()));\n },\n\n _singleClick(e) {\n if (e.type === 'singleclick') { this.deselect(); }\n else { return; }\n },\n\n _singleClickListeners() {\n const map = this._map;\n L.DomEvent.off(map, 'click', this.deselect, this);\n L.DomEvent.on(map, 'singleclick', this.deselect, this);\n },\n\n _resetClickListeners() {\n const map = this._map;\n L.DomEvent.on(map, 'click', this.deselect, this);\n L.DomEvent.off(map, 'singleclick', this.deselect, this);\n },\n\n isSelected() {\n return this._selected;\n },\n\n deselect() {\n const edit = this.editing;\n if (!edit.enabled()) { return; }\n\n edit._removeToolbar();\n edit._hideMarkers();\n\n this._selected = false;\n this.fire('deselect');\n return this;\n },\n\n select(e) {\n const edit = this.editing;\n const eP = this.eP;\n\n if (!edit.enabled()) { return; }\n if (e) { L.DomEvent.stopPropagation(e); }\n\n // this ensures deselection of all other images, allowing us to keep collection group optional\n this._programmaticGrouping();\n\n this._selected = true;\n edit._addToolbar();\n edit._showMarkers();\n this.fire('select');\n\n // we run the selection logic 1st anyway because the collection group's _addToolbar method depends on it\n if (eP && eP.anyCollected()) {\n this.deselect();\n return;\n }\n\n return this;\n },\n\n _programmaticGrouping() {\n this._map.eachLayer((layer) => {\n if (layer instanceof L.DistortableImageOverlay) {\n layer.deselect();\n }\n });\n },\n\n setCorner(corner, latlng) {\n const edit = this.editing;\n\n this._corners[corner] = latlng;\n\n this.setBounds(L.latLngBounds(this.getCorners()));\n this.fire('update');\n\n if (edit.toolbar && edit.toolbar instanceof L.DistortableImage.PopupBar) {\n edit._updateToolbarPos();\n }\n\n this.edited = true;\n\n return this;\n },\n\n _cornerExceedsMapLats(zoom, corner, map) {\n if (map.options.crs.Simple == L.CRS.Simple) {\n return false;\n } else {\n let exceedsTop;\n let exceedsBottom;\n if (zoom === 0) {\n exceedsTop = map.project(corner).y < 2;\n exceedsBottom = map.project(corner).y >= 255;\n } else {\n exceedsTop = map.project(corner).y / zoom < 2;\n exceedsBottom = map.project(corner).y / Math.pow(2, zoom) >= 255;\n }\n return (exceedsTop || exceedsBottom);\n }\n },\n\n activateTooltip() {\n if (!this._selected) {\n this.bindTooltip(this.tooltipText, {direction: 'top'}).openTooltip();\n }\n },\n\n closeToolTip() {\n this.closeTooltip();\n },\n\n deactivateTooltip() {\n this.unbindTooltip();\n },\n\n getTooltipText() {\n return this.tooltipText;\n },\n\n setCorners(latlngObj) {\n const map = this._map;\n const zoom = map.getZoom();\n const edit = this.editing;\n let i = 0;\n\n // this is to fix https://github.com/publiclab/Leaflet.DistortableImage/issues/402\n for (const k in latlngObj) {\n if (this._cornerExceedsMapLats(zoom, latlngObj[k], map)) {\n // calling reset / update w/ the same corners bc it prevents a marker flicker for rotate\n this.setBounds(L.latLngBounds(this.getCorners()));\n this.fire('update');\n return;\n }\n }\n\n for (const k in latlngObj) {\n this._corners[i] = latlngObj[k];\n i += 1;\n }\n\n this.setBounds(L.latLngBounds(this.getCorners()));\n this.fire('update');\n\n if (edit.toolbar && edit.toolbar instanceof L.DistortableImage.PopupBar) {\n edit._updateToolbarPos();\n }\n\n this.edited = true;\n\n return this;\n },\n\n setCornersFromPoints(pointsObj) {\n const map = this._map;\n const zoom = map.getZoom();\n const edit = this.editing;\n let i = 0;\n\n for (const k in pointsObj) {\n const corner = map.layerPointToLatLng(pointsObj[k]);\n\n if (this._cornerExceedsMapLats(zoom, corner, map)) {\n // calling reset / update w/ the same corners bc it prevents a marker flicker for rotate\n this.setBounds(L.latLngBounds(this.getCorners()));\n this.fire('update');\n return;\n }\n }\n\n for (const k in pointsObj) {\n this._corners[i] = map.layerPointToLatLng(pointsObj[k]);\n i += 1;\n }\n\n this.setBounds(L.latLngBounds(this.getCorners()));\n this.fire('update');\n\n if (edit.toolbar && edit.toolbar instanceof L.DistortableImage.PopupBar) {\n edit._updateToolbarPos();\n }\n\n this.edited = true;\n\n return this;\n },\n\n scaleBy(scale) {\n const map = this._map;\n const center = map.project(this.getCenter());\n let i;\n let p;\n const scaledCorners = {};\n\n if (scale === 0) { return; }\n\n for (i = 0; i < 4; i++) {\n p = map\n .project(this.getCorner(i))\n .subtract(center)\n .multiplyBy(scale)\n .add(center);\n scaledCorners[i] = map.unproject(p);\n }\n\n this.setCorners(scaledCorners);\n\n return this;\n },\n\n getAngle(unit = 'deg') {\n const matrix = this.getElement().style[L.DomUtil.TRANSFORM]\n .split('matrix3d')[1]\n .slice(1, -1)\n .split(',');\n\n const row0x = matrix[0];\n const row0y = matrix[1];\n const row1x = matrix[4];\n const row1y = matrix[5];\n\n const determinant = row0x * row1y - row0y * row1x;\n\n let angle = L.TrigUtil.calcAngle(row0x, row0y, 'rad');\n\n if (determinant < 0) {\n angle += angle < 0 ? Math.PI : -Math.PI;\n }\n\n if (angle < 0) {\n angle = 2 * Math.PI + angle;\n }\n\n return unit === 'deg' ?\n Math.round(L.TrigUtil.radiansToDegrees(angle)) :\n L.Util.formatNum(angle, 2);\n },\n\n setAngle(angle, unit = 'deg') {\n const currentAngle = this.getAngle(unit);\n const angleToRotateBy = angle - currentAngle;\n this.rotateBy(angleToRotateBy, unit);\n\n return this;\n },\n\n rotateBy(angle, unit = 'deg') {\n const map = this._map;\n const center = map.project(this.getCenter());\n const corners = {};\n let i;\n let p;\n let q;\n\n if (unit === 'deg') {\n angle = L.TrigUtil.degreesToRadians(angle);\n }\n\n for (i = 0; i < 4; i++) {\n p = map.project(this.getCorner(i)).subtract(center);\n q = L.point(\n Math.cos(angle) * p.x - Math.sin(angle) * p.y,\n Math.sin(angle) * p.x + Math.cos(angle) * p.y\n );\n corners[i] = map.unproject(q.add(center));\n }\n\n this.setCorners(corners);\n\n return this;\n },\n\n dragBy(formerPoint, newPoint) {\n const map = this._map;\n let i;\n let p;\n const transCorners = {};\n const delta = map.project(formerPoint).subtract(map.project(newPoint));\n\n for (i = 0; i < 4; i++) {\n p = map.project(this.getCorner(i)).subtract(delta);\n transCorners[i] = map.unproject(p);\n }\n\n this.setCorners(transCorners);\n },\n\n restore() {\n const map = this._map;\n const center = this._initialDimensions.center;\n const offset = this._initialDimensions.offset;\n const zoom = this._initialDimensions.zoom;\n const corners = [\n center.subtract(offset),\n center.add(L.point(offset.x, -offset.y)),\n center.add(L.point(-offset.x, offset.y)),\n center.add(offset),\n ];\n\n for (let i = 0; i < 4; i++) {\n if (!map.unproject(corners[i], zoom).equals(this.getCorner(i))) {\n this.setCorner(i, map.unproject(corners[i], zoom));\n }\n }\n\n this.edited = false;\n this.fire('restore');\n\n return this;\n },\n\n /* Copied from Leaflet v0.7 https://github.com/Leaflet/Leaflet/blob/66282f14bcb180ec87d9818d9f3c9f75afd01b30/src/dom/DomUtil.js#L189-L199 */\n /* since L.DomUtil.getTranslateString() is deprecated in Leaflet v1.0 */\n _getTranslateString(point) {\n // on WebKit browsers (Chrome/Safari/iOS Safari/Android)\n // using translate3d instead of translate\n // makes animation smoother as it ensures HW accel is used.\n // Firefox 13 doesn't care\n // (same speed either way), Opera 12 doesn't support translate3d\n\n const is3d = L.Browser.webkit3d;\n const open = 'translate' + (is3d ? '3d' : '') + '(';\n const close = (is3d ? ',0' : '') + ')';\n\n return open + point.x + 'px,' + point.y + 'px' + close;\n },\n\n _reset() {\n const map = this._map;\n const image = this.getElement();\n const latLngToLayerPoint = L.bind(map.latLngToLayerPoint, map);\n const transformMatrix = this\n ._calculateProjectiveTransform(latLngToLayerPoint);\n const topLeft = latLngToLayerPoint(this.getCorner(0));\n const warp = L.DomUtil.getMatrixString(transformMatrix);\n const translation = this._getTranslateString(topLeft);\n\n /* See L.DomUtil.setPosition. Mainly for the purposes of L.Draggable. */\n image._leaflet_pos = topLeft;\n\n image.style[L.DomUtil.TRANSFORM] = [translation, warp].join(' ');\n\n /* Set origin to the upper-left corner rather than\n * the center of the image, which is the default.\n */\n image.style[L.DomUtil.TRANSFORM + '-origin'] = '0 0 0';\n\n this.rotation.deg = this.getAngle();\n this.rotation.rad = this.getAngle('rad');\n },\n\n /*\n * Calculates the transform string that will be\n * correct *at the end* of zooming.\n * Leaflet then generates a CSS3 animation between the current transform and\n * future transform which makes the transition appear smooth.\n */\n _animateZoom(event) {\n const map = this._map;\n const image = this.getElement();\n const latLngToNewLayerPoint = function(latlng) {\n return map._latLngToNewLayerPoint(latlng, event.zoom, event.center);\n };\n const transformMatrix = this._calculateProjectiveTransform(\n latLngToNewLayerPoint\n );\n const topLeft = latLngToNewLayerPoint(this.getCorner(0));\n const warp = L.DomUtil.getMatrixString(transformMatrix);\n const translation = this._getTranslateString(topLeft);\n\n /* See L.DomUtil.setPosition. Mainly for the purposes of L.Draggable. */\n image._leaflet_pos = topLeft;\n\n image.style[L.DomUtil.TRANSFORM] = [translation, warp].join(' ');\n },\n\n getCorners() {\n return this._corners;\n },\n\n getCorner(i) {\n return this._corners[i];\n },\n\n // image (vertex) centroid calculation\n getCenter() {\n const map = this._map;\n const reduce = this.getCorners().reduce(function(agg, corner) {\n return agg.add(map.project(corner));\n }, L.point(0, 0));\n return map.unproject(reduce.divideBy(4));\n },\n\n _calculateProjectiveTransform(latLngToCartesian) {\n /* Setting reasonable but made-up image defaults\n * allow us to place images on the map before\n * they've finished downloading. */\n const offset = latLngToCartesian(this.getCorner(0));\n const w = this.getElement().offsetWidth || 500;\n const h = this.getElement().offsetHeight || 375;\n const c = [];\n let j;\n /* Convert corners to container points (i.e. cartesian coordinates). */\n for (j = 0; j < 4; j++) {\n c.push(latLngToCartesian(this.getCorner(j))._subtract(offset));\n }\n\n /*\n * This matrix describes the action of\n * the CSS transform on each corner of the image.\n * It maps from the coordinate system centered\n * at the upper left corner of the image\n * to the region bounded by the latlngs in this._corners.\n * For example:\n * 0, 0, c[0].x, c[0].y\n * says that the upper-left corner of the image\n * maps to the first latlng in this._corners.\n */\n return L.MatrixUtil.general2DProjection(\n 0, 0, c[0].x, c[0].y,\n w, 0, c[1].x, c[1].y,\n 0, h, c[2].x, c[2].y,\n w, h, c[3].x, c[3].y\n );\n },\n});\n\nL.distortableImageOverlay = function(id, options) {\n return new L.DistortableImageOverlay(id, options);\n};\n\nL.Map.addInitHook(function() {\n if (!L.DomUtil.hasClass(this.getContainer(), 'ldi')) {\n L.DomUtil.addClass(this.getContainer(), 'ldi');\n }\n});\n","L.DomUtil = L.DomUtil || {};\nL.DistortableImage = L.DistortableImage || {};\nL.distortableImage = L.DistortableImage;\n\nL.DistortableImage.Keymapper = L.Handler.extend({\n\n options: {\n position: 'topright',\n },\n\n initialize(map, options) {\n this._map = map;\n L.setOptions(this, options);\n },\n\n addHooks() {\n if (!this._keymapper) {\n this._container = this._buildContainer();\n this._scrollWrapper = this._wrap();\n this._toggler = this._createButton();\n this._setMapper(this._container, this._scrollWrapper, this._toggler);\n\n L.DomEvent.on(this._toggler, 'click', this._toggleKeymapper, this);\n\n L.DomEvent.disableClickPropagation(this._container);\n L.DomEvent.disableScrollPropagation(this._container);\n }\n },\n\n removeHooks() {\n if (this._keymapper) {\n L.DomEvent.off(this._toggler, 'click', this._toggleKeymapper, this);\n\n L.DomUtil.remove(this._toggler);\n L.DomUtil.remove(this._scrollWrapper);\n L.DomUtil.remove(this._container);\n this._keymapper = false;\n }\n },\n\n _buildContainer() {\n const container = L.DomUtil.create('div', 'ldi-keymapper-hide');\n container.setAttribute('id', 'ldi-keymapper');\n\n const divider = L.DomUtil.create('br', 'divider');\n container.appendChild(divider);\n\n return container;\n },\n\n _createButton() {\n const toggler = L.DomUtil.create('a', '');\n toggler.innerHTML = L.IconUtil.create('keyboard_open');\n\n toggler.setAttribute('id', 'toggle-keymapper');\n toggler.setAttribute('href', '#');\n toggler.setAttribute('title', 'Show keymap');\n // Will force screen readers like VoiceOver to read this as \"Show keymap - button\"\n toggler.setAttribute('role', 'button');\n toggler.setAttribute('aria-label', 'Show keymap');\n\n return toggler;\n },\n\n _wrap() {\n const wrap = L.DomUtil.create('div', '');\n wrap.setAttribute('id', 'keymapper-wrapper');\n wrap.style.display = 'none';\n\n return wrap;\n },\n\n _setMapper(container, wrap, button) {\n this._keymapper = L.control({position: this.options.position});\n\n this._keymapper.onAdd = function() {\n container.appendChild(wrap);\n wrap.insertAdjacentHTML(\n 'beforeend',\n '' +\n '
' +\n /* eslint-disable */\n 'Rotate Mode R |
' +\n 'RotateScale Mode r |
' +\n 'Scale Mode s |
' +\n 'Distort Mode d |
' +\n 'Drag Mode D |
' + \n 'Lock (Mode) / Unlock Image l\\xa0u |
' +\n 'Stack up / down q\\xa0a |
' +\n 'Add / Remove Image Border b |
' +\n 'Toggle Opacity o |
' +\n 'Deselect All esc |
' +\n 'Delete Image(s) delete\\xa0backspace |
' +\n 'Export Image(s) e |
' +\n '
'\n );\n /* eslint-enable */\n container.appendChild(button);\n return container;\n };\n\n this._keymapper.addTo(this._map);\n },\n\n _toggleKeymapper(e) {\n e.preventDefault();\n\n this._container.className = (\n this._container.className === 'ldi-keymapper leaflet-control' ?\n 'ldi-keymapper-hide leaflet-control' :\n 'ldi-keymapper leaflet-control'\n );\n\n this._scrollWrapper.style.display = (\n this._scrollWrapper.style.display === 'none' ? 'block' : 'none'\n );\n\n this._toggler.innerHTML = (\n this._toggler.innerHTML === 'close' ?\n L.IconUtil.create('keyboard_open') :\n 'close'\n );\n\n L.IconUtil.toggleTitle(this._toggler, 'Show keymap', 'Hide keymap');\n L.DomUtil.toggleClass(this._toggler, 'close-icon');\n },\n\n _injectIconSet() {\n if (document.querySelector('#keymapper-iconset')) { return; }\n\n const el = L.DomUtil.create('div', '');\n el.id = 'keymapper-iconset';\n el.setAttribute('hidden', 'hidden');\n\n this._iconset = new L.KeymapperIconSet().render();\n el.innerHTML = this._iconset;\n\n document.querySelector('.leaflet-control-container').appendChild(el);\n },\n});\n\nL.DistortableImage.Keymapper.addInitHook(() => {\n L.DistortableImage.Keymapper.prototype._n = (\n L.DistortableImage.Keymapper.prototype._n ?\n L.DistortableImage.Keymapper.prototype._n + 1 :\n 1\n );\n // dont enable keymapper for mobile\n if (L.DistortableImage.Keymapper.prototype._n === 1 && !L.Browser.mobile) {\n this.enable();\n this._injectIconSet();\n }\n});\n\nL.distortableImage.keymapper = (map, options) => {\n return new L.DistortableImage.Keymapper(map, options);\n};\n","L.DistortableImage = L.DistortableImage || {};\n\n// this class holds the keybindings and toolbar API for an image collection instance\nL.DistortableCollection.Edit = L.Handler.extend({\n options: {\n keymap: L.distortableImage.group_action_map,\n },\n\n initialize(group, options) {\n this._group = group;\n this._exportOpts = group.options.exportOpts;\n\n L.setOptions(this, options);\n\n L.distortableImage.group_action_map.Escape = '_decollectAll';\n },\n\n addHooks() {\n const group = this._group;\n const map = group._map;\n\n this.editActions = this.options.actions;\n this.runExporter =\n L.bind(L.Utils.getNestedVal(this, '_exportOpts', 'exporter') ||\n this.startExport, this);\n\n L.DomEvent.on(document, 'keydown', this._onKeyDown, this);\n\n if (!(map.doubleClickZoom.enabled() || map.doubleClickLabels.enabled())) {\n L.DomEvent.on(map, 'click', this._decollectAll, this);\n }\n\n L.DomEvent.on(map, {\n singleclickon: this._singleClickListeners,\n singleclickoff: this._resetClickListeners,\n singleclick: this._singleClick,\n boxcollectend: this._addCollections,\n }, this);\n\n this._group.editable = true;\n this._group.eachLayer(layer => layer.editing.enable());\n },\n\n removeHooks() {\n const group = this._group;\n const map = group._map;\n\n L.DomEvent.off(document, 'keydown', this._onKeyDown, this);\n\n if (!(map.doubleClickZoom.enabled() || map.doubleClickLabels.enabled())) {\n L.DomEvent.off(map, 'click', this._decollectAll, this);\n }\n\n L.DomEvent.off(map, {\n singleclickon: this._singleClickListeners,\n singleclickoff: this._resetClickListeners,\n singleclick: this._singleClick,\n boxcollectend: this._addCollections,\n }, this);\n\n this._decollectAll();\n this._group.editable = false;\n this._group.eachLayer(layer => layer.editing.disable());\n },\n\n enable() {\n this._enabled = true;\n this.addHooks();\n return this;\n },\n\n disable() {\n this._enabled = false;\n this.removeHooks();\n return this;\n },\n\n _onKeyDown(e) {\n const keymap = this.options.keymap;\n const handlerName = keymap[e.key];\n\n if (!this[handlerName]) { return; }\n\n if (this._group.anyCollected()) {\n this[handlerName].call(this);\n }\n },\n\n _singleClick(e) {\n if (e.type === 'singleclick') { this._decollectAll(e); }\n else { return; }\n },\n\n _singleClickListeners() {\n const map = this._group._map;\n L.DomEvent.off(map, 'click', this._decollectAll, this);\n L.DomEvent.on(map, 'singleclick', this._decollectAll, this);\n },\n\n _resetClickListeners() {\n const map = this._group._map;\n L.DomEvent.on(map, 'click', this._decollectAll, this);\n L.DomEvent.off(map, 'singleclick', this._decollectAll, this);\n },\n\n _decollectAll(e) {\n let oe;\n\n if (e) { oe = e.originalEvent; }\n /**\n * prevents image deselection following the 'boxcollectend' event - note 'shift' must not be released until dragging is complete\n * also prevents deselection following a click on a disabled img by differentiating it from the map\n */\n if (oe && (oe.shiftKey || oe.target instanceof HTMLImageElement)) {\n return;\n }\n\n this._group.eachLayer((layer) => {\n L.DomUtil.removeClass(layer.getElement(), 'collected');\n layer.deselect();\n });\n\n this._removeToolbar();\n\n if (e) { L.DomEvent.stopPropagation(e); }\n },\n\n _unlockGroup() {\n if (!this.hasTool(L.UnlockAction)) { return; }\n\n this._group.eachLayer((layer) => {\n if (this._group.isCollected(layer)) {\n const edit = layer.editing;\n edit._unlock();\n // unlock updates the layer's handles; deselect to ensure they're hidden\n layer.deselect();\n }\n });\n },\n\n _lockGroup() {\n if (!this.hasTool(L.LockAction)) { return; }\n\n this._group.eachLayer((layer) => {\n if (this._group.isCollected(layer) ) {\n const edit = layer.editing;\n edit._lock();\n // map.addLayer also deselects the image, so we reselect here\n L.DomUtil.addClass(layer.getElement(), 'collected');\n }\n });\n },\n\n _addCollections(e) {\n const box = e.boxCollectBounds;\n const map = this._group._map;\n\n this._group.eachLayer((layer) => {\n const edit = layer.editing;\n\n if (layer.isSelected()) { layer.deselect(); }\n\n const zoom = map.getZoom();\n const center = map.getCenter();\n let imgBounds = L.latLngBounds(layer.getCorner(2), layer.getCorner(1));\n\n imgBounds = map._latLngBoundsToNewLayerBounds(imgBounds, zoom, center);\n if (box.intersects(imgBounds) && edit.enabled()) {\n if (!this.toolbar) { this._addToolbar(); }\n L.DomUtil.addClass(layer.getElement(), 'collected');\n }\n });\n },\n\n _removeGroup(e) {\n if (!this.hasTool(L.DeleteAction)) { return; }\n\n const layersToRemove = this._group._toRemove();\n const n = layersToRemove.length;\n\n if (n === 0) { return; }\n\n const choice = L.DomUtil.confirmDeletes(n);\n\n if (choice) {\n layersToRemove.forEach((layer) => {\n this._group.removeLayer(layer);\n });\n if (!this._group.anyCollected()) {\n this._removeToolbar();\n }\n }\n\n if (e) { L.DomEvent.stopPropagation(e); }\n },\n\n cancelExport() {\n if (!this.customCollection) {\n this._exportOpts.collection = undefined;\n }\n\n clearInterval(this.updateInterval);\n },\n\n _addToolbar() {\n const group = this._group;\n const map = group._map;\n\n if (group.options.suppressToolbar || this.toolbar) { return; }\n this.toolbar = L.distortableImage.controlBar({\n actions: this.editActions,\n position: 'topleft',\n }).addTo(map, group);\n },\n\n _removeToolbar() {\n const map = this._group._map;\n if (this.toolbar) {\n map.removeLayer(this.toolbar);\n this.toolbar = false;\n } else {\n return false;\n }\n },\n\n hasTool(value) {\n return this.editActions.some(action => action === value);\n },\n\n addTool(value) {\n if (value.baseClass === 'leaflet-toolbar-icon' && !this.hasTool(value)) {\n this._removeToolbar();\n this.editActions.push(value);\n this._addToolbar();\n }\n return this;\n },\n\n removeTool(value) {\n this.editActions.some((item, idx) => {\n if (this.editActions[idx] === value) {\n this._removeToolbar();\n this.editActions.splice(idx, 1);\n this._addToolbar();\n return true;\n } else {\n return false;\n }\n });\n return this;\n },\n\n startExport() {\n if (!this.hasTool(L.ExportAction)) { return; }\n\n return new Promise((resolve) => {\n const opts = this._exportOpts;\n opts.resolve = resolve; // allow resolving promise in user-defined functions, to stop spinner on completion\n\n let statusUrl;\n this.updateInterval = null;\n\n // this may be overridden to update the UI to show export progress or completion\n const _defaultUpdater = (data) => {\n data = JSON.parse(data);\n // optimization: fetch status directly from google storage:\n if (data.status_url) {\n if (statusUrl !== data.status_url && data.status_url.match('.json')) {\n // if (data.status_url && data.status_url.substr(0,1) === \"/\") {\n // opts.statusUrl = opts.statusUrl + data.status_url;\n // } else {\n statusUrl = data.status_url;\n // }\n }\n\n if (data.status === 'complete') {\n clearInterval(this.updateInterval);\n\n if (!this.customCollection) {\n this._exportOpts.collection = undefined;\n }\n\n resolve();\n if (data.jpg !== null) {\n alert('Export succeeded. ' + opts.exportUrl + data.jpg);\n }\n }\n\n // TODO: update to clearInterval when status == \"failed\" if we update that in this file:\n // https://github.com/publiclab/mapknitter-exporter/blob/main/lib/mapknitterExporter.rb\n console.log(data);\n }\n };\n\n // receives the URL of status.json, and starts running the updater to repeatedly fetch from status.json;\n // this may be overridden to integrate with any UI\n const _defaultHandleStatusRes = (data) => {\n statusUrl = opts.statusUrl + data;\n // repeatedly fetch the status.json\n this.updateInterval = setInterval(() => {\n const reqOpts = {method: 'GET'};\n const req = new Request(`${statusUrl}?${Date.now()}`, reqOpts);\n fetch(req).then((res) => {\n if (res.ok) {\n return res.text();\n }\n }).then(opts.updater);\n }, opts.frequency);\n };\n\n // initiate the export\n const _defaultFetchStatusUrl = (mergedOpts) => {\n const form = new FormData();\n form.append('collection', JSON.stringify(mergedOpts.collection));\n form.append('scale', mergedOpts.scale);\n form.append('upload', true);\n\n const reqOpts = {method: 'POST', body: form};\n const req = new Request(mergedOpts.exportStartUrl, reqOpts);\n fetch(req).then((res) => {\n if (res.ok) {\n return res.text();\n }\n }).then(mergedOpts.handleStatusRes);\n };\n\n // If the user has passed collection property\n this.customCollection = !!opts.collection;\n if (!this.customCollection) {\n opts.collection = this._group.generateExportJson().images;\n }\n\n opts.frequency = opts.frequency || 3000;\n opts.scale = opts.scale || 100; // switch it to _getAvgCmPerPixel !\n opts.updater = opts.updater || _defaultUpdater;\n opts.handleStatusRes = opts.handleStatusRes || _defaultHandleStatusRes;\n opts.fetchStatusUrl = opts.fetchStatusUrl || _defaultFetchStatusUrl;\n\n opts.fetchStatusUrl(opts);\n });\n },\n});\n\nL.distortableCollection.edit = (group, options) => {\n return new L.DistortableCollection.Edit(group, options);\n};\n","L.DistortableImage = L.DistortableImage || {};\n\n// holds the keybindings & toolbar API for an individual image instance\nL.DistortableImage.Edit = L.Handler.extend({\n options: {\n opacity: 0.5,\n outline: '1px solid red',\n keymap: L.distortableImage.action_map,\n },\n\n initialize(overlay, options) {\n this._overlay = overlay;\n this._toggledImage = false;\n this._mode = overlay.options.mode;\n this._transparent = false;\n this._outlined = false;\n this._opacity = options.opacity;\n\n L.setOptions(this, options);\n\n L.distortableImage.action_map.Escape = '_deselect';\n },\n\n /* Run on image selection. */\n addHooks() {\n const overlay = this._overlay;\n\n this.editActions = this.options.actions;\n\n /* bring the selected image into view */\n overlay.bringToFront();\n this._initModes();\n this._initHandles();\n this._appendHandlesandDragable();\n\n if (overlay.isSelected() && !overlay.options.suppressToolbar) {\n this._addToolbar();\n }\n\n this.parentGroup = overlay.eP ? overlay.eP : false;\n\n L.DomEvent.on(overlay.getElement(), {\n dblclick: this.nextMode,\n }, this);\n\n L.DomEvent.on(window, 'keydown', this._onKeyDown, this);\n },\n\n /* Run on image deselection. */\n removeHooks() {\n const overlay = this._overlay;\n const eP = this.parentGroup;\n\n // First, check if dragging exists - it may be off due to locking\n this._disableDragging();\n\n if (this.toolbar) { this._removeToolbar(); }\n\n for (const handle in this._handles) {\n L.DomUtil.remove(handle);\n }\n\n /**\n * ensures if you disable an image while it is multi-selected\n * additional deselection logic is run\n */\n if (L.DomUtil.hasClass(overlay.getElement(), 'collected')) {\n L.DomUtil.removeClass(overlay.getElement(), 'collected');\n }\n\n if (eP && (!eP.anyCollected() && eP.editing.toolbar)) {\n eP.editing._removeToolbar();\n }\n\n L.DomEvent.off(overlay.getElement(), {\n dblclick: this.nextMode,\n }, this);\n\n L.DomEvent.off(window, 'keydown', this._onKeyDown, this);\n },\n\n disable() {\n if (!this._enabled) { return this; }\n\n this._overlay.deselect();\n this._enabled = false;\n this.removeHooks();\n return this;\n },\n\n _initModes() {\n this._modes = {};\n // passed from L.DistortablImage.PopupBar. If the mode is one\n // of the current toolbar actions, adds it to this._modes\n for (const mode in L.DistortableImage.Edit.MODES) {\n const action = L.DistortableImage.Edit.MODES[mode];\n if (this.editActions.indexOf(action) !== -1) {\n this._modes[mode] = action;\n }\n }\n\n // sets the current mode to the 1st available one if the one selected\n // during initialization is not available\n if (!this._modes[this._mode]) {\n this._mode = Object.keys(this._modes)[0];\n }\n },\n\n\n _initHandles() {\n const overlay = this._overlay;\n let i;\n\n this._dragHandles = L.layerGroup();\n for (i = 0; i < 4; i++) {\n this._dragHandles.addLayer(L.dragHandle(overlay, i));\n }\n\n this._scaleHandles = L.layerGroup();\n for (i = 0; i < 4; i++) {\n this._scaleHandles.addLayer(L.scaleHandle(overlay, i));\n }\n\n this._distortHandles = L.layerGroup();\n for (i = 0; i < 4; i++) {\n this._distortHandles.addLayer(L.distortHandle(overlay, i));\n }\n\n this._rotateHandles = L.layerGroup(); // individual rotate\n for (i = 0; i < 4; i++) {\n this._rotateHandles.addLayer(L.rotateHandle(overlay, i));\n }\n\n // handle includes rotate AND scale\n this._freeRotateHandles = L.layerGroup();\n for (i = 0; i < 4; i++) {\n this._freeRotateHandles.addLayer(L.freeRotateHandle(overlay, i));\n }\n\n this._lockHandles = L.layerGroup();\n for (i = 0; i < 4; i++) {\n this._lockHandles.addLayer(L.lockHandle(overlay, i, {draggable: false}));\n }\n\n this._handles = {\n drag: this._dragHandles,\n scale: this._scaleHandles,\n distort: this._distortHandles,\n rotate: this._rotateHandles,\n freeRotate: this._freeRotateHandles,\n lock: this._lockHandles,\n };\n },\n\n _appendHandlesandDragable() {\n const ov = this._overlay;\n\n // won't throw error if user adds 0 mode actions to toolbar\n if (!this._mode) {\n this._enableDragging();\n return;\n }\n\n this._updateHandle();\n\n if (!ov.isSelected() && this.currentHandle) {\n this.currentHandle.eachLayer((handle) => {\n handle.setOpacity(0);\n if (handle.dragging) { handle.dragging.disable(); }\n });\n }\n if (!this.isMode('lock')) { this._enableDragging(); }\n },\n\n _onKeyDown(e) {\n const keymap = this.options.keymap;\n const handlerName = keymap[e.key];\n const ov = this._overlay;\n const eP = this.parentGroup;\n\n if (eP && eP.anyCollected()) { return; }\n\n if (this[handlerName] !== undefined && !ov.options.suppressToolbar) {\n if (ov.isSelected() && this.toolbar) {\n this[handlerName].call(this);\n }\n }\n },\n\n replaceTool(old, next) {\n if (next.baseClass !== 'leaflet-toolbar-icon' || this.hasTool(next)) {\n return this;\n }\n this.editActions.some((item, idx) => {\n if (item === old) {\n this._removeToolbar();\n this.editActions[idx] = next;\n this._addToolbar();\n for (const mode in L.DistortableImage.Edit.MODES) {\n if (L.DistortableImage.Edit.MODES[mode] === old) {\n delete this._modes[mode];\n this._nextOrNone(mode);\n } else if (L.DistortableImage.Edit.MODES[mode] === next) {\n this._modes[mode] = next;\n }\n }\n return true;\n }\n });\n return this;\n },\n\n addTool(value) {\n if (value.baseClass === 'leaflet-toolbar-icon' && !this.hasTool(value)) {\n this._removeToolbar();\n this.editActions.push(value);\n this._addToolbar();\n for (const mode in L.DistortableImage.Edit.MODES) {\n if (L.DistortableImage.Edit.MODES[mode] === value) {\n this._modes[mode] = value;\n }\n }\n if (!this._overlay.isSelected()) { this._removeToolbar(); }\n }\n return this;\n },\n\n hasTool(value) {\n return this.editActions.some(action => action === value);\n },\n\n removeTool(value) {\n this.editActions.some((item, idx) => {\n if (item === value) {\n this._removeToolbar();\n this.editActions.splice(idx, 1);\n this._addToolbar();\n for (const mode in L.DistortableImage.Edit.MODES) {\n if (L.DistortableImage.Edit.MODES[mode] === value) {\n delete this._modes[mode];\n this._nextOrNone(mode);\n }\n }\n return true;\n }\n });\n if (!this._overlay.isSelected()) { this._removeToolbar(); }\n return this;\n },\n\n // set the mode to the next mode or if that was the last one set mode to ''\n _nextOrNone(mode) {\n if (this.isMode(mode)) {\n if (Object.keys(this.getModes()).length >= 1) {\n this.nextMode();\n } else {\n if (mode === 'lock') { this._enableDragging(); }\n this._mode = '';\n this._updateHandle();\n }\n }\n },\n\n _removeToolbar() {\n const ov = this._overlay;\n const map = ov._map;\n\n if (this.toolbar) {\n map.removeLayer(this.toolbar);\n this.toolbar = false;\n }\n },\n\n _enableDragging() {\n const overlay = this._overlay;\n const map = overlay._map;\n\n this.dragging = new L.Draggable(overlay.getElement());\n this.dragging.enable();\n\n /* Hide toolbars and markers while dragging; click will re-show it */\n this.dragging.on('dragstart', () => {\n overlay.fire('dragstart');\n this._removeToolbar();\n });\n\n /*\n * Adjust default behavior of L.Draggable, which overwrites the CSS3\n * distort transformations that we set when it calls L.DomUtil.setPosition.\n */\n this.dragging._updatePosition = function() {\n const topLeft = overlay.getCorner(0);\n const delta = this._newPos.subtract(map.latLngToLayerPoint(topLeft));\n let currentPoint;\n const corners = {};\n let i;\n\n this.fire('predrag');\n\n for (i = 0; i < 4; i++) {\n currentPoint = map.latLngToLayerPoint(overlay.getCorner(i));\n corners[i] = map.layerPointToLatLng(currentPoint.add(delta));\n }\n\n overlay.setCorners(corners);\n overlay.fire('drag');\n\n this.fire('drag');\n };\n\n this.dragging.on('dragend', () => {\n overlay.fire('dragend');\n });\n },\n\n _disableDragging() {\n if (this.dragging) {\n this.dragging.disable();\n delete this.dragging;\n }\n },\n\n _dragMode() {\n this.setMode('drag');\n },\n\n _scaleMode() {\n this.setMode('scale');\n },\n\n _distortMode() {\n this.setMode('distort');\n },\n\n _rotateMode() {\n this.setMode('rotate');\n },\n\n _freeRotateMode() {\n this.setMode('freeRotate');\n },\n\n _toggleLockMode() {\n if (this.isMode('lock')) { this._unlock(); }\n else { this._lock(); }\n },\n\n _toggleOpacity() {\n const image = this._overlay.getElement();\n\n if (!this.hasTool(L.OpacityAction)) { return; }\n\n this._transparent = !this._transparent;\n const opacity = this._transparent ? this.options.opacity : 1;\n\n L.DomUtil.setOpacity(image, opacity);\n image.setAttribute('opacity', opacity);\n\n this._refresh();\n },\n\n _setOpacities(o) {\n const image = this._overlay.getElement();\n this._opacity = o;\n if (!this.hasTool(L.OpacitiesAction)) { return; }\n\n (this._opacity < 1) ? this._transparent = true : this._transparent = false;\n\n L.DomUtil.setOpacity(image, this._opacity);\n image.setAttribute('opacity', this._opacity);\n\n this._refresh();\n },\n\n _toggleBorder() {\n const image = this._overlay.getElement();\n\n if (!this.hasTool(L.BorderAction)) { return; }\n\n this._outlined = !this._outlined;\n const outline = this._outlined ? this.options.outline : 'none';\n\n image.style.outline = outline;\n\n this._refresh();\n },\n\n // compare this to using overlay zIndex\n _toggleOrder() {\n if (this._toggledImage) { this._stackUp(); }\n else { this._stackDown(); }\n },\n\n _removeOverlay() {\n const ov = this._overlay;\n const eP = this.parentGroup;\n\n if (this.isMode('lock') || !this.hasTool(L.DeleteAction)) { return; }\n\n const choice = L.DomUtil.confirmDelete();\n if (!choice) { return; }\n\n this._removeToolbar();\n\n if (eP) { eP.removeLayer(ov); }\n else { ov._map.removeLayer(ov); }\n },\n\n // Based on https://github.com/publiclab/mapknitter/blob/8d94132c81b3040ae0d0b4627e685ff75275b416/app/assets/javascripts/mapknitter/Map.js#L47-L82\n _getExport() {\n const overlay = this._overlay;\n const map = overlay._map;\n const img = overlay.getElement();\n\n if (!this.hasTool(L.ExportAction)) { return; }\n\n // make a new image\n const downloadable = new Image();\n\n downloadable.id = downloadable.id || 'tempId12345';\n document.body.appendChild(downloadable);\n\n downloadable.onload = function onLoadDownloadableImage() {\n const height = downloadable.height;\n const width = downloadable.width;\n const nw = map.latLngToLayerPoint(overlay.getCorner(0));\n const ne = map.latLngToLayerPoint(overlay.getCorner(1));\n const sw = map.latLngToLayerPoint(overlay.getCorner(2));\n const se = map.latLngToLayerPoint(overlay.getCorner(3));\n\n // I think this is to move the image to the upper left corner,\n // eslint-disable-next-line max-len\n // jywarren: i think we may need these or the image goes off the edge of the canvas\n // jywarren: but these seem to break the distortion math...\n\n // jywarren: i think it should be rejiggered so it\n // finds the most negative values of x and y and then\n // adds those to all coordinates\n\n // nw.x -= nw.x;\n // ne.x -= nw.x;\n // se.x -= nw.x;\n // sw.x -= nw.x;\n\n // nw.y -= nw.y;\n // ne.y -= nw.y;\n // se.y -= nw.y;\n // sw.y -= nw.y;\n\n // run once warping is complete\n downloadable.onload = function() {\n L.DomUtil.remove(downloadable);\n };\n\n if (window && window.hasOwnProperty('warpWebGl')) {\n warpWebGl(\n downloadable.id,\n [0, 0, width, 0, width, height, 0, height],\n [nw.x, nw.y, ne.x, ne.y, se.x, se.y, sw.x, sw.y],\n true // trigger download\n );\n }\n };\n\n downloadable.src = overlay.options.fullResolutionSrc || img.src;\n },\n\n _stackUp() {\n const t = this._toggledImage;\n\n if (!t || !this.hasTool(L.StackAction)) { return; }\n\n this._toggledImage = false;\n this._overlay.bringToFront();\n this._refresh();\n },\n\n _stackDown() {\n const t = this._toggledImage;\n\n if (t || !this.hasTool(L.StackAction)) { return; }\n\n this._toggledImage = true;\n this._overlay.bringToBack();\n this._refresh();\n },\n\n _unlock() {\n const ov = this._overlay;\n const map = ov._map;\n const eP = this.parentGroup;\n\n if (!this.isMode('lock')) { return; }\n if ((eP && !eP.isCollected(ov)) || !eP) {\n if (!this.hasTool(L.LockAction)) { return; }\n }\n\n if (this.currentHandle) { map.removeLayer(this.currentHandle); }\n if (ov.options.mode === 'lock' || !this.hasMode(ov.options.mode)) {\n this._mode = '';\n this.currentHandle = '';\n } else {\n this._mode = ov.options.mode;\n }\n this._updateHandle();\n this._enableDragging();\n this._refresh();\n },\n\n _lock() {\n const ov = this._overlay;\n const map = ov._map;\n const eP = this.parentGroup;\n\n if (this.isMode('lock')) { return; }\n if ((eP && !eP.isCollected(ov)) || !eP) {\n if (!this.hasTool(L.LockAction)) { return; }\n }\n\n if (this.currentHandle) { map.removeLayer(this.currentHandle); }\n this._mode = 'lock';\n this._updateHandle();\n this._disableDragging();\n this._refresh();\n },\n\n _deselect() {\n this._overlay.deselect();\n },\n\n _showMarkers(e) {\n const eP = this.parentGroup;\n\n if (!this.currentHandle) { return; }\n // only markers we want in collect interface for now is lock\n if (!this.isMode('lock') && (eP && eP.anyCollected())) { return; }\n\n this.currentHandle.eachLayer((handle) => {\n handle.setOpacity(1);\n if (handle.dragging) { handle.dragging.enable(); }\n L.DomUtil.addClass(handle.getElement(), 'leaflet-interactive');\n });\n },\n\n _hideMarkers() {\n const ov = this._overlay;\n const eP = this.parentGroup;\n\n // workaround for race condition w/ feature group\n if (!this._handles) { this._initHandles(); }\n\n if (!this.currentHandle) { return; }\n if (this.isMode('lock') && (eP && eP.isCollected(ov))) { return; }\n\n this.currentHandle.eachLayer((handle) => {\n handle.setOpacity(0);\n if (handle.dragging) { handle.dragging.disable(); }\n L.DomUtil.removeClass(handle.getElement(), 'leaflet-interactive');\n });\n },\n\n _updateHandle() {\n const ov = this._overlay;\n const map = ov._map;\n const mode = this.getMode();\n\n if (this.currentHandle) { map.removeLayer(this.currentHandle); }\n this.currentHandle = mode === '' ? '' : this._handles[mode];\n if (this.currentHandle !== '') {\n map.addLayer(this.currentHandle);\n }\n },\n\n _addToolbar() {\n const ov = this._overlay;\n const eP = this.parentGroup;\n const map = ov._map;\n // Find the topmost point on the image.\n const corners = ov.getCorners();\n let maxLat = -Infinity;\n\n if (eP && eP.anyCollected()) {\n eP.editing._addToolbar();\n return;\n }\n\n if (ov.options.suppressToolbar || this.toolbar) { return; }\n\n for (let i = 0; i < corners.length; i++) {\n if (corners[i].lat > maxLat) {\n maxLat = corners[i].lat;\n }\n }\n\n // Longitude is based on the centroid of the image.\n const raisedPoint = ov.getCenter();\n raisedPoint.lat = maxLat;\n\n this.toolbar = L.distortableImage.popupBar(raisedPoint, {\n actions: this.editActions,\n }).addTo(map, ov);\n ov.fire('toolbar:created');\n },\n\n _refresh() {\n if (this.toolbar) { this._removeToolbar(); }\n this._addToolbar();\n },\n\n _updateToolbarPos() {\n const overlay = this._overlay;\n // Find the topmost point on the image.\n const corners = overlay.getCorners();\n const toolbar = this.toolbar;\n let maxLat = -Infinity;\n\n if (toolbar && toolbar instanceof L.DistortableImage.PopupBar) {\n for (let i = 0; i < corners.length; i++) {\n if (corners[i].lat > maxLat) {\n maxLat = corners[i].lat;\n }\n }\n\n // Longitude is based on the centroid of the image.\n const raisedPoint = overlay.getCenter();\n raisedPoint.lat = maxLat;\n\n if (!overlay.options.suppressToolbar) {\n this.toolbar.setLatLng(raisedPoint);\n }\n }\n },\n\n hasMode(mode) {\n return !!this._modes[mode];\n },\n\n getMode() {\n if (!this.enabled()) { return; }\n return this._mode;\n },\n\n getModes() {\n return this._modes;\n },\n\n isMode(mode) {\n if (!this.enabled()) { return false; }\n return this._mode === mode;\n },\n\n setMode(newMode) {\n const ov = this._overlay;\n const eP = this.parentGroup;\n const mode = this.getMode();\n\n if (mode === newMode || !this.hasMode(newMode) || !this.enabled()) {\n return;\n }\n\n if (this.toolbar) { this.toolbar.clickTool(newMode); }\n if (this.isMode('lock') && !this.dragging) { this._enableDragging(); }\n this._mode = newMode;\n if (this.isMode('lock')) { this._disableDragging(); }\n this._updateHandle();\n this._refresh();\n\n if (eP && eP.isCollected(ov)) { ov.deselect(); }\n\n return this;\n },\n\n /**\n * need to attach a stop to img dblclick or it will propagate to\n * the map and fire the handler that shows map location labels on map dblclick.\n */\n nextMode(e) {\n const mode = this.getMode();\n const eP = this.parentGroup;\n const modesArray = Object.keys(this.getModes());\n const idx = modesArray.indexOf(mode);\n const nextIdx = (idx + 1) % modesArray.length;\n const newMode = modesArray[nextIdx];\n\n if (e) {\n if (eP && eP.anyCollected()) { return; }\n L.DomEvent.stop(e);\n }\n\n return this.setMode(newMode);\n },\n});\n\nL.distortableImage.edit = (overlay, options) => {\n return new L.DistortableImage.Edit(overlay, options);\n};\n","L.BorderAction = L.EditAction.extend({\n initialize(map, overlay, options) {\n const edit = overlay.editing;\n const mode = edit._mode;\n let use;\n let tooltip;\n\n if (edit._outlined) {\n use = 'border_outer';\n tooltip = overlay.options.translation.removeBorder;\n } else {\n use = 'border_clear';\n tooltip = overlay.options.translation.addBorder;\n }\n\n options = options || {};\n options.toolbarIcon = {\n svg: true,\n html: use,\n tooltip: tooltip,\n className: mode === 'lock' ? 'disabled' : '',\n };\n\n // conditional for disabling keybindings for this action when the image is locked.\n L.DistortableImage.action_map.b = mode === 'lock' ? '' : '_toggleBorder';\n\n L.EditAction.prototype.initialize.call(this, map, overlay, options);\n },\n\n addHooks() {\n const edit = this._overlay.editing;\n\n L.IconUtil.toggleXlink(this._link, 'border_clear', 'border_outer');\n L.IconUtil.toggleTitle(this._link, 'Remove Border', 'Add Border');\n edit._toggleBorder();\n },\n});\n","L.DeleteAction = L.EditAction.extend({\n initialize(map, overlay, options) {\n const edit = overlay.editing;\n const use = 'delete_forever';\n let tooltip;\n /**\n * we can tell whether the overlay is an instance of `L.DistortableImageOverlay` or `L.DistortableCollection` bc only\n * the former should have `parentGroup` defined on it. From there we call the apporpriate keybindings and methods.\n */\n if (edit instanceof L.DistortableImage.Edit) {\n tooltip = overlay.options.translation.deleteImage;\n // backspace windows / delete mac\n L.DistortableImage.action_map.Backspace = (\n edit._mode === 'lock' ? '' : '_removeOverlay'\n );\n } else {\n tooltip = overlay.options.translation.deleteImages;\n L.DistortableImage.group_action_map.Backspace = (\n edit._mode === 'lock' ? '' : '_removeGroup'\n );\n }\n\n options = options || {};\n options.toolbarIcon = {\n svg: true,\n html: use,\n tooltip: tooltip,\n className: edit._mode === 'lock' ? 'disabled' : '',\n };\n\n L.EditAction.prototype.initialize.call(this, map, overlay, options);\n },\n\n addHooks() {\n const edit = this._overlay.editing;\n\n if (edit instanceof L.DistortableImage.Edit) { edit._removeOverlay(); }\n else { edit._removeGroup(); }\n },\n});\n","L.DistortAction = L.EditAction.extend({\n initialize(map, overlay, options) {\n options = options || {};\n options.toolbarIcon = {\n svg: true,\n html: 'distort',\n tooltip: overlay.options.translation.distortImage,\n className: 'distort',\n };\n\n L.DistortableImage.action_map.d = '_distortMode';\n L.EditAction.prototype.initialize.call(this, map, overlay, options);\n },\n\n addHooks() {\n const edit = this._overlay.editing;\n edit._distortMode();\n },\n});\n","L.DragAction = L.EditAction.extend({\n initialize(map, overlay, options) {\n options = options || {};\n options.toolbarIcon = {\n svg: true,\n html: 'drag',\n tooltip: overlay.options.translation.dragImage,\n className: 'drag',\n };\n\n L.DistortableImage.action_map.D = '_dragMode';\n L.EditAction.prototype.initialize.call(this, map, overlay, options);\n },\n\n addHooks() {\n const edit = this._overlay.editing;\n edit._dragMode();\n },\n});\n","L.DistortableImage = L.DistortableImage || {};\nL.distortableImage = L.DistortableImage;\n\nL.DistortableImage.action_map = {};\n\nL.EditAction = L.Toolbar2.Action.extend({\n options: {\n toolbarIcon: {\n svg: false,\n html: '',\n className: '',\n tooltip: '',\n },\n },\n\n initialize(map, overlay, options) {\n this._overlay = overlay;\n this._map = map;\n\n L.setOptions(this, options);\n L.Toolbar2.Action.prototype.initialize.call(this, options);\n\n this._injectIconSet();\n },\n\n _createIcon(toolbar, container, args) {\n const iconOptions = this.options.toolbarIcon;\n const className = iconOptions.className;\n const edit = this._overlay.editing;\n const style = this.options.toolbarIcon.style;\n\n this.toolbar = toolbar;\n this._icon = L.DomUtil.create('li', '', container);\n this._link = L.DomUtil.create('a', '', this._icon);\n\n if (iconOptions.svg) {\n this._link.innerHTML = L.IconUtil.create(iconOptions.html);\n } else {\n this._link.innerHTML = iconOptions.html;\n }\n\n this._link.setAttribute('href', '#');\n this._link.setAttribute('title', iconOptions.tooltip);\n if (style) { this._link.setAttribute('style', style); };\n this._link.setAttribute('role', 'button');\n\n L.DomUtil.addClass(this._link, this.constructor.baseClass);\n\n if (className) {\n L.DomUtil.addClass(this._link, className);\n if (className === 'disabled') {\n L.DomUtil.addClass(this._icon, className);\n }\n if (className === edit._mode) {\n L.DomUtil.addClass(this._link, 'selected-mode');\n } else {\n L.DomUtil.removeClass(this._link, 'selected-mode');\n }\n }\n\n L.DomEvent.on(this._link, 'click', this.enable, this);\n L.DomEvent.on(this._overlay, 'update', () => {\n const match = this._link.innerHTML.match(/xlink:href=\"#restore\"/);\n if (match && match.length === 1) { this._enableAction(); }\n });\n\n /* Add secondary toolbar */\n this._addSubToolbar(toolbar, this._icon, args);\n },\n\n _injectIconSet() {\n if (document.querySelector('#iconset')) {\n return;\n }\n\n const el = document.createElement('div');\n el.id = 'iconset';\n el.setAttribute('hidden', 'hidden');\n el.innerHTML = new L.ToolbarIconSet().render();\n\n document.querySelector('.leaflet-marker-pane').appendChild(el);\n },\n\n _enableAction() {\n L.DomUtil.removeClass(this._link.parentElement, 'disabled');\n L.DomUtil.removeClass(this._link, 'disabled');\n },\n\n _disableAction() {\n L.DomUtil.addClass(this._link.parentElement, 'disabled');\n L.DomUtil.addClass(this._link, 'disabled');\n },\n});\n\nL.editAction = function(map, overlay, options) {\n return new L.EditAction(map, overlay, options);\n};\n","L.ExportAction = L.EditAction.extend({\n // This function is executed every time we select an image\n initialize(map, overlay, options) {\n const edit = overlay.editing;\n let tooltip;\n\n this.isExporting = false;\n this.mouseLeaveSkip = true;\n this.isHooksExecuted = false;\n\n if (edit instanceof L.DistortableImage.Edit) {\n L.DistortableImage.action_map.e = '_getExport';\n tooltip = overlay.options.translation.exportImage;\n } else {\n L.DistortableImage.group_action_map.e = 'runExporter';\n tooltip = overlay.options.translation.exportImages;\n }\n\n options = options || {};\n options.toolbarIcon = {\n svg: true,\n html: 'get_app',\n tooltip: tooltip,\n };\n\n L.EditAction.prototype.initialize.call(this, map, overlay, options);\n },\n\n addHooks() {\n const edit = this._overlay.editing;\n\n if (edit instanceof L.DistortableImage.Edit) {\n edit._getExport();\n return;\n }\n\n // Make sure that addHooks is executed only once, event listeners will handle the rest\n if (this.isHooksExecuted) {\n return;\n } else {\n this.isHooksExecuted = true;\n }\n\n const exportTool = this._link.parentElement;\n\n this.mouseEnterHandler = this.handleMouseEnter.bind(this);\n this.mouseLeaveHandler = this.handleMouseLeave.bind(this);\n\n L.DomEvent.on(exportTool, 'click', function() {\n if (!this.isExporting) {\n this.isExporting = true;\n this.renderExportIcon();\n\n setTimeout(this.attachMouseEventListeners.bind(this, exportTool), 100);\n edit.runExporter().then(\n function() {\n this.resetState();\n this.detachMouseEventListeners(exportTool);\n }.bind(this)\n );\n } else {\n // Clicking on the export icon after export has started will be ignored\n if (this.mouseLeaveSkip) {\n return;\n }\n\n this.resetState();\n this.detachMouseEventListeners(exportTool);\n edit.cancelExport();\n }\n }, this);\n },\n\n resetState() {\n this.renderDownloadIcon();\n this.isExporting = false;\n this.mouseLeaveSkip = true;\n },\n\n attachMouseEventListeners(element) {\n element.addEventListener('mouseenter', this.mouseEnterHandler);\n element.addEventListener('mouseleave', this.mouseLeaveHandler);\n },\n\n detachMouseEventListeners(element) {\n element.removeEventListener('mouseenter', this.mouseEnterHandler);\n element.removeEventListener('mouseleave', this.mouseLeaveHandler);\n },\n\n handleMouseEnter() {\n this.renderCancelIcon();\n },\n\n handleMouseLeave() {\n if (this.mouseLeaveSkip) {\n this.mouseLeaveSkip = false;\n } else {\n this.renderExportIcon();\n }\n },\n\n renderDownloadIcon() {\n L.IconUtil.toggleXlink(this._link, 'get_app', 'spinner');\n L.IconUtil.toggleTitle(this._link, 'Export Images', 'Loading...');\n L.DomUtil.removeClass(this._link.firstChild, 'loader');\n },\n\n renderExportIcon() {\n L.IconUtil.toggleXlink(this._link, 'spinner');\n L.IconUtil.toggleTitle(this._link, 'Export Images', 'Loading...');\n L.IconUtil.addClassToSvg(this._link, 'loader');\n },\n\n renderCancelIcon() {\n L.IconUtil.toggleXlink(this._link, 'cancel');\n L.IconUtil.toggleTitle(this._link, 'Cancel Export', 'Loading...');\n L.DomUtil.removeClass(this._link.firstChild, 'loader');\n },\n});\n","L.FreeRotateAction = L.EditAction.extend({\n initialize(map, overlay, options) {\n options = options || {};\n options.toolbarIcon = {\n svg: true,\n html: 'crop_rotate',\n tooltip: overlay.options.translation.freeRotateImage,\n className: 'freeRotate',\n };\n\n L.DistortableImage.action_map.f = '_freeRotateMode';\n L.EditAction.prototype.initialize.call(this, map, overlay, options);\n },\n\n addHooks() {\n const edit = this._overlay.editing;\n edit._freeRotateMode();\n },\n});\n","L.GeolocateAction = L.EditAction.extend({\n initialize(map, overlay, options) {\n const edit = overlay.editing;\n\n options = options || {};\n options.toolbarIcon = {\n svg: true,\n html: 'explore',\n tooltip: overlay.options.translation.geolocateImage,\n className: edit._mode === 'lock' ? 'disabled' : '',\n };\n\n L.EditAction.prototype.initialize.call(this, map, overlay, options);\n },\n\n addHooks() {\n const image = this._overlay.getElement();\n\n EXIF.getData(image, L.EXIF(image));\n },\n});\n","L.LockAction = L.EditAction.extend({\n initialize(map, overlay, options) {\n const edit = overlay.editing;\n let use;\n let tooltip;\n\n if (edit instanceof L.DistortableImage.Edit) {\n L.DistortableImage.action_map.u = '_unlock';\n L.DistortableImage.action_map.l = '_lock';\n tooltip = overlay.options.translation.lockMode;\n\n use = edit.isMode('lock') ? 'lock' : 'unlock';\n } else {\n L.DistortableImage.group_action_map.l = '_lockGroup';\n tooltip = overlay.options.translation.lockImages;\n use = 'lock';\n }\n\n options = options || {};\n options.toolbarIcon = {\n svg: true,\n html: use,\n tooltip: tooltip,\n className: 'lock',\n };\n\n L.EditAction.prototype.initialize.call(this, map, overlay, options);\n },\n\n addHooks() {\n const edit = this._overlay.editing;\n\n if (edit instanceof L.DistortableImage.Edit) { edit._toggleLockMode(); }\n else { edit._lockGroup(); }\n },\n});\n","let opacities = [100, 80, 60, 40, 20, 0]; // Set numeric values from 0 to 100.\n\n// Add custom CSS scripts and overwrites. Pending for better implementation of CSSStyleSheet in browsers.\nconst subtoolbarCss = new CSSStyleSheet();\nsubtoolbarCss.replaceSync(\n `.leaflet-toolbar-icon-vertical {\n box-sizing: border-box !important;\n display: block !important;\n width: 30px !important;\n height: 30px !important;\n line-height: 30px !important;\n padding: 0 !important;\n text-align: center !important;\n text-decoration: none !important;\n background-color: #fff;\n border: inset 0.5px lightgray !important;\n font-size: 12px !important;\n font-weight: bold !important;\n color:#0087A8 !important;\n float: none !important;\n margin: auto !important;\n z-index:900 !important;\n }\n `\n);\n\nsubtoolbarCss.insertRule(\n `.leaflet-toolbar-1 li:first-child a {\n border-radius: 4px 4px 0px 0px !important;\n }`\n);\ndocument.adoptedStyleSheets = [subtoolbarCss];\n\nopacities = opacities.map((o) => {\n (isNaN(o) || o > 100) ? o = 100 : o;\n (o < 0) ? o = 0 : o;\n\n return L.EditAction.extend({\n options: {\n toolbarIcon: {\n html: o,\n tooltip: 'Opacity ' + o +'%',\n className: 'leaflet-toolbar-icon-vertical',\n style: 'background-color:rgb(' + (100 - o) + '%,' + (100 - o) + '%,' + (100 - o) + '%);',\n },\n },\n addHooks() {\n this._overlay.editing._setOpacities(o/100);\n },\n });\n});\n\nL.OpacitiesToolbar2 = L.Toolbar2.extend({\n options: {\n className: '',\n filter: function() { return true; },\n actions: [],\n style: `translate(-1px, -${ ((opacities.length + 1) * 30)}px)`,\n },\n\n appendToContainer(container) {\n let baseClass = this.constructor.baseClass + '-' + this._calculateDepth();\n let className = baseClass + ' ' + this.options.className;\n let Action; let action;\n let i; let j; let l; let m;\n\n this._container = container;\n this._ul = L.DomUtil.create('ul', className, container);\n this._ul.style.transform = ( this.options.style ) ? this.options.style : '';\n\n // Ensure that clicks, drags, etc. don't bubble up to the map.\n // These are the map events that the L.Draw.Polyline handler listens for.\n // Note that L.Draw.Polyline listens to 'mouseup', not 'mousedown', but\n // if only 'mouseup' is silenced, then the map gets stuck in a halfway\n // state because it receives a 'mousedown' event and is waiting for the\n // corresponding 'mouseup' event.\n this._disabledEvents = [\n 'click', 'mousemove', 'dblclick',\n 'mousedown', 'mouseup', 'touchstart',\n ];\n\n for (j = 0, m = this._disabledEvents.length; j < m; j++) {\n L.DomEvent.on(this._ul, this._disabledEvents[j], L.DomEvent.stopPropagation);\n }\n\n /* Instantiate each toolbar action and add its corresponding toolbar icon. */\n for (i = 0, l = this.options.actions.length; i < l; i++) {\n Action = this._getActionConstructor(this.options.actions[i]);\n\n action = new Action();\n action._createIcon(this, this._ul, this._arguments);\n }\n },\n});\n\n\nL.OpacitiesAction = L.EditAction.extend({\n initialize(map, overlay, options) {\n const edit = overlay.editing;\n const mode = edit._mode;\n\n options = options || {};\n options.toolbarIcon = {\n svg: true,\n html: 'opacities',\n tooltip: 'Set custom opacity',\n className: mode === 'lock' ? 'disabled' : '',\n };\n\n options.subToolbar = new L.OpacitiesToolbar2({\n actions: opacities,\n });\n\n L.DistortableImage.action_map.o = mode === 'lock' ? '' : '_setOpacities';\n\n L.EditAction.prototype.initialize.call(this, map, overlay, options);\n },\n\n addHooks() {\n const link = this._link;\n if (L.DomUtil.hasClass(link, 'subtoolbar_enabled')) {\n L.DomUtil.removeClass(link, 'subtoolbar_enabled');\n setTimeout(() => {\n this.options.subToolbar._hide();\n }, 100);\n } else {\n L.DomUtil.addClass(link, 'subtoolbar_enabled');\n };\n\n L.IconUtil.toggleXlink(link, 'opacities', 'cancel');\n L.IconUtil.toggleTitle(link, 'Make Image Transparent', 'Cancel');\n },\n});\n","L.OpacityAction = L.EditAction.extend({\n initialize(map, overlay, options) {\n const edit = overlay.editing;\n const mode = edit._mode;\n let use;\n let tooltip;\n\n if (edit._transparent) {\n use = 'opacity_empty';\n tooltip = overlay.options.translation.makeImageOpaque;\n } else {\n use = 'opacity';\n tooltip = overlay.options.translation.makeImageTransparent;\n }\n\n options = options || {};\n options.toolbarIcon = {\n svg: true,\n html: use,\n tooltip: tooltip,\n className: mode === 'lock' ? 'disabled' : '',\n };\n\n L.DistortableImage.action_map.o = mode === 'lock' ? '' : '_toggleOpacity';\n\n L.EditAction.prototype.initialize.call(this, map, overlay, options);\n },\n\n addHooks() {\n const edit = this._overlay.editing;\n const link = this._link;\n\n L.IconUtil.toggleXlink(link, 'opacity', 'opacity_empty');\n L.IconUtil.toggleTitle(link, 'Make Image Transparent', 'Make Image Opaque');\n edit._toggleOpacity();\n },\n});\n","L.RestoreAction = L.EditAction.extend({\n initialize(map, overlay, options) {\n const mode = L.Utils.getNestedVal(overlay, 'editing', '_mode');\n const edited = overlay.edited;\n\n options = options || {};\n options.toolbarIcon = {\n svg: true,\n html: 'restore',\n tooltip: overlay.options.translation.restoreImage,\n className: edited && mode !== 'lock' ? '' : 'disabled',\n };\n\n L.EditAction.prototype.initialize.call(this, map, overlay, options);\n },\n\n addHooks() {\n const ov = this._overlay;\n\n L.DomEvent.on(ov, {\n edit: this._enableAction,\n restore: this._disableAction,\n }, this);\n\n ov.restore();\n },\n});\n","L.RotateAction = L.EditAction.extend({\n initialize(map, overlay, options) {\n options = options || {};\n options.toolbarIcon = {\n svg: true,\n html: 'rotate',\n tooltip: overlay.options.translation.rotateImage,\n className: 'rotate',\n };\n\n L.DistortableImage.action_map.r = '_rotateMode';\n L.EditAction.prototype.initialize.call(this, map, overlay, options);\n },\n\n addHooks() {\n const edit = this._overlay.editing;\n edit._rotateMode();\n },\n});\n","L.ScaleAction = L.EditAction.extend({\n initialize(map, overlay, options) {\n options = options || {};\n options.toolbarIcon = {\n svg: true,\n html: 'scale',\n tooltip: overlay.options.translation.scaleImage,\n className: 'scale',\n };\n\n L.DistortableImage.action_map.s = '_scaleMode';\n L.EditAction.prototype.initialize.call(this, map, overlay, options);\n },\n\n addHooks() {\n const edit = this._overlay.editing;\n edit._scaleMode();\n },\n});\n","L.StackAction = L.EditAction.extend({\n initialize(map, overlay, options) {\n const edit = overlay.editing;\n let use;\n let tooltip;\n\n if (edit._toggledImage) {\n use = 'flip_to_back';\n tooltip = overlay.options.translation.stackToFront;\n } else {\n use = 'flip_to_front';\n tooltip = overlay.options.translation.stackToBack;\n }\n\n options = options || {};\n options.toolbarIcon = {\n svg: true,\n html: use,\n tooltip: tooltip,\n className: edit._mode === 'lock' ? 'disabled' : '',\n };\n\n L.DistortableImage.action_map.q = edit._mode === 'lock' ? '' : '_stackUp';\n L.DistortableImage.action_map.a = edit._mode === 'lock' ? '' : '_stackDown';\n\n L.EditAction.prototype.initialize.call(this, map, overlay, options);\n },\n\n addHooks() {\n const edit = this._overlay.editing;\n\n L.IconUtil.toggleXlink(this._link, 'flip_to_front', 'flip_to_back');\n L.IconUtil.toggleTitle(this._link, 'Stack to Front', 'Stack to Back');\n edit._toggleOrder();\n },\n});\n","L.UnlockAction = L.EditAction.extend({\n initialize(map, overlay, options) {\n options = options || {};\n options.toolbarIcon = {\n svg: true,\n html: 'unlock',\n tooltip: overlay.options.translation.unlockImages,\n };\n\n L.DistortableImage.group_action_map.u = '_unlockGroup';\n L.EditAction.prototype.initialize.call(this, map, overlay, options);\n },\n\n addHooks() {\n const edit = this._overlay.editing;\n edit._unlockGroup();\n },\n});\n","/* eslint-disable no-unused-vars */\nL.EXIF = function getEXIFdata(img) {\n if (Object.keys(EXIF.getAllTags(img)).length !== 0) {\n console.log(EXIF.getAllTags(img));\n const GPS = EXIF.getAllTags(img);\n let altitude;\n\n /* If the lat/lng is available. */\n if (\n typeof GPS.GPSLatitude !== 'undefined' &&\n typeof GPS.GPSLongitude !== 'undefined'\n ) {\n // sadly, encoded in [degrees,minutes,seconds]\n // primitive value = GPS.GPSLatitude[x].numerator\n let lat =\n GPS.GPSLatitude[0] +\n GPS.GPSLatitude[1] / 60 +\n GPS.GPSLatitude[2] / 3600;\n let lng =\n GPS.GPSLongitude[0] +\n GPS.GPSLongitude[1] / 60 +\n GPS.GPSLongitude[2] / 3600;\n\n if (GPS.GPSLatitudeRef !== 'N') {\n lat = lat * -1;\n }\n if (GPS.GPSLongitudeRef === 'W') {\n lng = lng * -1;\n }\n }\n\n // Attempt to use GPS compass heading; will require\n // some trig to calc corner points, which you can find below:\n\n let angle = 0;\n // \"T\" refers to \"True north\", so -90.\n if (GPS.GPSImgDirectionRef === 'T') {\n angle =\n (Math.PI / 180) *\n (GPS.GPSImgDirection.numerator / GPS.GPSImgDirection.denominator - 90);\n // \"M\" refers to \"Magnetic north\"\n } else if (GPS.GPSImgDirectionRef === 'M') {\n angle =\n (Math.PI / 180) *\n (GPS.GPSImgDirection.numerator / GPS.GPSImgDirection.denominator - 90);\n } else {\n console.log('No compass data found');\n }\n\n console.log('Orientation:', GPS.Orientation);\n\n /* If there is orientation data -- i.e. landscape/portrait etc */\n if (GPS.Orientation === 6) {\n // CCW\n angle += (Math.PI / 180) * -90;\n } else if (GPS.Orientation === 8) {\n // CW\n angle += (Math.PI / 180) * 90;\n } else if (GPS.Orientation === 3) {\n // 180\n angle += (Math.PI / 180) * 180;\n }\n\n /* If there is altitude data */\n if (\n typeof GPS.GPSAltitude !== 'undefined' &&\n typeof GPS.GPSAltitudeRef !== 'undefined'\n ) {\n // Attempt to use GPS altitude:\n // (may eventually need to find EXIF field of view for correction)\n if (\n typeof GPS.GPSAltitude !== 'undefined' &&\n typeof GPS.GPSAltitudeRef !== 'undefined'\n ) {\n altitude =\n GPS.GPSAltitude.numerator / GPS.GPSAltitude.denominator +\n GPS.GPSAltitudeRef;\n } else {\n altitude = 0; // none\n }\n }\n } else {\n alert('EXIF initialized. Press again to view data in console.');\n }\n};\n","L.DistortHandle = L.EditHandle.extend({\n options: {\n TYPE: 'distort',\n icon: L.icon({\n iconUrl:\n // eslint-disable-next-line max-len\n 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAklEQVR4AewaftIAAAChSURBVO3BIU4DURgGwNkvL2B6AkQTLBqP4QCoSm7DDXoBLBZHDbfgICAIZjEV3YTn9uVHdMZZtcnCfI13bIzxg0emg6Nm6QVbYz3jylEsXRrvwommb49X67jFkz80fR9Mb1YxTzqiWBSLYlEsikWxKBbFolgUi2JRLIpFsSgWxaJY03fHHOu40dH07bAzWCx9Ge/TiWbpHgdsjPGNB2f/yS+7xRCyiiZPJQAAAABJRU5ErkJggg==',\n iconSize: [32, 32],\n iconAnchor: [16, 16],\n }),\n },\n\n _onHandleDrag() {\n const overlay = this._handled;\n\n overlay.setCorner(this._corner, this.getLatLng());\n },\n\n updateHandle() {\n this.setLatLng(this._handled.getCorner(this._corner));\n },\n});\n\nL.distortHandle = function(overlay, idx, options) {\n return new L.DistortHandle(overlay, idx, options);\n};\n","L.DragHandle = L.EditHandle.extend({\n options: {\n TYPE: 'drag',\n icon: L.icon({\n // eslint-disable-next-line max-len\n iconUrl: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAsVJREFUeNrMVztLXEEUvnNVFAVBAhY2aRKbTZEHJNpYabuNjSgYg/GxdsmPSJkUAa/ZdVEX8mgWYVutbHxAHkVskjQBuUUgBISVhCQk3wnfwMlk1rusN1wHPubOzJlzvjlz5sxc01Ma/hUEwQnwDIjqc7uvgv9YYO86qgIwCXQbdNTlQ8kcCBHgBch8TcloF6oJGr6phk6EQAkfdz3zvgDr9Mr7Fg1fptEZoM8jsmrokpfsiIFO4IIjuE2v1EDmR4LRdlR5Gh51hj8D34ABtm8YTtqna0TgklIw5CgQguKxIojEjmFROg/MKQO27NkFAB+4wAPouGUJiIvWKHwbAxX2XyWRKWkqhT+pbJntJZJuUzISW0+5hW+obxrVBsfvoH/dqCCJuU97GBh2VteLSiYvArmErT8EVoAK9Bw7enbpVYmvAQlyowYforrH5jXL2rPHI/TKONDB7u9AlavdaTBPvPmazUeQuy8f7UomUgTEwIJPEQ3sQGE/6ll2l9H/KcEzBcfWn2IclluM3DpddJxSHujlFkscbUPvmB0LHVnLrId7nlaZVkEc6QGXQI1MAwZcWmVRHeNaQwJMMiU2cwy4s7p/RJ2ckpvIQs+cIs+5GzitloLKHUV3MPREuXbTOKO91dX387gGTONxIgEWm+E61FFrpcyqXLHsEwiDjEsjAksqw5XPoL9MHVrn6QR4q+XZrDaR4RoWzq2ymafuRA/Mq1stSsHLVkcbdf9VjOcx8ZH3+SFWcCWlVPyWuUBOwUWdC1wP5NVjYiXFWLO69PZ6CRTUY6KSIoEKdf6T3IzzgHxnsyHctNBEkmn6Oob8ExUDg/ahGybd177cDjzH5xHwgDiSvoS7I/LZyvxJZj0wod7tkX5G0XVC7rEyLhfLJjBGbKoLLEfZWObyKeZ6oY82g+yf5Zn/mJyHX7PMf04z/T3/LcAAu4E6iiyJqf0AAAAASUVORK5CYII=',\n iconSize: [32, 32],\n iconAnchor: [16, 16],\n }),\n },\n\n _onHandleDrag() {\n const overlay = this._handled;\n const formerLatLng = overlay.getCorner(this._corner);\n const newLatLng = this.getLatLng();\n\n overlay.dragBy(formerLatLng, newLatLng);\n },\n\n updateHandle() {\n this.setLatLng(this._handled.getCorner(this._corner));\n },\n});\n\nL.dragHandle = function(overlay, idx, options) {\n return new L.DragHandle(overlay, idx, options);\n};\n","L.EditHandle = L.Marker.extend({\n initialize(overlay, corner, options) {\n const latlng = overlay.getCorner(corner);\n\n L.setOptions(this, options);\n\n this._handled = overlay;\n this._corner = corner;\n\n const markerOptions = {\n draggable: true,\n zIndexOffset: 10,\n };\n\n if (options && options.hasOwnProperty('draggable')) {\n markerOptions.draggable = options.draggable;\n }\n\n L.Marker.prototype.initialize.call(this, latlng, markerOptions);\n },\n\n onAdd(map) {\n L.Marker.prototype.onAdd.call(this, map);\n this._bindListeners();\n this.updateHandle();\n },\n\n onRemove(map) {\n this._unbindListeners();\n L.Marker.prototype.onRemove.call(this, map);\n },\n\n _onHandleDragStart() {\n this._handled.fire('editstart');\n },\n\n _onHandleDragEnd() {\n this._fireEdit();\n },\n\n _fireEdit() {\n this._handled.edited = true;\n this._handled.fire('edit');\n },\n\n _bindListeners() {\n this.on({\n contextmenu: L.DomEvent.stop,\n dragstart: this._onHandleDragStart,\n drag: this._onHandleDrag,\n dragend: this._onHandleDragEnd,\n }, this);\n\n this._handled._map.on('zoomend', this.updateHandle, this);\n this._handled.on('update', this.updateHandle, this);\n },\n\n _unbindListeners() {\n this.off({\n contextmenu: L.DomEvent.stop,\n dragstart: this._onHandleDragStart,\n drag: this._onHandleDrag,\n dragend: this._onHandleDragEnd,\n }, this);\n\n this._handled._map.off('zoomend', this.updateHandle, this);\n this._handled.off('update', this.updateHandle, this);\n },\n\n /* Takes two latlngs and calculates the scaling difference. */\n _calculateScalingFactor(latlngA, latlngB) {\n const overlay = this._handled;\n const map = overlay._map;\n\n const centerPoint = map.latLngToLayerPoint(overlay.getCenter());\n const formerPoint = map.latLngToLayerPoint(latlngA);\n const newPoint = map.latLngToLayerPoint(latlngB);\n const formerRadiusSquared = this._d2(centerPoint, formerPoint);\n const newRadiusSquared = this._d2(centerPoint, newPoint);\n\n return Math.sqrt(newRadiusSquared / formerRadiusSquared);\n },\n\n /* Distance between two points in cartesian space, squared (distance formula). */\n _d2(a, b) {\n const dx = a.x - b.x;\n const dy = a.y - b.y;\n\n return Math.pow(dx, 2) + Math.pow(dy, 2);\n },\n\n /* Takes two latlngs and calculates the angle between them. */\n calculateAngleDelta(latlngA, latlngB) {\n const overlay = this._handled;\n const map = overlay._map;\n\n\n const centerPoint = map.latLngToLayerPoint(overlay.getCenter());\n const formerPoint = map.latLngToLayerPoint(latlngA);\n const newPoint = map.latLngToLayerPoint(latlngB);\n\n const initialAngle = (\n Math.atan2(centerPoint.y - formerPoint.y, centerPoint.x - formerPoint.x)\n );\n const newAngle = (\n Math.atan2(centerPoint.y - newPoint.y, centerPoint.x - newPoint.x)\n );\n\n return newAngle - initialAngle;\n },\n});\n","L.FreeRotateHandle = L.EditHandle.extend({\n options: {\n TYPE: 'freeRotate',\n icon: L.icon({\n iconUrl:\n // eslint-disable-next-line max-len\n 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAklEQVR4AewaftIAAAHiSURBVMXBa3HbShgA0PMp/1sCCo8oCEpgTaCXgIXAJiDzyCJoAUTm4UVQAns1Y8+snWnTvJyeE16hkjDgDrfoNTMKcpC9UPiLSo8JyetkjEHxjPCMyoS199kFoz8Iv1HpMaN3qWDCHoegOKkkRwnJpRmroHgiPFEZ8IBekzEGxQtUEhKSS/fB7Ew4U+lxcGkVZG9QWWPSFAxBcdK59KApuA+yNwp2uEdx1GN25sZJZULSfAtm77SlbNjju6MvG75u+WHRWVR6rDVjMPsgwYyVZl3pLTpHkyYHOx8syMiayaJzlDTZ9YyaZNFVkiYH2ZUEBcVJJXVImuz6Js3Qofe59pq7DoOTILu+g+a288mCouk7/1iH4qTS+2QdDppbV1ZJmrnDXnPnc5UOs2Z0fUmTuyBr+krvSioJyUmQO0dZM7mepMkWnaNRkyrJB6uskTSjxY3Fll8bvmJwlDb83FJ8gMqAB80uyBY3Trb82PAfvjj6vuHnluIdKgMeNXOwctK5NKBoHitrb1RJeHRp5Ux4ojLg0aWMHGQvUOkxIWkKVsHsTPiNSo8HDC5lZIsgO6n0uMUdRvQuFQxB8UR4RmXC2vvsgtEfhL+o9JiQvE7GGBTPCK9QSUjoMWgKDthjDrIX+h/k0I7gth6N5gAAAABJRU5ErkJggg==',\n iconSize: [32, 32],\n iconAnchor: [16, 16],\n }),\n },\n\n _onHandleDrag() {\n const overlay = this._handled;\n const map = overlay._map;\n const formerLatLng = overlay.getCorner(this._corner);\n const newLatLng = this.getLatLng();\n const angle = this.calculateAngleDelta(formerLatLng, newLatLng);\n const scale = this._calculateScalingFactor(formerLatLng, newLatLng);\n\n if (angle !== 0) { overlay.rotateBy(angle, 'rad'); }\n\n let edgeMinWidth = overlay.edgeMinWidth;\n if (!edgeMinWidth) { edgeMinWidth = 50; } /* just in case */\n\n const corner1 = map.latLngToContainerPoint(overlay.getCorner(0));\n const corner2 = map.latLngToContainerPoint(overlay.getCorner(1));\n const w = Math.abs(corner1.x - corner2.x);\n const h = Math.abs(corner1.y - corner2.y);\n const distance = Math.sqrt(w * w + h * h);\n if (distance > edgeMinWidth || scale > 1) {\n overlay.scaleBy(scale);\n } else {\n overlay.scaleBy(1);\n }\n },\n\n updateHandle() {\n this.setLatLng(this._handled.getCorner(this._corner));\n },\n});\n\nL.freeRotateHandle = (overlay, idx, options) => {\n return new L.FreeRotateHandle(overlay, idx, options);\n};\n","L.LockHandle = L.EditHandle.extend({\n options: {\n TYPE: 'lock',\n interactive: false,\n icon: L.icon({\n // eslint-disable-next-line max-len\n iconUrl: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAklEQVR4AewaftIAAAD8SURBVO3BPU7CYAAA0AdfjIcQlRCQBG7C3gk2uIPG2RC3Dk16Gz0FTO1WZs/gwGCMP/2+xsSl7+n1er1Iz9LtRQjaPeMeO+TinLDCJV78YqjdA04YodKuxhUaPGoRxMmxwRQZSt87Yo4KExGCeAUyLLFB4bMacxywEClIU2KDKXbInTUYo8JCgoFuGoxQO5uiwY1EA91VmDqrcKeDoX8WdNNgjApvmGGLXKIgXY0xGkxQYItrrFFIEKQ5Yo4KEx9yrDFDhlKkIF6NOQ5Y+KpAhiXWKEQI4pxwiwoLPyuxwQw75FoE7fZYocFEuwI7jHCBV39gL92TXq/Xi/AOcmczZmaIMScAAAAASUVORK5CYII=',\n iconSize: [32, 32],\n iconAnchor: [16, 16],\n }),\n },\n\n onRemove(map) {\n this.unbindTooltip();\n L.EditHandle.prototype.onRemove.call(this, map);\n },\n\n _bindListeners() {\n const icon = this.getElement();\n\n L.EditHandle.prototype._bindListeners.call(this);\n\n L.DomEvent.on(icon, {\n mousedown: this._tooltipOn,\n mouseup: this._tooltipOff,\n }, this);\n\n L.DomEvent.on(document, 'pointerleave', this._tooltipOff, this);\n },\n\n _unbindListeners() {\n const icon = this.getElement();\n\n L.EditHandle.prototype._bindListeners.call(this);\n\n L.DomEvent.off(icon, {\n mousedown: this._tooltipOn,\n mouseup: this._tooltipOff,\n }, this);\n\n L.DomEvent.off(document, 'pointerleave', this._tooltipOff, this);\n },\n\n /* cannot be dragged */\n _onHandleDrag() {\n },\n\n updateHandle() {\n this.setLatLng(this._handled.getCorner(this._corner));\n },\n\n _tooltipOn(e) {\n const eP = this._handled.parentGroup;\n const edit = eP ? eP.editing : this._handled.editing;\n\n if (e.shiftKey) { return; }\n if (!this._handled.isSelected() && (eP && !eP.isCollected(this._handled))) {\n return;\n }\n\n const handlesArr = edit._lockHandles;\n\n this._timer = setTimeout(L.bind(function() {\n if (this._timeout) { clearTimeout(this._timeout); }\n\n if (!this.getTooltip()) {\n this.bindTooltip('Locked!', {permanent: true});\n } else {\n handlesArr.eachLayer(function(handle) {\n if (this !== handle) { handle.closeTooltip(); }\n });\n }\n\n this.openTooltip();\n }, this), 500);\n },\n\n _tooltipOff(e) {\n const eP = this._handled.parentGroup;\n const edit = eP ? eP.editing : this._handled.editing;\n\n if (e.shiftKey) { return; }\n if (!this._handled.isSelected() && (eP && !eP.isCollected(this._handled))) {\n return;\n }\n\n const handlesArr = edit._lockHandles;\n\n if (e.currentTarget === document) {\n handlesArr.eachLayer(function(handle) {\n handle.closeTooltip();\n });\n }\n\n if (this._timer) { clearTimeout(this._timer); }\n\n this._timeout = setTimeout(L.bind(function() {\n this.closeTooltip();\n }, this), 400);\n },\n});\n\nL.lockHandle = function(overlay, idx, options) {\n return new L.LockHandle(overlay, idx, options);\n};\n","L.RotateHandle = L.EditHandle.extend({\n options: {\n TYPE: 'rotate',\n icon: L.icon({\n iconUrl:\n // eslint-disable-next-line max-len\n 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAklEQVR4AewaftIAAAHiSURBVMXBa3HbShgA0PMp/1sCCo8oCEpgTaCXgIXAJiDzyCJoAUTm4UVQAns1Y8+snWnTvJyeE16hkjDgDrfoNTMKcpC9UPiLSo8JyetkjEHxjPCMyoS199kFoz8Iv1HpMaN3qWDCHoegOKkkRwnJpRmroHgiPFEZ8IBekzEGxQtUEhKSS/fB7Ew4U+lxcGkVZG9QWWPSFAxBcdK59KApuA+yNwp2uEdx1GN25sZJZULSfAtm77SlbNjju6MvG75u+WHRWVR6rDVjMPsgwYyVZl3pLTpHkyYHOx8syMiayaJzlDTZ9YyaZNFVkiYH2ZUEBcVJJXVImuz6Js3Qofe59pq7DoOTILu+g+a288mCouk7/1iH4qTS+2QdDppbV1ZJmrnDXnPnc5UOs2Z0fUmTuyBr+krvSioJyUmQO0dZM7mepMkWnaNRkyrJB6uskTSjxY3Fll8bvmJwlDb83FJ8gMqAB80uyBY3Trb82PAfvjj6vuHnluIdKgMeNXOwctK5NKBoHitrb1RJeHRp5Ux4ojLg0aWMHGQvUOkxIWkKVsHsTPiNSo8HDC5lZIsgO6n0uMUdRvQuFQxB8UR4RmXC2vvsgtEfhL+o9JiQvE7GGBTPCK9QSUjoMWgKDthjDrIX+h/k0I7gth6N5gAAAABJRU5ErkJggg==',\n iconSize: [32, 32],\n iconAnchor: [16, 16],\n }),\n },\n\n _onHandleDrag() {\n const overlay = this._handled;\n const formerLatLng = overlay.getCorner(this._corner);\n const newLatLng = this.getLatLng();\n const angle = this.calculateAngleDelta(formerLatLng, newLatLng);\n\n /*\n * running rotation logic even for an angle delta of 0\n * prevents a small, occasional marker flicker\n */\n overlay.rotateBy(angle, 'rad');\n },\n\n updateHandle() {\n this.setLatLng(this._handled.getCorner(this._corner));\n },\n});\n\nL.rotateHandle = function(overlay, idx, options) {\n return new L.RotateHandle(overlay, idx, options);\n};\n","L.ScaleHandle = L.EditHandle.extend({\n options: {\n TYPE: 'scale',\n icon: L.icon({\n iconUrl:\n // eslint-disable-next-line max-len\n 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSI0NTkiIGhlaWdodD0iND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zOTYgdjYyLjc4MDA1ODI1OTA2MzkxIEgxMi4zODA5OTM5MjkyNDUwNSBWMTIuNTU2MDExNjUxODEyNzgxIHpNNzQuMjg1OTYzNTc1NDcwNTMsNDUxLjA1MDU3MjQxNTEyMDY2IEgxMi4zODA5OTM5MjkyNDUwNSB2LTYyLjc4MDA1ODI1OTA2MzkxIGg2MS45MDQ5Njk2NDYyMjUzOTYgVjQ1MS4wNTA1NzI0MTUxMjA2NiB6TTQ0NS43MTU3ODE0NTI4MjI3NCw0NTEuMDUwNTcyNDE1MTIwNjYgaC02Mi44NTczNTM3OTQ2Mjg4NjQgdi02Mi43ODAwNTgyNTkwNjM5MSBoNjIuODU3MzUzNzk0NjI4ODY0IFY0NTEuMDUwNTcyNDE1MTIwNjYgek00MDcuNjIwNDE1NTE2Njg0MjYsMzc2LjY4MDM0OTU1NDM4MzQ0IGgtMzYuMTkwNTk3NjM5MzMxNzcgdjMyLjgzODc5OTcwNDc0MTEyIEg4NS43MTQ1NzMzNTYzMTIwMyB2LTMyLjgzODc5OTcwNDc0MTEyIEg0OS41MjM5NzU3MTY5ODAzMiBWODYuOTI2MjM0NTEyNTUwMDIgaDM2LjE5MDU5NzYzOTMzMTc3IFY1MC4yMjQwNDY2MDcyNTExMjUgaDI4Ny42MjAwMTI4MTc4NDcyIHYzNi43MDIxODc5MDUyOTg5IGgzNC4yODU4MjkzNDI1MjQ4MzUgVjM3Ni42ODAzNDk1NTQzODM0NCB6IiBpZD0ic3ZnXzIiIGNsYXNzPSIiIGZpbGw9IiMxYTFhZWIiIGZpbGwtb3BhY2l0eT0iMSIvPjwvZz48L3N2Zz4=',\n iconSize: [32, 32],\n iconAnchor: [16, 16],\n }),\n },\n\n _onHandleDrag() {\n const overlay = this._handled;\n const map = overlay._map;\n let edgeMinWidth = overlay.edgeMinWidth;\n const formerLatLng = overlay.getCorner(this._corner);\n const newLatLng = this.getLatLng();\n const scale = this._calculateScalingFactor(formerLatLng, newLatLng);\n\n /*\n * checks whether the \"edgeMinWidth\" property is set and tracks the minimum edge length;\n * this enables preventing scaling to zero, but we might also add an overall scale limit\n */\n\n if (!edgeMinWidth) { edgeMinWidth = 50; } /* just in case */\n const corner1 = map.latLngToLayerPoint(overlay.getCorner(0));\n const corner2 = map.latLngToLayerPoint(overlay.getCorner(1));\n const w = Math.abs(corner1.x - corner2.x);\n const h = Math.abs(corner1.y - corner2.y);\n const distance = Math.sqrt(w * w + h * h);\n\n if (distance > edgeMinWidth || scale > 1) {\n overlay.scaleBy(scale);\n /*\n * running scale logic even for a scale ratio of 1\n * prevents a small, occasional marker flicker\n */\n } else {\n overlay.scaleBy(1);\n }\n },\n\n updateHandle() {\n this.setLatLng(this._handled.getCorner(this._corner));\n },\n});\n\nL.scaleHandle = function(overlay, idx, options) {\n return new L.ScaleHandle(overlay, idx, options);\n};\n","L.distortableImage = L.DistortableImage || {};\nL.distortableImage = L.DistortableImage;\n\nL.DistortableImage.group_action_map = {};\n\nL.DistortableImage.ControlBar = L.Toolbar2.Control.extend({});\n\nL.distortableImage.controlBar = function(options) {\n return new L.DistortableImage.ControlBar(options);\n};\n\n/** addInitHooks run before onAdd */\nL.DistortableCollection.addInitHook(function() {\n /** Default actions */\n this.ACTIONS = [\n L.ExportAction,\n L.DeleteAction,\n L.LockAction,\n L.UnlockAction,\n ];\n\n // all possible modes\n L.DistortableCollection.Edit.MODES = {\n lock: L.LockAction,\n unlock: L.UnlockAction,\n };\n\n const a = this.options.actions ? this.options.actions : this.ACTIONS;\n\n this.editing = L.distortableCollection.edit(this, {actions: a});\n});\n","L.DistortableImage = L.DistortableImage || {};\nL.distortableImage = L.DistortableImage;\n\nL.DistortableImage.action_map = {};\n\nL.DistortableImage.PopupBar = L.Toolbar2.Popup.extend({\n options: {\n anchor: [0, -10],\n },\n\n initialize(latlng, options) {\n L.setOptions(this, options);\n L.Toolbar2.Popup.prototype.initialize.call(this, latlng, options);\n },\n\n addHooks(map, ov) {\n this.map = map;\n this.ov = ov;\n },\n\n tools() {\n if (this._ul) {\n return this._ul.children;\n }\n },\n\n clickTool(name) {\n const tools = this.tools();\n for (let i = 0; i < tools.length; i++) {\n const tool = tools.item(i).children[0];\n if (L.DomUtil.hasClass(tool, name)) {\n tool.click();\n return tool;\n }\n }\n return false;\n },\n});\n\nL.distortableImage.popupBar = function(latlng, options) {\n return new L.DistortableImage.PopupBar(latlng, options);\n};\n\nL.DistortableImageOverlay.addInitHook(function() {\n /** Default actions */\n this.ACTIONS = [\n L.DragAction,\n L.ScaleAction,\n L.DistortAction,\n L.RotateAction,\n L.FreeRotateAction,\n L.LockAction,\n L.OpacityAction,\n L.OpacitiesAction,\n L.BorderAction,\n L.ExportAction,\n L.DeleteAction,\n ];\n\n // all possible modes\n L.DistortableImage.Edit.MODES = {\n drag: L.DragAction,\n scale: L.ScaleAction,\n distort: L.DistortAction,\n rotate: L.RotateAction,\n freeRotate: L.FreeRotateAction,\n lock: L.LockAction,\n };\n\n const a = this.options.actions ? this.options.actions : this.ACTIONS;\n\n this.editing = L.distortableImage.edit(this, {actions: a});\n});\n","/* this is the baseclass other IconSets inherit from,\n* we don't use it directly */\nL.IconSet = L.Class.extend({\n\n _svg: '