mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-08 17:15:04 +00:00
Implement correct path measurement, matrix calculation, getTextAnchorShift, startOffset.
Add method and spacing attributes to textPath. Correct startOffset calculation. Implement method="stretch".
This commit is contained in:
@@ -114,6 +114,8 @@ const TextAttributes = {
|
||||
|
||||
const TextPathAttributes = {
|
||||
href: true,
|
||||
method: true,
|
||||
spacing: true,
|
||||
startOffset: true,
|
||||
...RenderableAttributes
|
||||
};
|
||||
|
||||
@@ -91,6 +91,8 @@ export default function(props, container) {
|
||||
y,
|
||||
dx,
|
||||
dy,
|
||||
method,
|
||||
spacing,
|
||||
textAnchor,
|
||||
startOffset
|
||||
} = props;
|
||||
@@ -127,6 +129,8 @@ export default function(props, container) {
|
||||
content,
|
||||
deltaX,
|
||||
deltaY,
|
||||
method,
|
||||
spacing,
|
||||
startOffset: (startOffset || 0).toString(),
|
||||
positionX: _.isNil(x) ? null : x.toString(),
|
||||
positionY: _.isNil(y) ? null : y.toString()
|
||||
|
||||
Reference in New Issue
Block a user