@joint/core 4.0.0 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +124 -5
- package/dist/geometry.js +1 -1
- package/dist/geometry.min.js +1 -1
- package/dist/joint.d.ts +23 -13
- package/dist/joint.js +543 -198
- package/dist/joint.min.js +2 -2
- package/dist/joint.nowrap.js +543 -198
- package/dist/joint.nowrap.min.js +2 -2
- package/dist/vectorizer.js +5 -1
- package/dist/vectorizer.min.js +2 -2
- package/dist/version.mjs +1 -1
- package/package.json +1 -2
- package/src/V/index.mjs +4 -0
- package/src/core.mjs +48 -0
- package/src/dia/Paper.mjs +2 -0
- package/src/dia/attributes/text.mjs +8 -4
- package/src/routers/rightAngle.mjs +486 -153
- package/types/joint.d.ts +22 -12
|
@@ -123,12 +123,16 @@ const textAttributesNS = {
|
|
|
123
123
|
if (text === undefined) text = attrs.text;
|
|
124
124
|
if (text !== undefined) {
|
|
125
125
|
const breakTextFn = value.breakText || breakText;
|
|
126
|
+
const computedStyles = getComputedStyle(node);
|
|
127
|
+
|
|
126
128
|
wrappedText = breakTextFn('' + text, size, {
|
|
127
|
-
'font-weight':
|
|
128
|
-
'font-
|
|
129
|
-
'
|
|
129
|
+
'font-weight': computedStyles.fontWeight,
|
|
130
|
+
'font-family': computedStyles.fontFamily,
|
|
131
|
+
'text-transform': computedStyles.textTransform,
|
|
132
|
+
'font-size': computedStyles.fontSize,
|
|
133
|
+
'letter-spacing': computedStyles.letterSpacing,
|
|
134
|
+
// The `line-height` attribute in SVG is JoinJS specific.
|
|
130
135
|
'lineHeight': attrs['line-height'],
|
|
131
|
-
'letter-spacing': attrs['letter-spacing']
|
|
132
136
|
}, {
|
|
133
137
|
// Provide an existing SVG Document here
|
|
134
138
|
// instead of creating a temporary one over again.
|