Mercurial > gemma
changeset 708:fdd88e95bae7 octree
Merged default into octree branch.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 21 Sep 2018 11:03:20 +0200 |
parents | 9db4ae29ded9 (current diff) d47fa556a3e8 (diff) |
children | c0bba602b60e |
files | |
diffstat | 1 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/map/Maplayer.vue Fri Sep 21 11:02:24 2018 +0200 +++ b/client/src/map/Maplayer.vue Fri Sep 21 11:03:20 2018 +0200 @@ -64,10 +64,21 @@ this.interaction = null; }, createInteraction() { - return new Draw({ + var that = this; + this.vectorSource.clear(); // start empty + var draw = new Draw({ source: this.vectorSource, type: this.drawMode }); + draw.on("drawstart", function(event) { + console.log(event); + that.vectorSource.clear(); // remove old features when draw starts + }); + draw.on("drawend", this.drawEnd); + return draw; + }, + drawEnd(event) { + console.log(event); }, activateInteraction() { const interaction = this.createInteraction(this.drawMode);