Ticket #2525 (closed enhancement: fixed)

Opened 7 years ago

Last modified 5 years 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:
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 rdworth

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 7 years ago by paul

  • Version set to 1.5b4

comment:6 Changed 6 years 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

comment:7 Changed 6 years ago by Cloudream

  • Owner changed from rworth to rdworth

comment:8 Changed 6 years ago by scott.gonzalez

  • Milestone changed from 1.6 to 1.7

comment:9 Changed 6 years 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

comment:10 Changed 6 years ago by scott.gonzalez

requires positionTo plugin

comment:11 Changed 5 years ago by scott.gonzalez

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

comment:12 Changed 5 years ago by scott.gonzalez

  • Owner set to scott.gonzalez

comment:13 Changed 5 years ago by scott.gonzalez

Fixed draggable in r3021.

comment:14 Changed 5 years ago by scott.gonzalez

Fixed sortable in r3022.

comment:15 Changed 5 years 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.