mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Some attempts at proper anchor movement..
This commit is contained in:
1 parent
99c1638907
commit
b2507202bd
6 files changed
+269
-153
No files matched your search
@@ -44,8 +44,16 @@ namespace Artemis.UI.Screens.Shared
|
||||
Zoom = Math.Max(0.1, Math.Min(4, Zoom));
|
||||
|
||||
// Update the PanX/Y to enable zooming relative to cursor
|
||||
PanX = Math.Min(0, absoluteX - relative.X * Zoom);
|
||||
PanY = Math.Min(0, absoluteY - relative.Y * Zoom);
|
||||
if (LimitToZero)
|
||||
{
|
||||
PanX = Math.Min(0, absoluteX - relative.X * Zoom);
|
||||
PanY = Math.Min(0, absoluteY - relative.Y * Zoom);
|
||||
}
|
||||
else
|
||||
{
|
||||
PanX = absoluteX - relative.X * Zoom;
|
||||
PanY = absoluteY - relative.Y * Zoom;
|
||||
}
|
||||
}
|
||||
|
||||
public void ProcessMouseMove(object sender, MouseEventArgs e)
|
||||
|
||||
Reference in new issue
Block a user