New library: H5P.Shape

Description

This content type will draw shapes.

Create content type:

  • H5P.Shape

  • Will not be runnable (but can be temporarily just to test it)

Editor (semantics.json):

  • type

    • Rectangle

    • Rounded rectangle

    • Circle

    • Vertical line

    • Horizontal line

  • fill color (with transparency, i.e use colorSelector with showAlpha:true)

    • not applicable for line

  • border/line width (in pixels)

    • To make the border scale, we need to convert the pixel value to em. 1px = 620px

  • border/line color (with transparency, i.e use colorSelector with showAlpha:true)

  • border/line style:

    • Possible values dotted|dashed|solid|double|groove|ridge|inset|outset

    • Default value: solid

  • border radius (in ems?)

    • only applicable for Rounded rectangle

View
Line will set its height/width:

  • Vertical -> height: 100%, width: border/line width

  • Horizontal -> width: 100%, height: border/line width

All other shapes will use 100% width/height

Circle shall have border-radius: 50%

Acceptance Criteria

Ref description

Status

Assignee

Andreas Nergaard

Reporter

Pål Jørgensen

Labels

None

Funding

None

Code reviewer

Pål Jørgensen

Released

None

Time tracking

12h

Fix versions

Priority

Medium