Skip to content

Commit

Permalink
Showcase canvas-demo with a realistic page fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
Alhadis committed Jul 18, 2019
1 parent 2f3917f commit efb5ca0
Show file tree
Hide file tree
Showing 4 changed files with 5,497 additions and 4 deletions.
10 changes: 8 additions & 2 deletions test/demos/canvas/demo.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,18 @@ body{
position: relative;
margin: 1em;
width: calc(100% - 2em);
max-width: 640px;
height: 500px;
height: 100vh;
}
.troff-canvas-pages{
padding: 1em;
}
.troff-canvas-page{
margin-bottom: 1em;
}

@media (max-width: 40em){
#chalkboard{
max-width: 640px;
height: 500px;
}
}
2 changes: 1 addition & 1 deletion test/demos/canvas/esm.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

// Load ditroff source from file, then render it
const dirname = import.meta.url.replace(/^file:\/\/|[/\\][^/\\]+$/gi, "");
view.loadFile(dirname + "/../../fixtures/text/pdf-large.out");
view.loadFile(dirname + "/../../fixtures/pdf/grep.1.out").then(() => view.spreadSize = 2);
</script>
</body>
</html>
2 changes: 1 addition & 1 deletion test/demos/canvas/umd.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
});

const dirname = document.location.toString().replace(/^file:\/\/|[/\\][^/\\]+$/gi, "");
view.loadFile(dirname + "/../../fixtures/text/pdf-large.out");
view.loadFile(dirname + "/../../fixtures/pdf/grep.1.out").then(() => view.spreadSize = 2);
</script>
</body>
</html>

0 comments on commit efb5ca0

Please sign in to comment.