Bug Tracker

Ticket #2525 (closed enhancement: invalid)

Opened 7 years ago

Last modified 4 years ago

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:1 Changed 7 years ago by rworth

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

comment:2 Changed 7 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 7 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.

comment:4 Changed 7 years ago by paul

  • Type changed from bug to enhancement

comment:5 Changed 4 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

This should be filed in the UI bug tracker if still relevant.

 http://dev.jqueryui.com

Note: See TracTickets for help on using tickets.