Opened 12 years ago
Last modified 10 years ago
#6909 open feature
Mouse: dragging on right click
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | minor | Milestone: | 2.0.0 |
Component: | ui.mouse | Version: | 1.8.9 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Using the "which" option to target a specific mouse button. like in this example http://threedubmedia.com/code/event/drag/demo/which
$(myDIv).draggable({distance: 5, zIndex: 2700,which:3});
which (Number) Default: 1 A number that matches the "which" event property to indicate the mousebutton that is pressed. (0 = Any Button, 1 = Left Button, 2 = Middle Button, 3 = Right Button)
Change History (12)
comment:2 Changed 12 years ago by
I made some changes, and it started working!
in widget "ui.mouse"in deafult options i added option "which:1"
options:{cancel:":input,option",distance:1,delay:0,which:1}
and in function _mouseDown changed to read this option
btnIsLeft = (event.which == this.options.which) // instead of this (event.which == 1)
comment:3 Changed 11 years ago by
Type: | enhancement → feature |
---|
comment:4 Changed 11 years ago by
Please move this ticket to ui.mouse
and add callback invocation to check if widget should capture. In my project I have like 3 different drag-n-drops and many status depend selections. I can't make it without shift/ctrl/alt and both buttons. I can't monkey patch that either because of mouseHandled
variable. Fix it ASAP. This ticket is blocker
for me.
comment:5 Changed 10 years ago by
reopened new ticket http://bugs.jqueryui.com/ticket/8617 p.s dont know how to move tickets, sorry
comment:7 Changed 10 years ago by
Component: | ui.draggable → ui.mouse |
---|---|
Owner: | set to [email protected]… |
Status: | new → pending |
What is the use case for this? This is extremely uncommon and confusing to users.
comment:8 Changed 10 years ago by
Status: | pending → new |
---|
I developing Diagram Builder, with nodes and transitions between them. When you dragging node by pressing left key - it's normal dragging of the node. When you dragging node by pressing right key - you are starting drawing transition from current node to next node.
It is very comfortable to draw diagrams with both keys. p.s i could atatch some examples, if it is not clear
comment:9 Changed 10 years ago by
You'll be able to cleanly hook into this in the rewrite, but for now, I'd suggest hacking around it. Perhaps listen for mousedown on the right button and retrigger the event with the which
property changed.
comment:10 Changed 10 years ago by
comment:11 Changed 10 years ago by
Milestone: | 1.9.0 → 2.0.0 |
---|
comment:12 Changed 10 years ago by
Status: | new → open |
---|---|
Summary: | dragging on right click → Mouse: dragging on right click |
maybe it is related to this jquery.ui.mouse.js