Fix tooltip image resize factor

This commit is contained in:
Nicolas Le Goff
2014-06-25 16:21:38 +02:00
parent a87c5bb8e4
commit 8cd2fb7a5c

View File

@@ -414,7 +414,10 @@
} }
if (resizeImgTips) { if (resizeImgTips) {
var factor = Math.max(Math.min((width - 45) / width, (height - 75) / height), 1); var factor = Math.min((width - 45) / width, (height - 75) / height);
if (factor > 1) {
factor = 1;
}
var imgWidth = Math.round(width * factor); var imgWidth = Math.round(width * factor);
var imgHeight = Math.round(height * factor); var imgHeight = Math.round(height * factor);