Skip to content

Commit b885052

Browse files
authored
round UI position css value (#2503)
1 parent 06b08c8 commit b885052

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/maptalks/src/ui/UIComponent.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -942,9 +942,9 @@ class UIComponent extends Eventable(Class) {
942942
if (this.options['rotateWithMap'] && bearing) {
943943
r += ` rotateZ(${Math.round(-bearing)}deg)`;
944944
}
945-
return 'translate3d(' + Math.fround(p.x) + 'px,' + Math.fround(p.y) + 'px, 0px)' + r;
945+
return 'translate3d(' + Math.round(p.x) + 'px,' + Math.round(p.y) + 'px, 0px)' + r;
946946
} else {
947-
return 'translate(' + Math.fround(p.x) + 'px,' + Math.fround(p.y) + 'px)';
947+
return 'translate(' + Math.round(p.x) + 'px,' + Math.round(p.y) + 'px)';
948948
}
949949
}
950950

0 commit comments

Comments
 (0)