Skip to content

Commit

Permalink
Yeti updates (#895)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamvdo authored and cbeauchesne committed Nov 30, 2019
1 parent d12348c commit 3b1c162
Show file tree
Hide file tree
Showing 5 changed files with 154 additions and 63 deletions.
11 changes: 0 additions & 11 deletions src/components/map/OlMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,6 @@
// keyboardEventTarget: this.keyboardEventTarget,
});
this.view.on('change:resolution', this.onChangeResolution);
this.map.on('moveend', this.sendBoundsToUrl);
this.map.on('moveend', this.getBiodivSportsAreas);
if (this.protectionAreasVisible) {
Expand Down Expand Up @@ -702,15 +700,6 @@
return extent;
},
onChangeResolution(event) {
const zoom = event.target.getZoom();
// we do not fire event for intermediate zoom
if (zoom === parseInt(zoom, 10)) {
this.$emit('zoom', zoom);
}
},
onPointerMove(event) {
let resultFeature = null;
Expand Down
14 changes: 13 additions & 1 deletion src/components/yeti/ValidationButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
</button>
<p class="yetiForm-error" v-if="currentError">
<span>
<strong>Info: </strong>
{{ currentError }}
</span>
</p>
Expand Down Expand Up @@ -43,4 +42,17 @@
opacity: 0.75;
}
.yetiForm-error span::before {
content: 'i';
display: inline-block;
width: 1rem;
height: 1rem;
background: rgba(0,60,136,0.5);
color: #fff;
border-radius: 50%;
font-size: 0.71rem;
font-weight: bold;
text-align: center;
}
</style>
3 changes: 2 additions & 1 deletion src/js/libs/ol.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import ImageStatic from 'ol/source/ImageStatic';

import WMTSTileGrid from 'ol/tilegrid/WMTS';

import { Point, Polygon } from 'ol/geom';
import { LineString, Point, Polygon } from 'ol/geom';

import { Icon, Style, Circle, Fill, Stroke, Text } from 'ol/style';

Expand Down Expand Up @@ -77,6 +77,7 @@ export default {
},

geom: {
LineString,
Point,
Polygon
},
Expand Down
2 changes: 1 addition & 1 deletion src/views/document/utils/boxes/MapBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
showYetiButton() {
// at least one of document activities is concerned by yeti
if (!this.document || !this.document.activities) {
if (!this.document || this.documentType !== 'route' || !this.document.activities) {
return false;
}
Expand Down
Loading

0 comments on commit 3b1c162

Please sign in to comment.