Corrigé l'offse de scroll
This commit is contained in:
parent
7037e17965
commit
0704cb821c
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user