WIP on 0.9.14: 606aa36... On 0.9.14: keyweird
authorMichael Ang <mang@archive.org>
Wed, 2 Sep 2009 21:00:16 +0000 (21:00 +0000)
committerMichael Ang <mang@archive.org>
Wed, 2 Sep 2009 21:00:16 +0000 (21:00 +0000)
1  2 
GnuBook/GnuBook.js

@@@ -678,6 -678,6 +678,14 @@@ GnuBook.prototype.zoom2up = function(di
      // Preserve view center position
      var oldCenter = this.twoPageGetViewCenter();
      
++    // If zooming in, reload imgs.  DOM elements will be removed by prepareTwoPageView
++    // $$$ An improvement would be to use the low res image until the larger one is loaded.
++    if (1 == direction) {
++        for (var img in this.prefetchedImgs) {
++            delete this.prefetchedImgs[img];
++        }
++    }
++    
      // Prepare view with new center to minimize visual glitches
      this.prepareTwoPageView(oldCenter.percentageX, oldCenter.percentageY);
  }