Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { vec3, mat4 } from "gl-matrix";

/*
SVG transform attr is a bit strange in that it can accept traditional
css transform string (at least per spec) as well as a it's own "unitless"
css transform string (at least per spec) as well as its own "unitless"
version of transform functions.

https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/transform
Expand Down Expand Up @@ -116,7 +116,7 @@ const svgTransformToCSSTransform = (svgTransformStr: string): string => {
});

// Generate a string of transform functions that can be set as a CSS Transform.
const csstransformStr = tFuncValues
const cssTransformStr = tFuncValues
.map(({ type, values }) => {
const valStr = values
.map(({ unit, value }) => `${value}${unit}`)
Expand All @@ -125,7 +125,7 @@ const svgTransformToCSSTransform = (svgTransformStr: string): string => {
})
.join(" ");

return csstransformStr;
return cssTransformStr;
};

export const createDOMMatrixFromSVGStr = (
Expand Down
4 changes: 2 additions & 2 deletions src/walker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const presAttrs = (
};

const skippedUseAttrs = ["id"];
const allwaysPassedUseAttrs = [
const alwaysPassedUseAttrs = [
"x",
"y",
"width",
Expand Down Expand Up @@ -104,7 +104,7 @@ const getDefElWithCorrectAttrs = (defEl: Element, useEl: Element): Element => {
// Does defEl have the attr? If so, use it, else use the useEl attr
if (
!defEl.hasAttribute(attr.name) ||
allwaysPassedUseAttrs.includes(attr.name)
alwaysPassedUseAttrs.includes(attr.name)
) {
el.setAttribute(attr.name, useEl.getAttribute(attr.name) || "");
}
Expand Down