minicosm
minicosm copied to clipboard
Text justification
Add support for text justification property to the :text
element.
Proposal:
- new property on
:text
element::dir
- Contains one of options::left, :center, :right, :start, :end
. - implementation: preserve existing
ctx.textAlign
property, set to the value specified by:dir
if present (name
function will probably help here), restore original property when element is done drawing. This is similar to how:color/:font
are applied. - challenges: None expected.