Commit bf266113 authored by Fred Chasen's avatar Fred Chasen

Emit size event from Previewer

parent 780982f6
......@@ -114,6 +114,8 @@ afterRendered(pages)
// Polisher
beforeTreeParse(text, sheet)
beforeTreeWalk(ast)
afterTreeWalk(ast, sheet)
onUrl(urlNode)
onAtPage(atPageNode)
onRule(ruleNode)
......@@ -204,11 +206,11 @@ The tests and specs can be run within the container by passing a `seccomp` file
docker run -it --security-opt 'seccomp=seccomp.json' pagedmedia/pagedjs npm test
```
## Contributors
## Contributors
### Core team
The core team behind paged.js includes [Adam Hyde](https://adamhyde.net), [Julie Blanc](http://julie-blanc.fr/), [Fred Chasen](http://fchasen.com/) & Julien Taquet.
## Licence
MIT License (MIT), which you can read [here](https://gitlab.pagedmedia.org/tools/pagedjs/blob/master/LICENSE.md)
\ No newline at end of file
MIT License (MIT), which you can read [here](https://gitlab.pagedmedia.org/tools/pagedjs/blob/master/LICENSE.md)
......@@ -52,6 +52,7 @@ class Previewer {
handlers.on("size", (size) => {
this.size = size;
this.emit("size", size);
});
return handlers;
......@@ -125,7 +126,7 @@ class Previewer {
this.polisher.setup();
let handlers = this.initializeHandlers();
this.handlers = this.initializeHandlers();
let styleText = await this.polisher.add(...stylesheets);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment