mirror of
https://github.com/HeyPuter/puter
synced 2024-11-14 22:06:00 +00:00
minor fix in disallowing items arrange over task bar
This commit is contained in:
parent
4981d1c490
commit
17a82f316d
@ -345,8 +345,8 @@ function UIItem(options){
|
||||
// Allow rearranging only if item is on desktop, not trash container, auto arrange is disabled and item is not dropped into another item
|
||||
if($(el_item).closest('.item-container').attr('data-path') === window.desktop_path &&
|
||||
!is_auto_arrange_enabled && $(el_item).attr('data-path') !== trash_path && !ui.helper.data('dropped') &&
|
||||
// Item must be dropped on the Desktop
|
||||
mouseover_window === undefined){
|
||||
// Item must be dropped on the Desktop and not on the taskbar
|
||||
mouseover_window === undefined && ui.position.top <= window.desktop_height - window.taskbar_height - 15){
|
||||
|
||||
el_item.style.position = 'absolute';
|
||||
el_item.style.left = ui.position.left + 'px';
|
||||
@ -356,13 +356,6 @@ function UIItem(options){
|
||||
save_desktop_item_positions()
|
||||
}
|
||||
|
||||
// If item is dropped on the taskbar, reset its position
|
||||
if(ui.position.top >= window.desktop_height - window.taskbar_height) {
|
||||
el_item.style.position = 'absolute';
|
||||
el_item.style.left = ui.originalPosition.left + 'px';
|
||||
el_item.style.top = ui.originalPosition.top + 'px';
|
||||
}
|
||||
|
||||
$('.item-selected-clone').remove();
|
||||
$('.draggable-count-badge').remove();
|
||||
// re-enable all droppable UIItems that are not a dir
|
||||
|
Loading…
Reference in New Issue
Block a user