Improved Tooltips
This commit is contained in:
parent
cfa7a1bf3b
commit
cf1c829c11
@ -246,11 +246,23 @@ You should have received a copy of the GNU General Public License along with FG
|
||||
this.groundnetLayerGroup.eachLayer(l => {
|
||||
if (l instanceof L.Polyline) {
|
||||
l.getLatLngs().forEach(l => {
|
||||
if (l.__vertex && !l.__vertex.getTooltip()) {
|
||||
l.__vertex.bindTooltip(l.glueindex, {permanent: true});
|
||||
if (this.$parent.mapObject.getBounds().contains(l)) {
|
||||
if (l.__vertex && !l.__vertex.getTooltip()) {
|
||||
l.__vertex.bindTooltip(l.glueindex, {permanent: true});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
if (l instanceof L.ParkingSpot) {
|
||||
if (this.$parent.mapObject.getBounds().contains(l.getLatLng())) {
|
||||
var parkingHub = l.glueindex + " " + l.options.attributes.name + " " + l.options.attributes.number;
|
||||
if(l.box) {
|
||||
l.box.bindTooltip(parkingHub, {permanent: true, direction: 'right'});
|
||||
} else {
|
||||
l.bindTooltip(parkingHub, {permanent: true, direction: 'right'});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
setTimeout(this.closeTooltips.bind(this), 2000);
|
||||
},
|
||||
@ -263,6 +275,13 @@ You should have received a copy of the GNU General Public License along with FG
|
||||
}
|
||||
});
|
||||
}
|
||||
if (l instanceof L.ParkingSpot) {
|
||||
if(l.box) {
|
||||
l.box.unbindTooltip();
|
||||
} else {
|
||||
l.unbindTooltip();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
disableEdit () {
|
||||
|
Loading…
Reference in New Issue
Block a user