0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-08 03:12:40 +00:00

Fix corner snippet reversed Y position

This commit is contained in:
Trevor Buckner
2023-02-22 14:48:24 -05:00
parent 2a75c702b9
commit 096b3d00fc

View File

@@ -10,16 +10,16 @@ module.exports = {
'right' : 270 'right' : 270
}[side]; }[side];
return dedent` return dedent`
{{imageMaskEdge${_.random(1, 8)},--offset:0cm,--rotation:${rotation}; {{imageMaskEdge${_.random(1, 8)},--offset:0cm,--rotation:${rotation}
![](https://i.imgur.com/GZfjDWV.png){height:100%} ![](https://i.imgur.com/GZfjDWV.png){height:100%}
}} }}
<!-- Use --offset to shift the edge up or down from the page center. <!-- Use --offset to shift the mask toward or away from the page center.
Use --rotation to set rotation angle in degrees. -->\n\n`; Use --rotation to set rotation angle in degrees. -->\n\n`;
}, },
corner : (y = 'top', x = 'left')=>{ corner : (y = 'top', x = 'left')=>{
const offsetX = (x == 'left' ? '-50%' : '50%'); const offsetX = (x == 'left' ? '-50%' : '50%');
const offsetY = (y == 'top' ? '-50%' : '50%'); const offsetY = (y == 'top' ? '50%' : '-50%');
return dedent` return dedent`
{{imageMaskCorner${_.random(1, 37)},--offsetX:${offsetX},--offsetY:${offsetY},--rotation:0 {{imageMaskCorner${_.random(1, 37)},--offsetX:${offsetX},--offsetY:${offsetY},--rotation:0
![](https://i.imgur.com/GZfjDWV.png){height:100%} ![](https://i.imgur.com/GZfjDWV.png){height:100%}