From 4d6e626e1b8fcd84380446703f5aa94d7fa054a3 Mon Sep 17 00:00:00 2001 From: Segun Date: Thu, 23 Feb 2023 04:32:47 +0100 Subject: [PATCH] unwanted comments removed (#1362) --- src/DistortableCollection.js | 75 ------------------------------------ 1 file changed, 75 deletions(-) diff --git a/src/DistortableCollection.js b/src/DistortableCollection.js index 3f168201e..7d09d710c 100644 --- a/src/DistortableCollection.js +++ b/src/DistortableCollection.js @@ -290,81 +290,6 @@ L.DistortableCollection = L.FeatureGroup.extend({ json.avg_cm_per_pixel = this._getAvgCmPerPixel(json.images); return json; }, - - // generateExportJson(allImages = false) { - // const json = {}; - // json.images = []; - - // this.eachLayer(function(layer) { - // if (allImages || this.isCollected(layer)) { - // const sections = layer._image.src.split('/'); - // const filename = sections[sections.length - 1]; - // const zc = layer.getCorners(); - - // const corners = [ - // {lat: zc[0].lat, lon: zc[0].lng}, - // {lat: zc[1].lat, lon: zc[1].lng}, - // {lat: zc[3].lat, lon: zc[3].lng}, - // {lat: zc[2].lat, lon: zc[2].lng}, - // ]; - - - // json.images.push({ - // id: layer._leaflet_id, - // src: layer._image.src, - // width: layer._image.width, - // height: layer._image.height, - // tooltipText: layer.getTooltipText(), - // image_file_name: filename, - // nodes: corners, - // cm_per_pixel: L.ImageUtil.getCmPerPixel(layer), - // }); - // } - // }, this); - - // json.images = json.images.reverse(); - // json.avg_cm_per_pixel = this._getAvgCmPerPixel(json.images); - // return json; - // }, - - // OPTION 3 - // generateExportJson(allImages = false) { - // const json = {}; - // json.images = []; - - // this.eachLayer(function(layer) { - // if (allImages || this.isCollected(layer)) { - // let corners = []; - // const sections = layer._image.src.split('/'); - // const filename = sections[sections.length - 1]; - // const zc = layer.getCorners(); - - // // supports longitude written as 'lon' or 'lng' - // for (i = 0; i < zc.length; i++) { - // if (zc[0].lng) { - // corners.push({lat: zc[i].lat, lon: zc[i].lng}); - // } else if (zc[0].lon) { - // corners.push({lat: zc[i].lat, lon: zc[i].lon}); - // } - // } - - // json.images.push({ - // id: layer._leaflet_id, - // src: layer._image.src, - // width: layer._image.width, - // height: layer._image.height, - // tooltipText: layer.getTooltipText(), - // image_file_name: filename, - // nodes: corners, - // cm_per_pixel: L.ImageUtil.getCmPerPixel(layer), - // }); - // } - // }, this); - - // json.images = json.images.reverse(); - // json.avg_cm_per_pixel = this._getAvgCmPerPixel(json.images); - // return json; - // }, }); L.distortableCollection = function(id, options) {