Ticket #6981 (closed enhancement: fixed)

Opened 2 years ago

Last modified 8 months ago

Position: Merge offset option into my and at options

Reported by: adovenmuehle Owned by:
Priority: blocker Milestone: 1.9.0
Component: ui.position Version: 1.8.9
Keywords: Cc:
Blocking: Blocked by:

Change History

comment:1 Changed 2 years ago by scott.gonzalez

  • Priority changed from minor to blocker
  • Status changed from new to open
  • Summary changed from Merge offset option into my and at options to Position: Merge offset option into my and at options

comment:2 Changed 2 years ago by Scott González

  • Status changed from open to closed
  • Resolution set to fixed

Position: Merged offset option into my and at options and added support for percentage-based offsets. Fixes #6981 - Position: Merge offset option into my and at options. Fixes #7028 - Position: Allow percent-based offsets.

Changeset: 6f051d5d6a8eaf6fcc2a08ff68dbf5378029abc2

comment:3 Changed 8 months ago by olejorgenb

Gets kinda awkward when you have dynamic offsets..

function offsetString(value) {
  if(value >= 0)
    return "+"+value;
  else
    return ""+value; // -45 ==> "-45"
}
// ...
elem.position({
  my: "right"+offsetString(dynamicOffset) + " center",
// ...
});

Easily solvable by a utility function though

Note: See TracTickets for help on using tickets.