Skip to content

Commit

Permalink
fix: can't rotate with two fingers on web, scale bar has text overflow (
Browse files Browse the repository at this point in the history
  • Loading branch information
josxha authored Dec 10, 2024
1 parent bb98c03 commit 852b96f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/src/platform/web/map_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -380,9 +380,9 @@ final class MapLibreMapStateWeb extends MapLibreMapState {
}
if (gestures.rotate) {
_map.dragRotate.enable();
_map.touchZoomRotate.disableRotation();
} else {
_map.touchZoomRotate.enableRotation();
} else {
_map.touchZoomRotate.disableRotation();
_map.dragRotate.disable();
}
if (gestures.pitch) {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ui/map_scalebar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class _ScaleBarPainter extends CustomPainter {
final textPainter = TextPainter(
text: TextSpan(
style: theme.textTheme.bodySmall?.copyWith(color: Colors.black),
text: '${meters / unit.meters} ${unit.abbreviation}',
text: '${(meters / unit.meters).toInt()} ${unit.abbreviation}',
),
textAlign: TextAlign.left,
textDirection: TextDirection.ltr,
Expand Down

0 comments on commit 852b96f

Please sign in to comment.