don't use dom points in gist, fixes yaml exports
This commit is contained in:
parent
94c324b2e7
commit
aa75c041f7
1 changed files with 4 additions and 1 deletions
|
@ -181,7 +181,10 @@ const Part = props => {
|
|||
const matrix = innerRef.current.ownerSVGElement.getScreenCTM().inverse();
|
||||
|
||||
// a function to convert dom space to svg space
|
||||
const domToSvg = (point) => DOMPointReadOnly.fromPoint(point).matrixTransform(matrix)
|
||||
const domToSvg = (point) => {
|
||||
const {x, y} = DOMPointReadOnly.fromPoint(point).matrixTransform(matrix)
|
||||
return {x, y}
|
||||
}
|
||||
|
||||
// include the new top left and bottom right to ease calculating the pattern width and height
|
||||
const tl = domToSvg({x: partRect.left, y: partRect.top});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue