This commit is contained in:
parent
fad6b3de84
commit
64685aa1d1
@ -171,13 +171,14 @@ L.ParkingSpot = L.Circle.extend({
|
|||||||
var leftIntermediate = turf.destination(leftFront, halfRadiusKM, backwards, options);
|
var leftIntermediate = turf.destination(leftFront, halfRadiusKM, backwards, options);
|
||||||
var rightIntermediate = turf.destination(rightFront, halfRadiusKM, backwards, options);
|
var rightIntermediate = turf.destination(rightFront, halfRadiusKM, backwards, options);
|
||||||
|
|
||||||
if(this.box === undefined ) {
|
if(this.box === undefined && this.editor !== undefined) {
|
||||||
var latlngs = [leftBack, rightBack, rightMiddle, rightIntermediate, rightFront, leftFront, leftIntermediate, leftMiddle].map(l => this.turfToLatLng(l));
|
var latlngs = [leftBack, rightBack, rightMiddle, rightIntermediate, rightFront, leftFront, leftIntermediate, leftMiddle].map(l => this.turfToLatLng(l));
|
||||||
this.box = L.polygon(latlngs);
|
this.box = L.polygon(latlngs);
|
||||||
this.box.addTo(this.editor.editLayer);
|
this.box.addTo(this.editor.editLayer);
|
||||||
this.box.on('click', function (event) {
|
this.box.on('click', function (event) {
|
||||||
console.debug("Click Parking : " + event.target);
|
console.debug("Click Parking : " + event.target);
|
||||||
if (Number(store.default.state.Editable.index) >= 0 &&
|
if (Number(store.default.state.Editable.index) >= 0 &&
|
||||||
|
this.featureLookup !== undefined &&
|
||||||
this.featureLookup[store.default.state.Editable.index]!==undefined) {
|
this.featureLookup[store.default.state.Editable.index]!==undefined) {
|
||||||
this.featureLookup[store.default.state.Editable.index].forEach(element => {
|
this.featureLookup[store.default.state.Editable.index].forEach(element => {
|
||||||
if(element.deselect !== undefined) {
|
if(element.deselect !== undefined) {
|
||||||
|
Loading…
Reference in New Issue
Block a user