Skip to content

Commit 8470fba

Browse files
committed
Don't call enableDrawing before assigning handlers
1 parent 0abe14a commit 8470fba

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

client/src/components/geoJS/layers/measureToolLayer.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@ export default class MeasureToolLayer extends BaseTextLayer<TextData> {
6565

6666
this.textStyle = this.createTextStyle();
6767
this.rulerOn = measuring || false;
68-
if (this.rulerOn) {
69-
this.enableDrawing();
70-
}
7168

7269
this.moveHandler = (e: GeoEvent) => {
7370
if (e && this.dragging) {
@@ -108,6 +105,10 @@ export default class MeasureToolLayer extends BaseTextLayer<TextData> {
108105
this.updateRuler(this.yValue);
109106
this.event('update:cursor', { cursor: 'grab' });
110107
};
108+
109+
if (this.rulerOn) {
110+
this.enableDrawing();
111+
}
111112
}
112113

113114
enableDrawing() {

0 commit comments

Comments
 (0)