Opened 13 years ago

Closed 13 years ago

#5849 closed enhancement (wontfix)

Drag contained event

Reported by: webXL Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.draggable Version: 1.8.2
Keywords: Containment Cc:
Blocked by: Blocking:


I'd like to know when my drag position is affected by the containment option; i.e. when my drag hits the edges.


(function($) {

$.widget("ui.draggable", $.ui.mouse, {
_generatePosition: function(event) {
if(this.containment) {
				if(event.pageX - < this.containment[0]) { 
         pageX = this.containment[0] +;
         /* trigger 'dragContained' event around here */

Change History (1)

comment:1 Changed 13 years ago by Scott González

Resolution: wontfix
Status: newclosed

You can do this manually or build it as an extension, but we're not inclined to make this part of the core of the plugin.

Note: See TracTickets for help on using tickets.