- add test to ci pipeline ci.yml

This commit is contained in:
Kaimbacher 2023-05-09 14:43:16 +02:00
parent a48a2d9704
commit 578c4180f4
7 changed files with 205 additions and 186 deletions

View file

@ -74,7 +74,7 @@ export default class DrawControlComponent extends Vue {
@Prop public southWest;
@Prop public northEast;
public isToggled = false;
mapService = MapService();
// try:
public _enabled;
@ -128,7 +128,8 @@ export default class DrawControlComponent extends Vue {
this._map.dragging.disable();
}
//TODO refactor: move cursor to styles
// this._container.style.cursor = 'crosshair';
// this._map.domElement.style.cursor = 'crosshair';
this._map._container.style.cursor = "crosshair";
// this._tooltip.updateContent({text: this._initialLabelText});
this._map
.on('mousedown', this._onMouseDown, this)
@ -141,7 +142,7 @@ export default class DrawControlComponent extends Vue {
// (update): we have to send passive now to prevent scroll, because by default it is {passive: true} now, which means,
// handler can't event.preventDefault
// check the news https://developers.google.com/web/updates/2016/06/passive-event-listeners
document.addEventListener('touchstart', preventDefault, { passive: false });
// document.addEventListener('touchstart', preventDefault, { passive: false });
}
}
@ -156,7 +157,7 @@ export default class DrawControlComponent extends Vue {
}
//TODO refactor: move cursor to styles
// this._container.style.cursor = '';
this._map._container.style.cursor = '';
this._map
.off('mousedown', this._onMouseDown, this)
@ -167,7 +168,7 @@ export default class DrawControlComponent extends Vue {
off(document, 'mouseup', this._onMouseUp, this);
off(document, 'touchend', this._onMouseUp, this);
document.removeEventListener('touchstart', preventDefault);
// document.removeEventListener('touchstart', preventDefault);
// If the box element doesn't exist they must not have moved the mouse, so don't need to destroy/return
// if (this._shape) {
@ -241,7 +242,6 @@ export default class DrawControlComponent extends Vue {
} else {
this.enable();
}
// this.isToggled = !this.isToggled;
}
// private enable() {
@ -260,41 +260,6 @@ export default class DrawControlComponent extends Vue {
// // this._drawingEditor.cancelDrawing();
// // }
// }
// created(): void {
// this.featuresLayer = this._createFeaturesLayer();
// }
// private _createFeaturesLayer() {
// let map: Map = (this.map = this.mapService.getMap(this.mapId));
// let layerGroup: LayerGroup = new LayerGroup();
// map.addLayer(layerGroup);
// return layerGroup;
// }
// private _startMarker(latlng, options) {
// let map = this.mapService.getMap(this.mapId);
// latlng = map.getCenter().clone();
// let markerLayer: Marker = this._createMarker(latlng, options); //.addTo(this.map);
// // map.addLayer(markerLayer);
// //this.map.addLayer(marker);
// //marker.enableEdit(this.map).startDrawing(); //editor.startDrawing() -> registerForDrawing
// // let baseEditor = markerLayer.en.enableEdit(this.map);
// // baseEditor.startDrawing();
// return markerLayer;
// }
// private _createMarker(latlng, options): Marker {
// // return this._createLayer((options && options.markerClass) || this.options.markerClass, latlng, options);
// return new Marker(latlng, options);
// }
// private _createLayer(klass, latlngs, options) {
// options = util.extend({ editOptions: { mapTool: this } }, options);
// let layer = new klass(latlngs, options);
// //this.fireAndForward('editable:created', { layer: layer });
// return layer;
// }
}
</script>