Skip to content

Commit

Permalink
round UI position css value (#2503)
Browse files Browse the repository at this point in the history
  • Loading branch information
deyihu authored Feb 19, 2025
1 parent 06b08c8 commit b885052
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/maptalks/src/ui/UIComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -942,9 +942,9 @@ class UIComponent extends Eventable(Class) {
if (this.options['rotateWithMap'] && bearing) {
r += ` rotateZ(${Math.round(-bearing)}deg)`;
}
return 'translate3d(' + Math.fround(p.x) + 'px,' + Math.fround(p.y) + 'px, 0px)' + r;
return 'translate3d(' + Math.round(p.x) + 'px,' + Math.round(p.y) + 'px, 0px)' + r;
} else {
return 'translate(' + Math.fround(p.x) + 'px,' + Math.fround(p.y) + 'px)';
return 'translate(' + Math.round(p.x) + 'px,' + Math.round(p.y) + 'px)';
}
}

Expand Down

0 comments on commit b885052

Please sign in to comment.