From 7ceea9df715fb7188955cfd126093b385bf31f56 Mon Sep 17 00:00:00 2001 From: MarcEricMartel Date: Sun, 19 Nov 2023 12:15:42 -0500 Subject: [PATCH] Erratas. --- .../BlazorCanvas.Server/Components/Data/CanvasService.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/BlazorCanvas/BlazorCanvas.Server/Components/Data/CanvasService.cs b/BlazorCanvas/BlazorCanvas.Server/Components/Data/CanvasService.cs index e0dca97..8dd22c7 100644 --- a/BlazorCanvas/BlazorCanvas.Server/Components/Data/CanvasService.cs +++ b/BlazorCanvas/BlazorCanvas.Server/Components/Data/CanvasService.cs @@ -106,8 +106,10 @@ public class CanvasService { CanvasCommand command = new(); // Magnétisme boboche si activé, centrage si pas activé. - mouseX = eventArgs.OffsetX - (!snap? pointSize / 2: mouseX % pointSize); - mouseY = eventArgs.OffsetY - (!snap? pointSize / 2: mouseY % pointSize); + mouseX = eventArgs.OffsetX; + mouseX -= (!snap? pointSize / 2: mouseX % pointSize); + mouseY = eventArgs.OffsetY; + mouseY -= (!snap? pointSize / 2: mouseY % pointSize); if (eventArgs.Buttons == 1) // Couleur si bouton gauche, blanc si bouton droit color = currentColor;