This commit is contained in:
TuxCoder 2019-07-25 22:17:34 +02:00
parent 46ef181ec7
commit f7f81ebc47
6 changed files with 21 additions and 9 deletions

View file

@ -163,7 +163,7 @@ var MessureControl = /*@__PURE__*/(function (Control) {
* Message to show when the user is drawing a line.
* @type {string}
*/
this.continueLineMsg = 'Click to continue drawing the line';
this.continueLineMsg = 'Click to continue drawing the line</br>Doubleclick to end path';
var type = (false ? 'Polygon' : 'LineString');
this.draw_ = new Draw({
@ -258,8 +258,10 @@ var MessureControl = /*@__PURE__*/(function (Control) {
this.pointerMoveHandler_ = (e) => self.pointerMoveHandler(e);
map.on('pointermove', this.pointerMoveHandler_);
map.addInteraction(this.draw_);
this.button_.classList.add('active');
this.active_ = true;
this.setClassName_(this.button_, this.active_);
}
/**
@ -270,7 +272,8 @@ var MessureControl = /*@__PURE__*/(function (Control) {
map.un('pointermove', this.pointerMoveHandler_);
map.removeInteraction(this.draw_);
this.helpTooltipElement.classList.add('hidden');
this.active_ = true;
this.active_ = false;
this.setClassName_(this.button_, this.active_);
}
/**

View file

@ -18,9 +18,12 @@ html, body {
}
.ol-messure {
right: .25em;
top: 10em;
font-size: 1.5em;
right: .25em;
top: 10em;
font-size: 1.5em;
.ol-messure-true {
background-color: green !important;
}
}
.tooltip {
@ -55,3 +58,4 @@ html, body {
.tooltip-static:before {
border-top-color: #ffcc33;
}