New function createOrUpdateCustomSketchLine_
This commit is contained in:
@@ -841,9 +841,7 @@ class Draw extends PointerInteraction {
|
|||||||
geometry.getType() === GeometryType.POLYGON &&
|
geometry.getType() === GeometryType.POLYGON &&
|
||||||
this.mode_ !== Mode.POLYGON
|
this.mode_ !== Mode.POLYGON
|
||||||
) {
|
) {
|
||||||
this.createOrUpdateCustomSketchLine_(
|
this.createOrUpdateCustomSketchLine_(/** @type {Polygon} */ (geometry));
|
||||||
/** @type {Polygon} */ (geometry)
|
|
||||||
);
|
|
||||||
} else if (this.sketchLineCoords_) {
|
} else if (this.sketchLineCoords_) {
|
||||||
const sketchLineGeom = this.sketchLine_.getGeometry();
|
const sketchLineGeom = this.sketchLine_.getGeometry();
|
||||||
sketchLineGeom.setCoordinates(this.sketchLineCoords_);
|
sketchLineGeom.setCoordinates(this.sketchLineCoords_);
|
||||||
@@ -919,9 +917,7 @@ class Draw extends PointerInteraction {
|
|||||||
}
|
}
|
||||||
this.geometryFunction_(coordinates, geometry, projection);
|
this.geometryFunction_(coordinates, geometry, projection);
|
||||||
if (geometry.getType() === GeometryType.POLYGON && this.sketchLine_) {
|
if (geometry.getType() === GeometryType.POLYGON && this.sketchLine_) {
|
||||||
this.createOrUpdateCustomSketchLine_(
|
this.createOrUpdateCustomSketchLine_(/** @type {Polygon} */ (geometry));
|
||||||
/** @type {Polygon} */ (geometry)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
} else if (this.mode_ === Mode.POLYGON) {
|
} else if (this.mode_ === Mode.POLYGON) {
|
||||||
coordinates = /** @type {PolyCoordType} */ (this.sketchCoords_)[0];
|
coordinates = /** @type {PolyCoordType} */ (this.sketchCoords_)[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user