Fixed resize of cached images
authorMarcel Werk <burntime@woltlab.com>
Mon, 12 Aug 2013 09:55:23 +0000 (11:55 +0200)
committerMarcel Werk <burntime@woltlab.com>
Mon, 12 Aug 2013 09:55:23 +0000 (11:55 +0200)
wcfsetup/install/files/js/WCF.ImageViewer.js

index 091a4df7e7d664742fc1adfc9c177acf4d29792a..a90e5757aff8e2ac184ed44a1ba2e7b502da8919 100644 (file)
@@ -64,6 +64,10 @@ WCF.ImageViewer = Class.extend({
         * Initializes the image size check.
         */
        _initImageSizeCheck: function() {
+               $('.jsResizeImage').each($.proxy(function(index, image) {
+                       if (image.complete) this._checkImageSize({ currentTarget: image });
+               }, this));
+               
                $('.jsResizeImage').on('load', $.proxy(this._checkImageSize, this));
        },