Box not displayed on new Parking

This commit is contained in:
portree_kid 2020-08-06 20:59:30 +02:00
parent 7c8cc0e705
commit dc480ad25d
2 changed files with 11 additions and 5 deletions

View File

@ -847,9 +847,12 @@ You should have received a copy of the GNU General Public License along with FG
circle.glueindex = circle.id
circle.addTo(this.groundnetLayerGroup)
circle.featureLookup = this.featureLookup
circle.addListeners()
circle.enableEdit()
circle.extensions()
circle.addListeners()
circle.updateVertexFromDirection();
circle.updateWheelPos();
circle.updateBox();
if (Number(this.$store.state.Editable.index) >= 0 &&
this.featureLookup[this.$store.state.Editable.index]!==undefined) {
this.featureLookup[this.$store.state.Editable.index].forEach(element => {

View File

@ -190,10 +190,13 @@ L.ParkingSpot = L.Circle.extend({
}
event.target._parkingSpot.select();
});
if(this.editor && this.editor.editLayer) {
this.box.addTo(this.editor.editLayer);
}
}
if(this.box!==undefined) {
var latlngs = [leftBack, rightBack, rightMiddle, rightIntermediate, rightFront, leftFront, leftIntermediate, leftMiddle].map(l => this.turfToLatLng(l));
console.debug(latlngs);
this.box.setLatLngs(latlngs);
}
}