maxGraph/docs/api/classes/PrintPreview.html

135 lines
65 KiB
HTML

<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>PrintPreview | @maxgraph/core</title><meta name="description" content="Documentation for @maxgraph/core"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@maxgraph/core</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../index.html">@maxgraph/core</a></li><li><a href="PrintPreview.html">PrintPreview</a></li></ul><h1>Class PrintPreview</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">PrintPreview</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Constructors</h3><ul class="tsd-index-list"><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="PrintPreview.html#constructor" class="tsd-kind-icon">constructor</a></li></ul></section><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#autoOrigin" class="tsd-kind-icon">auto<wbr/>Origin</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#backgroundColor" class="tsd-kind-icon">background<wbr/>Color</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#border" class="tsd-kind-icon">border</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#borderColor" class="tsd-kind-icon">border<wbr/>Color</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#clipping" class="tsd-kind-icon">clipping</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#graph" class="tsd-kind-icon">graph</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#marginBottom" class="tsd-kind-icon">margin<wbr/>Bottom</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#marginTop" class="tsd-kind-icon">margin<wbr/>Top</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#pageCount" class="tsd-kind-icon">page<wbr/>Count</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#pageFormat" class="tsd-kind-icon">page<wbr/>Format</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#pageSelector" class="tsd-kind-icon">page<wbr/>Selector</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#printBackgroundImage" class="tsd-kind-icon">print<wbr/>Background<wbr/>Image</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#printControls" class="tsd-kind-icon">print<wbr/>Controls</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#printOverlays" class="tsd-kind-icon">print<wbr/>Overlays</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#scale" class="tsd-kind-icon">scale</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#targetWindow" class="tsd-kind-icon">target<wbr/>Window</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#title" class="tsd-kind-icon">title</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#wnd" class="tsd-kind-icon">wnd</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#x0" class="tsd-kind-icon">x0</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#y0" class="tsd-kind-icon">y0</a></li></ul></section><section class="tsd-index-section "><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#addGraphFragment" class="tsd-kind-icon">add<wbr/>Graph<wbr/>Fragment</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#addPageBreak" class="tsd-kind-icon">add<wbr/>Page<wbr/>Break</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#appendGraph" class="tsd-kind-icon">append<wbr/>Graph</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#close" class="tsd-kind-icon">close</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#closeDocument" class="tsd-kind-icon">close<wbr/>Document</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#createPageSelector" class="tsd-kind-icon">create<wbr/>Page<wbr/>Selector</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#getAppendices" class="tsd-kind-icon">get<wbr/>Appendices</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#getCoverPages" class="tsd-kind-icon">get<wbr/>Cover<wbr/>Pages</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#getDoctype" class="tsd-kind-icon">get<wbr/>Doctype</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#getLinkForCellState" class="tsd-kind-icon">get<wbr/>Link<wbr/>For<wbr/>Cell<wbr/>State</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#getRoot" class="tsd-kind-icon">get<wbr/>Root</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#getWindow" class="tsd-kind-icon">get<wbr/>Window</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#insertBackgroundImage" class="tsd-kind-icon">insert<wbr/>Background<wbr/>Image</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#open" class="tsd-kind-icon">open</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#print" class="tsd-kind-icon">print</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#renderPage" class="tsd-kind-icon">render<wbr/>Page</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#useCssTransforms" class="tsd-kind-icon">use<wbr/>Css<wbr/>Transforms</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#writeHead" class="tsd-kind-icon">write<wbr/>Head</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#writePostfix" class="tsd-kind-icon">write<wbr/>Postfix</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Constructors</h2><section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class"><a id="constructor" class="tsd-anchor"></a><h3>constructor</h3><ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">new <wbr/>Print<wbr/>Preview<span class="tsd-signature-symbol">(</span>graph<span class="tsd-signature-symbol">: </span><a href="Graph.html" class="tsd-signature-type" data-tsd-kind="Class">Graph</a>, scale<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span>, pageFormat<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Rectangle.html" class="tsd-signature-type" data-tsd-kind="Class">Rectangle</a>, border<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span>, x0<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, y0<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, borderColor<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span>, title<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span>, pageSelector<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="PrintPreview.html" class="tsd-signature-type" data-tsd-kind="Class">PrintPreview</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L166">view/other/PrintPreview.ts:166</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>graph: <a href="Graph.html" class="tsd-signature-type" data-tsd-kind="Class">Graph</a></h5></li><li><h5>scale: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = null</span></h5></li><li><h5>pageFormat: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Rectangle.html" class="tsd-signature-type" data-tsd-kind="Class">Rectangle</a><span class="tsd-signature-symbol"> = null</span></h5></li><li><h5>border: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = null</span></h5></li><li><h5>x0: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></h5></li><li><h5>y0: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></h5></li><li><h5>borderColor: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = null</span></h5></li><li><h5>title: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &#39;Printer-friendly version&#39;</span></h5></li><li><h5>pageSelector: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = null</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="PrintPreview.html" class="tsd-signature-type" data-tsd-kind="Class">PrintPreview</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="autoOrigin" class="tsd-anchor"></a><h3>auto<wbr/>Origin</h3><div class="tsd-signature tsd-kind-icon">auto<wbr/>Origin<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L240">view/other/PrintPreview.ts:240</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Specifies if the origin should be automatically computed based on the top,
left corner of the actual diagram contents. The required offset will be added
to <a href="PrintPreview.html#x0">x0</a> and <a href="PrintPreview.html#y0">y0</a> in <a href="PrintPreview.html#open">open</a>.</p>
</div><dl class="tsd-comment-tags"><dt>default</dt><dd><p>true</p>
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="backgroundColor" class="tsd-anchor"></a><h3>background<wbr/>Color</h3><div class="tsd-signature tsd-kind-icon">background<wbr/>Color<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &#39;#ffffff&#39;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L264">view/other/PrintPreview.ts:264</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Holds the color value for the page background color.</p>
</div><dl class="tsd-comment-tags"><dt>default</dt><dd><p>&#39;#ffffff&#39;</p>
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="border" class="tsd-anchor"></a><h3>border</h3><div class="tsd-signature tsd-kind-icon">border<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L210">view/other/PrintPreview.ts:210</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>The border inset around each side of every page in the preview. This is set
to 0 if autoOrigin is false.</p>
</div><dl class="tsd-comment-tags"><dt>default</dt><dd><p>0</p>
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="borderColor" class="tsd-anchor"></a><h3>border<wbr/>Color</h3><div class="tsd-signature tsd-kind-icon">border<wbr/>Color<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L269">view/other/PrintPreview.ts:269</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Holds the color value for the page border.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="clipping" class="tsd-anchor"></a><h3>clipping</h3><div class="tsd-signature tsd-kind-icon">clipping<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L304">view/other/PrintPreview.ts:304</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Specifies is clipping should be used to avoid creating too many cell states
in large diagrams. The bounding box of the cells in the original diagram is
used if this is enabled.</p>
</div><dl class="tsd-comment-tags"><dt>default</dt><dd><p>true</p>
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="graph" class="tsd-anchor"></a><h3>graph</h3><div class="tsd-signature tsd-kind-icon">graph<span class="tsd-signature-symbol">:</span> <a href="Graph.html" class="tsd-signature-type" data-tsd-kind="Class">Graph</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L193">view/other/PrintPreview.ts:193</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Reference to the <a href="PrintPreview.html#graph">graph</a> that should be previewed.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="marginBottom" class="tsd-anchor"></a><h3>margin<wbr/>Bottom</h3><div class="tsd-signature tsd-kind-icon">margin<wbr/>Bottom<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L222">view/other/PrintPreview.ts:222</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>The margin at the bottom of the page (number).</p>
</div><dl class="tsd-comment-tags"><dt>default</dt><dd><p>0</p>
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="marginTop" class="tsd-anchor"></a><h3>margin<wbr/>Top</h3><div class="tsd-signature tsd-kind-icon">margin<wbr/>Top<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L216">view/other/PrintPreview.ts:216</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>The margin at the top of the page (number).</p>
</div><dl class="tsd-comment-tags"><dt>default</dt><dd><p>0</p>
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="pageCount" class="tsd-anchor"></a><h3>page<wbr/>Count</h3><div class="tsd-signature tsd-kind-icon">page<wbr/>Count<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L296">view/other/PrintPreview.ts:296</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Holds the actual number of pages in the preview.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="pageFormat" class="tsd-anchor"></a><h3>page<wbr/>Format</h3><div class="tsd-signature tsd-kind-icon">page<wbr/>Format<span class="tsd-signature-symbol">:</span> <a href="Rectangle.html" class="tsd-signature-type" data-tsd-kind="Class">Rectangle</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L198">view/other/PrintPreview.ts:198</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Holds the <a href="Rectangle.html">Rectangle</a> that defines the page format.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="pageSelector" class="tsd-anchor"></a><h3>page<wbr/>Selector</h3><div class="tsd-signature tsd-kind-icon">page<wbr/>Selector<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L281">view/other/PrintPreview.ts:281</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Boolean that specifies if the page selector should be
displayed.</p>
</div><dl class="tsd-comment-tags"><dt>default</dt><dd><p>true</p>
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="printBackgroundImage" class="tsd-anchor"></a><h3>print<wbr/>Background<wbr/>Image</h3><div class="tsd-signature tsd-kind-icon">print<wbr/>Background<wbr/>Image<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L258">view/other/PrintPreview.ts:258</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Specifies if the background image should be printed.</p>
</div><dl class="tsd-comment-tags"><dt>default</dt><dd><p>false</p>
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="printControls" class="tsd-anchor"></a><h3>print<wbr/>Controls</h3><div class="tsd-signature tsd-kind-icon">print<wbr/>Controls<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L252">view/other/PrintPreview.ts:252</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Specifies if controls (such as folding icons) should be printed. Default is
false.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="printOverlays" class="tsd-anchor"></a><h3>print<wbr/>Overlays</h3><div class="tsd-signature tsd-kind-icon">print<wbr/>Overlays<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L246">view/other/PrintPreview.ts:246</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Specifies if overlays should be printed.</p>
</div><dl class="tsd-comment-tags"><dt>default</dt><dd><p>false</p>
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="scale" class="tsd-anchor"></a><h3>scale</h3><div class="tsd-signature tsd-kind-icon">scale<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L203">view/other/PrintPreview.ts:203</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Holds the scale of the print preview.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="targetWindow" class="tsd-anchor"></a><h3>target<wbr/>Window</h3><div class="tsd-signature tsd-kind-icon">target<wbr/>Window<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Window</span><span class="tsd-signature-symbol"> = null</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L291">view/other/PrintPreview.ts:291</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Assign any window here to redirect the rendering in <a href="PrintPreview.html#open">open</a>.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="title" class="tsd-anchor"></a><h3>title</h3><div class="tsd-signature tsd-kind-icon">title<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L274">view/other/PrintPreview.ts:274</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Holds the title of the preview window.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="wnd" class="tsd-anchor"></a><h3>wnd</h3><div class="tsd-signature tsd-kind-icon">wnd<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Window</span><span class="tsd-signature-symbol"> = null</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L286">view/other/PrintPreview.ts:286</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Reference to the preview window.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="x0" class="tsd-anchor"></a><h3>x0</h3><div class="tsd-signature tsd-kind-icon">x0<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L227">view/other/PrintPreview.ts:227</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Holds the horizontal offset of the output.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="y0" class="tsd-anchor"></a><h3>y0</h3><div class="tsd-signature tsd-kind-icon">y0<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L232">view/other/PrintPreview.ts:232</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Holds the vertical offset of the output.</p>
</div></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="addGraphFragment" class="tsd-anchor"></a><h3>add<wbr/>Graph<wbr/>Fragment</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">add<wbr/>Graph<wbr/>Fragment<span class="tsd-signature-symbol">(</span>dx<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, dy<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, scale<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, pageNumber<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, div<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HTMLDivElement</span>, clip<span class="tsd-signature-symbol">: </span><a href="Rectangle.html" class="tsd-signature-type" data-tsd-kind="Class">Rectangle</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L795">view/other/PrintPreview.ts:795</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Adds a graph fragment to the given div.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>dx: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Horizontal translation for the diagram.</p>
</div></div></li><li><h5>dy: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Vertical translation for the diagram.</p>
</div></div></li><li><h5>scale: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Scale for the diagram.</p>
</div></div></li><li><h5>pageNumber: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number of the page to be rendered.</p>
</div></div></li><li><h5>div: <span class="tsd-signature-type">HTMLDivElement</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Div that contains the output.</p>
</div></div></li><li><h5>clip: <a href="Rectangle.html" class="tsd-signature-type" data-tsd-kind="Class">Rectangle</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Contains the clipping rectangle as an <a href="Rectangle.html">Rectangle</a>.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="addPageBreak" class="tsd-anchor"></a><h3>add<wbr/>Page<wbr/>Break</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">add<wbr/>Page<wbr/>Break<span class="tsd-signature-symbol">(</span>doc<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Document</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L578">view/other/PrintPreview.ts:578</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Adds a page break to the given document.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>doc: <span class="tsd-signature-type">Document</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="appendGraph" class="tsd-anchor"></a><h3>append<wbr/>Graph</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">append<wbr/>Graph<span class="tsd-signature-symbol">(</span>graph<span class="tsd-signature-symbol">: </span><a href="Graph.html" class="tsd-signature-type" data-tsd-kind="Class">Graph</a>, scale<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, x0<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, y0<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, forcePageBreaks<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span>, keepOpen<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L330">view/other/PrintPreview.ts:330</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Adds the given graph to the existing print preview.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>graph: <a href="Graph.html" class="tsd-signature-type" data-tsd-kind="Class">Graph</a></h5></li><li><h5>scale: <span class="tsd-signature-type">number</span></h5></li><li><h5>x0: <span class="tsd-signature-type">number</span></h5></li><li><h5>y0: <span class="tsd-signature-type">number</span></h5></li><li><h5>forcePageBreaks: <span class="tsd-signature-type">boolean</span></h5></li><li><h5>keepOpen: <span class="tsd-signature-type">boolean</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="close" class="tsd-anchor"></a><h3>close</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">close<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L999">view/other/PrintPreview.ts:999</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Closes the print preview window.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="closeDocument" class="tsd-anchor"></a><h3>close<wbr/>Document</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">close<wbr/>Document<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L587">view/other/PrintPreview.ts:587</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Writes the closing tags for body and page after calling <a href="PrintPreview.html#writePostfix">writePostfix</a>.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="createPageSelector" class="tsd-anchor"></a><h3>create<wbr/>Page<wbr/>Selector</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">create<wbr/>Page<wbr/>Selector<span class="tsd-signature-symbol">(</span>vpages<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, hpages<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HTMLTableElement</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L654">view/other/PrintPreview.ts:654</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Creates the page selector table.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>vpages: <span class="tsd-signature-type">number</span></h5></li><li><h5>hpages: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">HTMLTableElement</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="getAppendices" class="tsd-anchor"></a><h3>get<wbr/>Appendices</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">get<wbr/>Appendices<span class="tsd-signature-symbol">(</span>width<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, height<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L979">view/other/PrintPreview.ts:979</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns the pages to be added after the print output. This returns null.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>width: <span class="tsd-signature-type">number</span></h5></li><li><h5>height: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="getCoverPages" class="tsd-anchor"></a><h3>get<wbr/>Cover<wbr/>Pages</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">get<wbr/>Cover<wbr/>Pages<span class="tsd-signature-symbol">(</span>width<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, height<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L972">view/other/PrintPreview.ts:972</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns the pages to be added before the print output. This returns null.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>width: <span class="tsd-signature-type">number</span></h5></li><li><h5>height: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="getDoctype" class="tsd-anchor"></a><h3>get<wbr/>Doctype</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">get<wbr/>Doctype<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L318">view/other/PrintPreview.ts:318</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns the string that should go before the HTML tag in the print preview
page. This implementation returns an X-UA meta tag for IE5 in quirks mode,
IE8 in IE8 standards mode and edge in IE9 standards mode.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="getLinkForCellState" class="tsd-anchor"></a><h3>get<wbr/>Link<wbr/>For<wbr/>Cell<wbr/>State</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">get<wbr/>Link<wbr/>For<wbr/>Cell<wbr/>State<span class="tsd-signature-symbol">(</span>state<span class="tsd-signature-symbol">: </span><a href="CellState.html" class="tsd-signature-type" data-tsd-kind="Class">CellState</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L946">view/other/PrintPreview.ts:946</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns the link for the given cell state. This returns null.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>state: <a href="CellState.html" class="tsd-signature-type" data-tsd-kind="Class">CellState</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="getRoot" class="tsd-anchor"></a><h3>get<wbr/>Root</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">get<wbr/>Root<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L768">view/other/PrintPreview.ts:768</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns the root cell for painting the graph.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="getWindow" class="tsd-anchor"></a><h3>get<wbr/>Window</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">get<wbr/>Window<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Window</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L309">view/other/PrintPreview.ts:309</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns <a href="PrintPreview.html#wnd">wnd</a>.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Window</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="insertBackgroundImage" class="tsd-anchor"></a><h3>insert<wbr/>Background<wbr/>Image</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">insert<wbr/>Background<wbr/>Image<span class="tsd-signature-symbol">(</span>div<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HTMLDivElement</span>, dx<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, dy<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L953">view/other/PrintPreview.ts:953</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Inserts the background image into the given div.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>div: <span class="tsd-signature-type">HTMLDivElement</span></h5></li><li><h5>dx: <span class="tsd-signature-type">number</span></h5></li><li><h5>dy: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="open" class="tsd-anchor"></a><h3>open</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">open<span class="tsd-signature-symbol">(</span>css<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span>, targetWindow<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Window</span>, forcePageBreaks<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span>, keepOpen<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Window</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L346">view/other/PrintPreview.ts:346</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Shows the print preview window. The window is created here if it does
not exist.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>css: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = null</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Optional CSS string to be used in the head section.</p>
</div></div></li><li><h5>targetWindow: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Window</span><span class="tsd-signature-symbol"> = null</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Optional window that should be used for rendering. If
this is specified then no HEAD tag, CSS and BODY tag will be written.</p>
</div></div></li><li><h5>forcePageBreaks: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></h5></li><li><h5>keepOpen: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Window</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="print" class="tsd-anchor"></a><h3>print</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">print<span class="tsd-signature-symbol">(</span>css<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L988">view/other/PrintPreview.ts:988</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Opens the print preview and shows the print dialog.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> css: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Optional CSS string to be used in the head section.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="renderPage" class="tsd-anchor"></a><h3>render<wbr/>Page</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">render<wbr/>Page<span class="tsd-signature-symbol">(</span>w<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, h<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, dx<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, dy<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, content<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>div<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HTMLDivElement</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span>, pageNumber<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HTMLDivElement</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L703">view/other/PrintPreview.ts:703</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Creates a DIV that prints a single page of the given
graph using the given scale and returns the DIV that
represents the page.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>w: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Width of the page in pixels.</p>
</div></div></li><li><h5>h: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Height of the page in pixels.</p>
</div></div></li><li><h5>dx: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Optional horizontal page offset in pixels (used internally).</p>
</div></div></li><li><h5>dy: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Optional vertical page offset in pixels (used internally).</p>
</div></div></li><li><h5>content: <span class="tsd-signature-symbol">(</span>div<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HTMLDivElement</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Callback that adds the HTML content to the inner div of a page.
Takes the inner div as the argument.</p>
</div></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>div<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HTMLDivElement</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>div: <span class="tsd-signature-type">HTMLDivElement</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> pageNumber: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Integer representing the page number.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">HTMLDivElement</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="useCssTransforms" class="tsd-anchor"></a><h3>use<wbr/>Css<wbr/>Transforms</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">use<wbr/>Css<wbr/>Transforms<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L781">view/other/PrintPreview.ts:781</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns true if CSS transforms should be used for scaling content.
This returns true if foreignObject is supported and we&#39;re not in Safari
as it has clipping bugs for transformed CSS content with foreignObjects.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="writeHead" class="tsd-anchor"></a><h3>write<wbr/>Head</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">write<wbr/>Head<span class="tsd-signature-symbol">(</span>doc<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Document</span>, css<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L609">view/other/PrintPreview.ts:609</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Writes the HEAD section into the given document, without the opening
and closing HEAD tags.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>doc: <span class="tsd-signature-type">Document</span></h5></li><li><h5>css: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="writePostfix" class="tsd-anchor"></a><h3>write<wbr/>Postfix</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">write<wbr/>Postfix<span class="tsd-signature-symbol">(</span>doc<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Document</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/PrintPreview.ts#L647">view/other/PrintPreview.ts:647</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Called before closing the body of the page. This implementation is empty.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>doc: <span class="tsd-signature-type">Document</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../index.html">Exports</a></li><li class=" tsd-kind-namespace"><a href="../modules/DomHelpers.html">Dom<wbr/>Helpers</a></li><li class=" tsd-kind-namespace"><a href="../modules/cloneUtils.html">clone<wbr/>Utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/constants.html">constants</a></li><li class=" tsd-kind-namespace"><a href="../modules/domUtils.html">dom<wbr/>Utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/eventUtils.html">event<wbr/>Utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/gestureUtils.html">gesture<wbr/>Utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/mathUtils.html">math<wbr/>Utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/stringUtils.html">string<wbr/>Utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/styleUtils.html">style<wbr/>Utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/utils.html">utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/xmlUtils.html">xml<wbr/>Utils</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-class"><a href="PrintPreview.html" class="tsd-kind-icon">Print<wbr/>Preview</a><ul><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="PrintPreview.html#constructor" class="tsd-kind-icon">constructor</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#autoOrigin" class="tsd-kind-icon">auto<wbr/>Origin</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#backgroundColor" class="tsd-kind-icon">background<wbr/>Color</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#border" class="tsd-kind-icon">border</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#borderColor" class="tsd-kind-icon">border<wbr/>Color</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#clipping" class="tsd-kind-icon">clipping</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#graph" class="tsd-kind-icon">graph</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#marginBottom" class="tsd-kind-icon">margin<wbr/>Bottom</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#marginTop" class="tsd-kind-icon">margin<wbr/>Top</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#pageCount" class="tsd-kind-icon">page<wbr/>Count</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#pageFormat" class="tsd-kind-icon">page<wbr/>Format</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#pageSelector" class="tsd-kind-icon">page<wbr/>Selector</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#printBackgroundImage" class="tsd-kind-icon">print<wbr/>Background<wbr/>Image</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#printControls" class="tsd-kind-icon">print<wbr/>Controls</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#printOverlays" class="tsd-kind-icon">print<wbr/>Overlays</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#scale" class="tsd-kind-icon">scale</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#targetWindow" class="tsd-kind-icon">target<wbr/>Window</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#title" class="tsd-kind-icon">title</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#wnd" class="tsd-kind-icon">wnd</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#x0" class="tsd-kind-icon">x0</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="PrintPreview.html#y0" class="tsd-kind-icon">y0</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#addGraphFragment" class="tsd-kind-icon">add<wbr/>Graph<wbr/>Fragment</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#addPageBreak" class="tsd-kind-icon">add<wbr/>Page<wbr/>Break</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#appendGraph" class="tsd-kind-icon">append<wbr/>Graph</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#close" class="tsd-kind-icon">close</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#closeDocument" class="tsd-kind-icon">close<wbr/>Document</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#createPageSelector" class="tsd-kind-icon">create<wbr/>Page<wbr/>Selector</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#getAppendices" class="tsd-kind-icon">get<wbr/>Appendices</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#getCoverPages" class="tsd-kind-icon">get<wbr/>Cover<wbr/>Pages</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#getDoctype" class="tsd-kind-icon">get<wbr/>Doctype</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#getLinkForCellState" class="tsd-kind-icon">get<wbr/>Link<wbr/>For<wbr/>Cell<wbr/>State</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#getRoot" class="tsd-kind-icon">get<wbr/>Root</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#getWindow" class="tsd-kind-icon">get<wbr/>Window</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#insertBackgroundImage" class="tsd-kind-icon">insert<wbr/>Background<wbr/>Image</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#open" class="tsd-kind-icon">open</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#print" class="tsd-kind-icon">print</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#renderPage" class="tsd-kind-icon">render<wbr/>Page</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#useCssTransforms" class="tsd-kind-icon">use<wbr/>Css<wbr/>Transforms</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#writeHead" class="tsd-kind-icon">write<wbr/>Head</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="PrintPreview.html#writePostfix" class="tsd-kind-icon">write<wbr/>Postfix</a></li></ul></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li><li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li><li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited accessor</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html>