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: |
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 */ ...
Note: See
TracTickets for help on using
tickets.
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.