Skip to content

Commit

Permalink
unwanted comments removed (#1362)
Browse files Browse the repository at this point in the history
  • Loading branch information
segun-codes authored Feb 23, 2023
1 parent c262859 commit 4d6e626
Showing 1 changed file with 0 additions and 75 deletions.
75 changes: 0 additions & 75 deletions src/DistortableCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 4d6e626

Please sign in to comment.