1
0

Corrigé l'offse de scroll

This commit is contained in:
MarcEricMartel 2023-11-12 11:09:53 -05:00
parent 7037e17965
commit 0704cb821c

View File

@ -37,8 +37,8 @@ public class CanvasService {
JObject? offsets = (JObject?)JsonConvert.DeserializeObject(data);
if (offsets is not null && offsets.HasValues) { // Translation entre le canvas et la souris.
mouseX = eventArgs.ClientX - offsets.Value<double>("offsetLeft");
mouseY = eventArgs.ClientY - offsets.Value<double>("offsetTop");
mouseX = eventArgs.PageX - offsets.Value<double>("offsetLeft");
mouseY = eventArgs.PageY - offsets.Value<double>("offsetTop");
}
if (_currentCanvasContext is null)
_currentCanvasContext = await myCanvas.CreateCanvas2DAsync();