Skip to main content

Search and Top Navigation

#2525 closed enhancement (fixed)

Opened March 15, 2008 05:46PM UTC

Closed August 03, 2009 02:29PM UTC

Last modified January 17, 2010 06:07AM UTC

Standardised way to pass coordinates to plugins.

Reported by: xover Owned by: scottgonzalez
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.

Attachments (0)
Change History (15)

Changed March 15, 2008 05:52PM UTC by rdworth comment:1

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

Changed March 17, 2008 09:34AM UTC by paul comment:2

owner: paul → rworth

Draggables is updated to also take an array now Could you please continue with dialog?

Changed May 04, 2008 08:55AM UTC by paul comment:3

priority: major → minor

To make it easier to update the values later on internal API wise, I suggest to use hashes only.

Changed May 05, 2008 08:56AM UTC by paul comment:4

type: bug → enhancement

Changed May 24, 2008 07:33PM UTC by paul comment:5

version: → 1.5b4

Changed August 16, 2008 08:22PM UTC by Cloudream comment:6

component: ui.core → ui.dialog
milestone: → 1.6
owner: rdworth → rworth
status: new → assigned

Changed August 16, 2008 08:22PM UTC by Cloudream comment:7

owner: rworth → rdworth

Changed August 25, 2008 01:20PM UTC by scottgonzalez comment:8

milestone: 1.6 → 1.7

Changed March 29, 2009 04:50PM UTC by scottgonzalez comment:9

component: ui.dialog → [meta] ui.dev
milestone: 1.next → 1.8
owner: rdworth
priority: minor → major

Changed June 09, 2009 12:27AM UTC by scottgonzalez comment:10

requires positionTo plugin

Changed July 31, 2009 12:46AM UTC by scottgonzalez comment:11

Position options:

Dialog - position

Draggable - cursorAt

Sortable - cursorAt

Changed August 03, 2009 01:01AM UTC by scottgonzalez comment:12

owner: → scott.gonzalez

Changed August 03, 2009 01:14PM UTC by scottgonzalez comment:13

Fixed draggable in r3021.

Changed August 03, 2009 01:17PM UTC by scottgonzalez comment:14

Fixed sortable in r3022.

Changed August 03, 2009 02:29PM UTC by scottgonzalez comment:15

resolution: → fixed
status: assigned → closed

Fixed dialog in r3024.