add perspective

This commit is contained in:
Johann150 2022-04-27 17:25:27 +02:00
parent 92d53f7441
commit f68a2c0881
No known key found for this signature in database
GPG Key ID: 9EE6577A2A06F8F1
1 changed files with 5 additions and 5 deletions

View File

@ -178,12 +178,12 @@ export default defineComponent({
return h(MkSparkle, {}, genEl(token.children)); return h(MkSparkle, {}, genEl(token.children));
} }
case 'rotate': { case 'rotate': {
const rotateDir = const rotate =
token.props.args.x ? 'X' : token.props.args.x ? 'perspective(128px) rotateX' :
token.props.args.y ? 'Y' : token.props.args.y ? 'perspective(128px) rotateY' :
''; 'rotate';
const degrees = parseInt(token.props.args.deg) || '90'; const degrees = parseInt(token.props.args.deg) || '90';
style = `transform: rotate${rotateDir}(${degrees}deg); transform-origin: center center;`; style = `transform: ${rotate}(${degrees}deg); transform-origin: center center;`;
break; break;
} }
} }