Merge pull request #250 from jkol/master

Added "valign" option to image "fit" scaling
This commit is contained in:
Devon Govett 2014-07-14 20:46:43 -07:00
commit afbb700fb1

View File

@ -56,6 +56,10 @@ module.exports =
x = x + bw / 2 - w / 2
else if options.align is 'right'
x = x + bw - w
if options.valign is 'center'
y = y + bh / 2 - h / 2
else if options.valign is 'bottom'
y = y + bh - h
# Set the current y position to below the image if it is in the document flow
@y += h if @y is y