From 9e46f040a18a9d005f51e4002c7fbc6fbc6a7591 Mon Sep 17 00:00:00 2001 From: Johann150 Date: Tue, 26 Apr 2022 22:26:22 +0200 Subject: [PATCH] add x,y parameters to rotate MFM --- packages/client/src/components/mfm.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/client/src/components/mfm.ts b/packages/client/src/components/mfm.ts index 37076652f..0099eb465 100644 --- a/packages/client/src/components/mfm.ts +++ b/packages/client/src/components/mfm.ts @@ -178,8 +178,12 @@ export default defineComponent({ return h(MkSparkle, {}, genEl(token.children)); } case 'rotate': { + const rotateDir = + token.props.args.x ? 'X' : + token.props.args.y ? 'Y' : + ''; const degrees = parseInt(token.props.args.deg) || '90'; - style = `transform: rotate(${degrees}deg); transform-origin: center center;`; + style = `transform: rotate${rotateDir}(${degrees}deg); transform-origin: center center;`; break; } }