From da0e40121916966187894d69a6c6d2327511cbc9 Mon Sep 17 00:00:00 2001 From: Ivan Goethals Date: Fri, 1 Nov 2024 15:21:53 +0100 Subject: [PATCH] Zeer beperkte aanpassing aan print.ts (functie uit een andere functie gehaald, anders wil de online versie niet werken). --- builddate.js | 2 +- eendraadschema.js | 26 +++++++++++++------------- src/print/print.ts | 34 +++++++++++++++++----------------- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/builddate.js b/builddate.js index 8a87a7c..0fef139 100644 --- a/builddate.js +++ b/builddate.js @@ -1 +1 @@ -var CONF_builddate="20241101-151709" +var CONF_builddate="20241101-152135" diff --git a/eendraadschema.js b/eendraadschema.js index 223d95e..8af1d04 100644 --- a/eendraadschema.js +++ b/eendraadschema.js @@ -781,6 +781,19 @@ function dosvgdownload() { var filename = document.getElementById("dosvgname").value; download_by_blob(prtContent, filename, 'data:image/svg+xml;charset=utf-8'); //Was text/plain } +function getPrintSVGWithoutAddress(outSVG, page) { + if (page === void 0) { page = structure.print_table.displaypage; } + var scale = 1; + var startx = structure.print_table.pages[page].start; + var width = structure.print_table.pages[page].stop - startx; + var starty = structure.print_table.getstarty(); + var height = structure.print_table.getstopy() - starty; + var viewbox = '' + startx + ' ' + starty + ' ' + width + ' ' + height; + var outstr = '' + + flattenSVGfromString(outSVG.data) + ''; + return (outstr); +} function printsvg() { function generatePdf() { if (typeof (structure.properties.dpi) == 'undefined') @@ -791,19 +804,6 @@ function printsvg() { document.getElementById("progress_pdf") //HTML element where callback status can be given ); } - function getPrintSVGWithoutAddress(outSVG, page) { - if (page === void 0) { page = structure.print_table.displaypage; } - var scale = 1; - var startx = structure.print_table.pages[page].start; - var width = structure.print_table.pages[page].stop - startx; - var starty = structure.print_table.getstarty(); - var height = structure.print_table.getstopy() - starty; - var viewbox = '' + startx + ' ' + starty + ' ' + width + ' ' + height; - var outstr = '' + - flattenSVGfromString(outSVG.data) + ''; - return (outstr); - } function renderPrintSVG(outSVG) { document.getElementById("printarea").innerHTML = '
' + getPrintSVGWithoutAddress(outSVG) + diff --git a/src/print/print.ts b/src/print/print.ts index bf4bda5..6fb1c1c 100644 --- a/src/print/print.ts +++ b/src/print/print.ts @@ -9,6 +9,23 @@ function dosvgdownload() { download_by_blob(prtContent, filename, 'data:image/svg+xml;charset=utf-8'); //Was text/plain } +function getPrintSVGWithoutAddress(outSVG: SVGelement, page:number = structure.print_table.displaypage) { + var scale = 1; + + var startx = structure.print_table.pages[page].start; + var width = structure.print_table.pages[page].stop - startx; + var starty = structure.print_table.getstarty(); + var height = structure.print_table.getstopy() - starty; + + var viewbox = '' + startx + ' ' + starty + ' ' + width + ' ' + height; + + var outstr = '' + + flattenSVGfromString(outSVG.data) + ''; + + return(outstr); +} + function printsvg() { function generatePdf() { @@ -27,23 +44,6 @@ function printsvg() { ); } - function getPrintSVGWithoutAddress(outSVG: SVGelement, page:number = structure.print_table.displaypage) { - var scale = 1; - - var startx = structure.print_table.pages[page].start; - var width = structure.print_table.pages[page].stop - startx; - var starty = structure.print_table.getstarty(); - var height = structure.print_table.getstopy() - starty; - - var viewbox = '' + startx + ' ' + starty + ' ' + width + ' ' + height; - - var outstr = '' + - flattenSVGfromString(outSVG.data) + ''; - - return(outstr); - } - function renderPrintSVG(outSVG: SVGelement) { document.getElementById("printarea").innerHTML = '
' + getPrintSVGWithoutAddress(outSVG) +