mirror of
https://github.com/HeyPuter/puter.git
synced 2026-05-29 12:50:59 +00:00
Update UIItem.js
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
This commit is contained in:
@@ -291,6 +291,7 @@ function UIItem(options){
|
||||
const maxTop = window.desktop_height + window.toolbar_height - 50;
|
||||
|
||||
// Apply constraints to ui.position
|
||||
ui.position.left = Math.max(minLeft, Math.min(maxLeft, ui.position.left));
|
||||
ui.position.top = Math.max(minTop, Math.min(maxTop, ui.position.top));
|
||||
|
||||
// Only show drag helpers if the item has been moved more than 5px
|
||||
|
||||
Reference in New Issue
Block a user