Skip to content

OMERO.figure standalone labels #101

@will-moore

Description

@will-moore

See https://trello.com/c/wtu7IVuN/10-stand-alone-labels

Standalone labels have been a long-requested feature. Need to consider:

  • How to add labels?
  • What attributes do labels have?
  • What does the UI look like if we select labels AND panels?
  • Alignment, rotation, text-justification, resize or expand
  • Borders? Background?

Adding labels

  • Powerpoint supports double-clicking on the canvas to add a text box (of flexible width). Also there is a "Text box" tool. When selected, you can click anywhere to add a label there.
  • Illustrator also has "Text box" tool.
  • For Figure, certainly double-clicking on an empty spot of canvas could add a Text-box, but we probably need other ways too, to aid discoverability etc.
  • When no panels are selected, the Add Labels form should still be visible and should add "stand-alone labels" to the current centre of the figure viewport. This means we're using the same UI widgets and method for adding labels to Panels or to the Figure. Don't need any new buttons etc. When panels are selected, the form could be titled Add Labels to Panels.

Label attributes

Labels should have common attributes for panels for position and size as well as unique font attributes:

  • Layout (share with panels): x, y, width, height, rotation
  • Existing Label attributes: text, color, size
  • NEW Label attribute: text-align
  • Border: NB-allow to set top, left, right or bottom independently via css attrs: border-top-color, border-right-width etc.
  • Background: background-color

NB: Need to define padding and rotation-anchor behaviour. Do we allow users to choose? Best if we can work out nice default behaviour for common use cases.

Select labels AND panels

  • We should be able to select labels and/or panels in the same way we can now (clicking or drag-select).
  • Align-left, Align-top and snap-to-grid should work in the same way.

Examples

Screen Shot 2019-03-27 at 22 21 18

Screen Shot 2019-03-27 at 23 06 00

From http://jcb.rupress.org/content/early/2019/03/25/jcb.201807165/tab-figures-data

Screen Shot 2019-03-27 at 23 11 04

From http://jcb.rupress.org/content/early/2019/03/19/jcb.201809161/tab-figures-data

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions