c744ed64dc
Signed-off-by: Dennis Francis <dennis.francis@collabora.com> Change-Id: I5f31276c3570d2ab02a2820848cb2393dfb0b760
23 lines
673 B
TypeScript
23 lines
673 B
TypeScript
/// <reference path="../../src/layer/tile/CanvasSectionContainer.ts" />
|
|
|
|
function canvasDomString() {
|
|
return `
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head></head>
|
|
<body>
|
|
<div id="canvas-container">
|
|
<canvas id="document-canvas"></canvas>
|
|
</div>
|
|
</body>
|
|
</html>`;
|
|
}
|
|
|
|
function setupCanvasContainer(width: number, height: number): CanvasSectionContainer {
|
|
const canvas = <HTMLCanvasElement>document.getElementById('document-canvas');
|
|
|
|
const sectionContainer = new CanvasSectionContainer(canvas, true /* disableDrawing? */);
|
|
sectionContainer.onResize(width, height); // Set canvas size.
|
|
|
|
return sectionContainer;
|
|
}
|