mfmにscaleを追加

Resolve #9609
This commit is contained in:
syuilo
2023-01-22 20:58:52 +09:00
parent 313a489ba0
commit e6338a555d
2 changed files with 7 additions and 1 deletions

View File

@@ -200,6 +200,12 @@ export default defineComponent({
style = `transform: translateX(${x}em) translateY(${y}em);`;
break;
}
case 'scale': {
const x = Math.min(parseInt(token.props.args.x ?? '1'), 5);
const y = Math.min(parseInt(token.props.args.y ?? '1'), 5);
style = `transform: scale(${x}, ${y});`;
break;
}
case 'fg': {
let color = token.props.args.color;
if (!/^[0-9a-f]{3,6}$/i.test(color)) color = 'f00';