remove heavy substances

This commit is contained in:
MeexReay 2025-05-28 23:43:13 +03:00
parent df2d7285b2
commit ad36b57df0

View File

@ -214,8 +214,8 @@ async function onMouseMove(ctx, x, y) {
let window = getWindow(dragging_window) let window = getWindow(dragging_window)
moveWindow( moveWindow(
dragging_window, dragging_window,
window.x + (x - mouse_position[0]), Math.min(Math.max(window.x + (x - mouse_position[0]), 0), ctx.canvas.width),
window.y + (y - mouse_position[1]), Math.min(Math.max(window.y + (y - mouse_position[1]), headerHeight), ctx.canvas.height - headerHeight),
window.width, window.width,
window.height window.height
) )
@ -228,8 +228,8 @@ async function onMouseMove(ctx, x, y) {
resizing_window, resizing_window,
window.x, window.x,
window.y, window.y,
window.width + (x - mouse_position[0]), Math.max(window.width + (x - mouse_position[0]), 0),
window.height + (y - mouse_position[1]) Math.max(window.height + (y - mouse_position[1]), 0)
) )
cursor = "nwse-resize" cursor = "nwse-resize"
} }