Fixed rectangle/FitOutside.

This commit is contained in:
Antriel 2018-01-16 07:38:41 +01:00
parent 4240f6c4af
commit e342480ca4

View file

@ -27,12 +27,12 @@ var FitOutside = function (target, source)
else
{
// Taller than Wide
target.setSize(source.width, source.width * ratio);
target.setSize(source.width, source.width / ratio);
}
return target.setPosition(
(source.right / 2) - target.width / 2,
(source.bottom / 2) - target.height / 2
source.centerX - target.width / 2,
source.centerY - target.height / 2
);
};