Skip to content

Commit

Permalink
polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
kruegercharles committed Dec 1, 2023
1 parent 71022f9 commit 0a3a1e2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/routing/views/map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1011,8 +1011,6 @@ class RoutingMapViewState extends State<RoutingMapView> with TickerProviderState
Future<void> moveDraggedWaypoint(BuildContext context, double dx, double dy) async {
if (routing.selectedWaypoints == null) return;

final ppi = MediaQuery.of(context).devicePixelRatio;

draggedWaypointIndex = routing.getIndexOfWaypoint(draggedWaypoint!);

// remove old waypoint from before dragging from routing and search history
Expand All @@ -1023,6 +1021,7 @@ class RoutingMapViewState extends State<RoutingMapView> with TickerProviderState
double x = dx;
double y = dy;

final ppi = MediaQuery.of(context).devicePixelRatio;
// On android, we need to multiply by the ppi.
if (Platform.isAndroid) {
x *= ppi;
Expand Down

0 comments on commit 0a3a1e2

Please sign in to comment.