#2525 closed enhancement (fixed)
Standardised way to pass coordinates to plugins.
Reported by: | xover | Owned by: | Scott González |
---|---|---|---|
Priority: | major | Milestone: | 1.8 |
Component: | [meta] ui.dev | Version: | 1.5b4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
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 (15)
comment:1 Changed 15 years ago by
comment:2 Changed 15 years ago by
Owner: | changed from paul to rworth |
---|
Draggables is updated to also take an array now Could you please continue with dialog?
comment:3 Changed 15 years ago by
Priority: | major → minor |
---|
To make it easier to update the values later on internal API wise, I suggest to use hashes only.
comment:4 Changed 15 years ago by
Type: | bug → enhancement |
---|
comment:5 Changed 15 years ago by
Version: | → 1.5b4 |
---|
comment:6 Changed 15 years ago by
Component: | ui.core → ui.dialog |
---|---|
Milestone: | → 1.6 |
Owner: | changed from rdworth to rworth |
Status: | new → assigned |
comment:7 Changed 15 years ago by
Owner: | changed from rworth to rdworth |
---|
comment:8 Changed 15 years ago by
Milestone: | 1.6 → 1.7 |
---|
comment:9 Changed 14 years ago by
Component: | ui.dialog → [meta] ui.dev |
---|---|
Milestone: | 1.next → 1.8 |
Owner: | rdworth deleted |
Priority: | minor → major |
comment:11 Changed 14 years ago by
Position options:
Dialog - position
Draggable - cursorAt
Sortable - cursorAt
comment:12 Changed 14 years ago by
Owner: | set to scott.gonzalez |
---|
comment:15 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed dialog in r3024.
I recommend that both could accept either an array [x, y] or a hash {top, bottom, left, right}