Skip to main content

Search and Top Navigation

#1969 closed feature (notabug)

Opened November 26, 2007 10:26AM UTC

Closed March 14, 2008 05:08PM UTC

Last modified May 24, 2008 03:39AM UTC

UI.draggable - limits/boundaries

Reported by: pwoldberg Owned by:
Priority: minor Milestone:
Component: ui.core Version: 1.2.1
Keywords: Cc:
Blocked by: Blocking:
Description

Would be nice to have limits/boundaries for draggable elements. Currently it can be limited by a parent element and by x- or y-axis.

Example for implementation:

jQuery('#drag').draggable({
  limit: {top: 50, left: 100, bottom: 200, right: 200}
});

jQuery('#dragHorizontal').draggable({
  axis : 'x',
  limit: {left: 100, right: 400}
});

I don't know if top, left, bottom and right would be best to set the boundaries, an other idea is to use x1, y1, x2 and y2.

Attachments (0)
Change History (3)

Changed February 20, 2008 02:29PM UTC by m0n5t3r comment:1

this could also e useful in another problem: when you drag something towards the right/bottom border of the screen, the page will be expanded horizontally/vertically, which is leads to ugly results; so, constraining by default to the window limits would be nice.

Changed March 14, 2008 05:08PM UTC by paul comment:2

resolution: → invalid
status: newclosed

this can be done using the containment option.

Changed May 24, 2008 03:39AM UTC by comment:3

milestone: 1.2.2

Milestone 1.2.2 deleted