Skip to content

Commit

Permalink
fix Marker drag position error when it has dx/dy (#2368)
Browse files Browse the repository at this point in the history
* fix Marker drag postion error when it has dx/dy

* updates
  • Loading branch information
deyihu authored Jul 3, 2024
1 parent a5e46b4 commit fd3d98d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/geometry/ext/Geometry.Drag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,10 @@ class GeometryDragHandler extends Handler {
}
this._lastPoint = point;
this._lastCoord = coord;
geo.translate(coordOffset);
const isPoint = !geo.getGeometries && geo.isPoint;
isPoint ? geo.setCoordinates(coord) : geo.translate(coordOffset);
if (geo !== target && !target.options['dragShadow']) {
target.translate(coordOffset);
isPoint ? target.setCoordinates(coord) : target.translate(coordOffset);
}
e['coordOffset'] = coordOffset;
e['pointOffset'] = pointOffset;
Expand Down

0 comments on commit fd3d98d

Please sign in to comment.