mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-09-25 03:09:40 +00:00
Merge "Fix image bucketing resize engine"
This commit is contained in:
commit
e0e768f4cd
|
@ -345,7 +345,9 @@
|
|||
innerInfo = imageInfo.imageinfo[0];
|
||||
|
||||
image.onload = function () {
|
||||
image.width = targetWidth;
|
||||
if ( image.width > targetWidth ) {
|
||||
image.width = targetWidth;
|
||||
}
|
||||
viewer.profileEnd( rpid );
|
||||
ui.replaceImageWith( image );
|
||||
this.updateControls();
|
||||
|
@ -692,7 +694,10 @@
|
|||
viewer.profileEnd( mdpid );
|
||||
|
||||
imageEle.onload = function () {
|
||||
imageEle.width = targetWidth;
|
||||
if ( imageEle.width > targetWidth ) {
|
||||
imageEle.width = targetWidth;
|
||||
}
|
||||
|
||||
viewer.profileEnd( pid );
|
||||
|
||||
viewer.lightbox.iface.replaceImageWith( imageEle );
|
||||
|
|
Loading…
Reference in a new issue