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)
......
......@@ -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