Opened 9 years ago

Closed 9 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:

Description

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

so...

(function($) {

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

Change History (1)

comment:1 Changed 9 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.