Skip to content

Commit 33f8688

Browse files
committed
redraw map when start or end editing geometry
1 parent 17a3e09 commit 33f8688

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/geometry/ext/Geometry.Edit.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ Geometry.include(/** @lends Geometry.prototype */ {
1414
* @return {Geometry} this
1515
*/
1616
startEdit(opts) {
17-
if (!this.getMap() || !this.options['editable']) {
17+
const map = this.getMap();
18+
if (!map || !this.options['editable']) {
1819
return this;
1920
}
2021
if (this._editor) {
@@ -33,6 +34,7 @@ Geometry.include(/** @lends Geometry.prototype */ {
3334
if (!this._getParent()) {
3435
this.fire('editstart');
3536
}
37+
map.getRenderer().setToRedraw();
3638
return this;
3739
},
3840

@@ -55,6 +57,10 @@ Geometry.include(/** @lends Geometry.prototype */ {
5557
if (!this._getParent()) {
5658
this.fire('editend');
5759
}
60+
const map = this.getMap();
61+
if (map) {
62+
map.getRenderer().setToRedraw();
63+
}
5864
}
5965
return this;
6066
},

0 commit comments

Comments
 (0)