Assign total leaf edge width before using that value in calculation!
authorMichael Ang <mang@archive.org>
Wed, 19 Aug 2009 20:34:21 +0000 (20:34 +0000)
committerMichael Ang <mang@archive.org>
Wed, 19 Aug 2009 20:34:21 +0000 (20:34 +0000)
GnuBook/GnuBook.js

index b2753f5..ae4ea5a 100644 (file)
@@ -1090,9 +1090,9 @@ GnuBook.prototype.calculateSpreadSize = function() {
     this.twoPage.scaledWR = this.getPageWidth2UP(secondIndex);
     
     // Leaf edges
+    this.twoPage.edgeWidth = spreadSize.totalLeafEdgeWidth; // The combined width of both edges
     this.twoPage.leafEdgeWidthL = this.leafEdgeWidth(this.twoPage.currentIndexL);
     this.twoPage.leafEdgeWidthR = this.twoPage.edgeWidth - this.twoPage.leafEdgeWidthL;
-    this.twoPage.edgeWidth = spreadSize.totalLeafEdgeWidth; // The combined width of both edges
     
     
     // Book cover