Opened 8 years ago
Last modified 8 years ago
#12588 new feature
Draggable: add an ability to use function in the `pointAt` option
Reported by: | extempl | Owned by: | extempl |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.draggable | Version: | 1.11.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The reason is that offset may depend on different blocks or media rules (one block has different sizes on tablet and desktop).
Change History (4)
comment:1 Changed 8 years ago by
comment:2 Changed 8 years ago by
Owner: | set to extempl |
---|---|
Status: | new → pending |
And why does that need to be determined at start instead of at initialization? The page isn't changing from tablet to desktop over time.
comment:4 Changed 8 years ago by
Status: | pending → new |
---|
And why does that need to be determined at start instead of at initialization?
In my case, there are a lot of draggables (≈2000) which has different sizes, but user will drag only ≈100 through entire session. So why it should be calculated and checked on every initialisation instead of simple check at start?
The page isn't changing from tablet to desktop over time.
Well, I know people, who uses windowed browser and resizing it from time to time. Also, tablet/mobile rotation changes size too. Also, there may be some dynamic size where you may need to point cursor at center of an element.
In any way, the best approach is to let to user decide what will be better for him - calculate size on initialisation or on drag start.
Also, there is no pointAt option. I believe you meant cursorAt.
Yes, you're right. My fault here.
Just add following code to draggable.js:388