mirror of
https://github.com/HeyPuter/puter
synced 2024-11-14 22:06:00 +00:00
Allow manual arrangement only if item is being dropped directly on the Desktop
This commit is contained in:
parent
c0d2472860
commit
c495d9f8fd
@ -344,7 +344,10 @@ function UIItem(options){
|
|||||||
stop: function(event, ui){
|
stop: function(event, ui){
|
||||||
// Allow rearranging only if item is on desktop, not trash container, auto arrange is disabled and item is not dropped into another item
|
// 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 &&
|
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')){
|
!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){
|
||||||
|
|
||||||
el_item.style.position = 'absolute';
|
el_item.style.position = 'absolute';
|
||||||
el_item.style.left = ui.position.left + 'px';
|
el_item.style.left = ui.position.left + 'px';
|
||||||
el_item.style.top = ui.position.top + 'px';
|
el_item.style.top = ui.position.top + 'px';
|
||||||
|
Loading…
Reference in New Issue
Block a user