We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 63c4025 commit c11920aCopy full SHA for c11920a
1 file changed
src/geom/rectangle/FitInside.js
@@ -27,12 +27,12 @@ var FitInside = function (target, source)
27
else
28
{
29
// Wider than Tall
30
- target.setSize(source.width, source.width * ratio);
+ target.setSize(source.width, source.width / ratio);
31
}
32
33
return target.setPosition(
34
- (source.right / 2) - (target.width / 2),
35
- (source.bottom / 2) - (target.height / 2)
+ source.centerX - (target.width / 2),
+ source.centerY - (target.height / 2)
36
);
37
};
38
0 commit comments