Ticket #2525 (closed enhancement: fixed)

Opened 2 years ago

Last modified 8 weeks ago

Standardised way to pass coordinates to plugins.

Reported by: xover Owned by: scott.gonzalez
Priority: major Milestone: 1.8
Component: [meta] ui.dev Version: 1.5b4
Keywords: Cc:

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

Changed 2 years ago by rdworth

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

Changed 2 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?

Changed 23 months 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.

Changed 23 months ago by paul

  • type changed from bug to enhancement

Changed 22 months ago by paul

  • version set to 1.5b4

Changed 19 months ago by Cloudream

  • owner changed from rdworth to rworth
  • status changed from new to assigned
  • component changed from ui.core to ui.dialog
  • milestone set to 1.6

Changed 19 months ago by Cloudream

  • owner changed from rworth to rdworth

Changed 19 months ago by scott.gonzalez

  • milestone changed from 1.6 to 1.7

Changed 12 months ago by scott.gonzalez

  • owner rdworth deleted
  • priority changed from minor to major
  • component changed from ui.dialog to [meta] ui.dev
  • milestone changed from 1.next to 1.8

Changed 9 months ago by scott.gonzalez

requires positionTo plugin

Changed 7 months ago by scott.gonzalez

Position options:
Dialog - position
Draggable - cursorAt
Sortable - cursorAt

Changed 7 months ago by scott.gonzalez

  • owner set to scott.gonzalez

Changed 7 months ago by scott.gonzalez

Fixed draggable in r3021.

Changed 7 months ago by scott.gonzalez

Fixed sortable in r3022.

Changed 7 months ago by scott.gonzalez

  • status changed from assigned to closed
  • resolution set to fixed

Fixed dialog in r3024.

Note: See TracTickets for help on using tickets.