mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 17:51:21 +00:00
Applied autofix for object-curly-newline rule.
This commit is contained in:
@@ -4,7 +4,9 @@ const applyTranslateY = ({ scaleY = 1, translateY = 0 }, y) => (y * scaleY) + tr
|
||||
const applyScaleX = ({ scaleX = 1 }, width) => width * scaleX;
|
||||
const applyScaleY = ({ scaleY = 1 }, height) => height * scaleY;
|
||||
|
||||
export const applyTransform = (transform, { width = 0, height = 0, x, y }) => ({
|
||||
export const applyTransform = (transform, {
|
||||
width = 0, height = 0, x, y
|
||||
}) => ({
|
||||
x: applyTranslateX(transform, x),
|
||||
y: applyTranslateY(transform, y),
|
||||
width: applyScaleX(transform, width),
|
||||
@@ -17,7 +19,9 @@ const inverseTranslateY = ({ scaleY = 1, translateY = 0 }, y) => (y - translateY
|
||||
const inverseScaleX = ({ scaleX = 1 }, width) => width / scaleX;
|
||||
const inverseScaleY = ({ scaleY = 1 }, height) => height / scaleY;
|
||||
|
||||
export const inverseTransform = (transform, { width = 0, height = 0, x, y }) => ({
|
||||
export const inverseTransform = (transform, {
|
||||
width = 0, height = 0, x, y
|
||||
}) => ({
|
||||
x: inverseTranslateX(transform, x),
|
||||
y: inverseTranslateY(transform, y),
|
||||
width: inverseScaleX(transform, width),
|
||||
@@ -25,6 +29,8 @@ export const inverseTransform = (transform, { width = 0, height = 0, x, y }) =>
|
||||
});
|
||||
|
||||
|
||||
export const transformToString = ({ translateX = 0, translateY = 0, scaleX = 1, scaleY = 1 }) => (
|
||||
export const transformToString = ({
|
||||
translateX = 0, translateY = 0, scaleX = 1, scaleY = 1
|
||||
}) => (
|
||||
`translate(${translateX},${translateY}) scale(${scaleX},${scaleY})`
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user