Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Unable to use postProcess with beforeReady #172

Closed
superlou opened this issue Oct 31, 2019 · 0 comments · Fixed by #179
Closed

Unable to use postProcess with beforeReady #172

superlou opened this issue Oct 31, 2019 · 0 comments · Fixed by #179

Comments

@superlou
Copy link

superlou commented Oct 31, 2019

I might be using this wrong, but I noticed that postProcess was never called. Looking inside beforeReady:

tabletop/src/tabletop.js

Lines 545 to 551 in 05163cf

beforeReady: function() {
if(this.postProcess) {
for (i = 0, ilen = this.elements.length; i < ilen; i++) {
this.postProcess(element);
}
}
},

The first thing is that this doesn't seem to have a postProcess attribute, though this.tabletop.postProcess exists. The following seems to work, though I feel like maybe I'm just using the library incorrectly:

    beforeReady: function() {
      if(this.tabletop.postProcess) {
        for (let i = 0, ilen = this.elements.length; i < ilen; i++) {
          this.tabletop.postProcess(this.elements[i]);
        }
      }
    },
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant