diff --git a/src/fragments/map-view/components/map-right-click/map-right-click.js b/src/fragments/map-view/components/map-right-click/map-right-click.js index 8ef60a6a5..7e8f9a920 100644 --- a/src/fragments/map-view/components/map-right-click/map-right-click.js +++ b/src/fragments/map-view/components/map-right-click/map-right-click.js @@ -30,7 +30,7 @@ export default { }, computed: { canAddStop () { - return this.$store.getters.mode === constants.modes.directions && this.mapViewData.hasRoutes() + return this.$store.getters.mode === constants.modes.directions && this.mapViewData.hasRoutes() && this.mapViewData.places.length < appConfig.maxPlaceInputs }, show () { return this.showRightClickPopup diff --git a/src/fragments/map-view/map-view.js b/src/fragments/map-view/map-view.js index 890f53118..bbf5897e2 100644 --- a/src/fragments/map-view/map-view.js +++ b/src/fragments/map-view/map-view.js @@ -448,13 +448,6 @@ export default { return markerData } }, - /** - * Determines if a route stop can be added - */ - canAddStop () { - const can = !Array.isArray(this.markers) || this.markers.length < appConfig.maxPlaceInputs - return can - }, /** * Return the current map polyline measures options * @returns {Object} options @@ -1367,7 +1360,7 @@ export default { if (!insidePolygon) { const mapEl = this.$refs.map.$el GeoUtils.normalizeCoordinates(event.latlng) - const data = { event, mapEl, canAddStop: this.canAddStop } + const data = { event, mapEl } // Event to be caught by the MapRightClick.vue component EventBus.$emit('mapRightClicked', data) }