Ticket #2525 (closed enhancement: invalid)
Standardised way to pass coordinates to plugins.
| Reported by: | xover | Owned by: | rworth |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | ui | Version: | |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Looking at Draggable's cursorAt and Dialog's position options I note that they use different ways to pass a set of coordinates to the function. Dialog uses an array of offsets from top left, where Draggable uses a hash of either {top: n, left: m} or {bottom: n, right: m} (etc.).
There should probably be a common way to pass coordinates to plugins; possibly by making Draggable's way the default with Dialog's way as a convenience shortcut. Dialog's method can also be extended to allow negative offsets to be relative to the bottom and right edges.
Change History
comment:2 Changed 5 years ago by paul
- Owner changed from paul to rworth
Draggables is updated to also take an array now Could you please continue with dialog?
comment:3 Changed 5 years ago by paul
- Priority changed from major to minor
To make it easier to update the values later on internal API wise, I suggest to use hashes only.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

I recommend that both could accept either an array [x, y] or a hash {top, bottom, left, right}