Reuse page background colour logic in drawLeafsTwoPage
authorMichael Ang <mang@archive.org>
Wed, 11 Nov 2009 22:52:24 +0000 (22:52 +0000)
committerMichael Ang <mang@archive.org>
Wed, 11 Nov 2009 22:52:24 +0000 (22:52 +0000)
GnuBook/GnuBook.js

index 483c48a..61b36ce 100644 (file)
@@ -576,7 +576,7 @@ GnuBook.prototype.drawLeafsTwoPage = function() {
         left: this.twoPage.gutter-this.twoPage.scaledWL+'px',
         right: '',
         top:    top+'px',
-        backgroundColor: 'rgb(234, 226, 205)',
+        backgroundColor: this.getPageBackgroundColor(indexL),
         height: this.twoPage.height +'px', // $$$ height forced the same for both pages
         width:  this.twoPage.scaledWL + 'px',
         borderRight: '1px solid black',
@@ -596,7 +596,7 @@ GnuBook.prototype.drawLeafsTwoPage = function() {
         left:   this.twoPage.gutter+'px',
         right: '',
         top:    top+'px',
-        backgroundColor: 'rgb(234, 226, 205)',
+        backgroundColor: this.getPageBackgroundColor(indexR),
         height: this.twoPage.height + 'px', // $$$ height forced the same for both pages
         width:  this.twoPage.scaledWR + 'px',
         borderLeft: '1px solid black',