@internetarchive/bookreader 5.0.0-52 → 5.0.0-52-alpha1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@internetarchive/bookreader",
3
- "version": "5.0.0-52",
3
+ "version": "5.0.0-52-alpha1",
4
4
  "description": "The Internet Archive BookReader.",
5
5
  "repository": {
6
6
  "type": "git",
package/src/BookReader.js CHANGED
@@ -1367,6 +1367,7 @@ BookReader.prototype.scrollDown = function() {
1367
1367
  if ($.inArray(this.mode, [this.constMode1up, this.constModeThumb]) >= 0) {
1368
1368
  if ( this.mode == this.constMode1up && (this.reduce >= this.onePageGetAutofitHeight()) ) {
1369
1369
  // Whole pages are visible, scroll whole page only
1370
+ this.trigger('pageChanged');
1370
1371
  return this.next();
1371
1372
  }
1372
1373
 
@@ -1387,6 +1388,7 @@ BookReader.prototype.scrollUp = function() {
1387
1388
  if ($.inArray(this.mode, [this.constMode1up, this.constModeThumb]) >= 0) {
1388
1389
  if ( this.mode == this.constMode1up && (this.reduce >= this.onePageGetAutofitHeight()) ) {
1389
1390
  // Whole pages are visible, scroll whole page only
1391
+ this.trigger('pageChanged');
1390
1392
  return this.prev();
1391
1393
  }
1392
1394
 
@@ -1636,6 +1638,10 @@ BookReader.prototype.bindNavigationHandlers = function() {
1636
1638
  );
1637
1639
 
1638
1640
  this.bindMozTouchHandlers();
1641
+
1642
+ $(document).on('BookReader:pageChanged', () => {
1643
+ console.log('here');
1644
+ })
1639
1645
  };
1640
1646
 
1641
1647
  /**
File without changes