The text-wrap attribute takes external CSS and inherited styles into account when computing the line breaks (previously only explicit inline attributes were considered).
The text-wrap worked properly only when the font attributes were set explicitly.
<text font-size="12">A text to wrap</text>
This PR adds support for external CSS:
<style>
text { font-size: 12px; }
</style>
...
<text>A text to wrap</text>
Note: Thanks to https://github.com/clientIO/joint/pull/2459, all font attributes are evaluated and set before text-wrap, so it is safe to use the getComputedStyle() method.
Description
The
text-wrap
attribute takes external CSS and inherited styles into account when computing the line breaks (previously only explicit inline attributes were considered).The
text-wrap
worked properly only when the font attributes were set explicitly.This PR adds support for external CSS:
Note: Thanks to https://github.com/clientIO/joint/pull/2459, all font attributes are evaluated and set before
text-wrap
, so it is safe to use thegetComputedStyle()
method.Fixes https://github.com/clientIO/joint/issues/2295.