Panels IPE uses jQuery UI's "sortable" widget to drag and drop stuff around the page. However, the current tolerance option is making it difficult to drag panes in certain situations.

For example, if you have a super wide column on the left and a shorter column on the right, it's very difficult to move the pane from the left to the right.

That's because the default tolerance option is "intersect", which means you have to overlap the right column by at least 50% of the dragged pane to drop it there. But the drag icon is on the far right side of the pane, and if your browser is not very wide, you won't be able to drag it over far enough to drop it.

The sortable widget has a "pointer" value for this option which determines the drop eligibility based on the mouse position. This feels way more intuitive when dragging, and it solves the problem I described above.

Can we change this value? It should have no negative effects for existing sites, only the positive benefit of feeling more intuitive.

Comments

joelstein created an issue. See original summary.

joelstein’s picture

Status: Active » Needs review
StatusFileSize
new439 bytes

Here's a simple one-line patch which does the trick. We are using this on dozens of sites with no problems.

chrisgross’s picture

Status: Needs review » Reviewed & tested by the community

I can confirm that this patch works and also solves the issue of not being able to place panels panes in certain regions, as mentioned in #2645812: Panels IPE drag&drop behavior improvement

  • japerry committed 60906a0 on 7.x-3.x authored by joelstein
    Issue #2821146 by joelstein: Use 'pointer' tolerance for Panels IPE
    
japerry’s picture

Status: Reviewed & tested by the community » Fixed

Sounds good to me! Committed.

joelstein’s picture

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.