Explorar el Código

Fix marker visibility calculation

Johannes Hofmann hace 7 años
padre
commit
2f5db2e7ad
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2
    2
      src/map_view_gl.rs

+ 2
- 2
src/map_view_gl.rs Ver fichero

@@ -313,8 +313,8 @@ impl MapViewGl {
313 313
         let t4 = Point2::new(0.0f32, 1.0);
314 314
 
315 315
         let visible_rect = ScreenRect {
316
-            x: marker_offset.x,
317
-            y: marker_offset.y,
316
+            x: -(marker_offset.x + marker_size.x),
317
+            y: -(marker_offset.y + marker_size.y),
318 318
             width: f64::from(self.viewport_size.0) + marker_size.x,
319 319
             height: f64::from(self.viewport_size.1) + marker_size.y,
320 320
         };