Skip to content

Commit

Permalink
Zeer beperkte aanpassing aan print.ts (functie uit een andere functie…
Browse files Browse the repository at this point in the history
… gehaald, anders wil de online versie niet werken).
  • Loading branch information
igoethal committed Nov 1, 2024
1 parent 6446277 commit 38f9ed7
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 32 deletions.
2 changes: 1 addition & 1 deletion builddate.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
var CONF_builddate="20241101-150942"
var CONF_builddate="20241101-151709"
26 changes: 13 additions & 13 deletions eendraadschema.js
Original file line number Diff line number Diff line change
Expand Up @@ -791,20 +791,20 @@ 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 = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" transform="scale(1,1)" style="border:1px solid white" ' +
'height="' + (height * scale) + '" width="' + (width * scale) + '" viewBox="' + viewbox + '">' +
flattenSVGfromString(outSVG.data) + '</svg>';
return (outstr);
}
function renderPrintSVG(outSVG) {
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 = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" transform="scale(1,1)" style="border:1px solid white" ' +
'height="' + (height * scale) + '" width="' + (width * scale) + '" viewBox="' + viewbox + '">' +
flattenSVGfromString(outSVG.data) + '</svg>';
return (outstr);
}
document.getElementById("printarea").innerHTML = '<div id="printsvgarea">' +
getPrintSVGWithoutAddress(outSVG) +
'</div>';
Expand Down
35 changes: 17 additions & 18 deletions src/print/print.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,24 @@ function printsvg() {
);
}

function renderPrintSVG(outSVG: SVGelement) {

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 = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" transform="scale(1,1)" style="border:1px solid white" ' +
'height="' + (height*scale) + '" width="' + (width*scale) + '" viewBox="' + viewbox + '">' +
flattenSVGfromString(outSVG.data) + '</svg>';

return(outstr);
}
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 = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" transform="scale(1,1)" style="border:1px solid white" ' +
'height="' + (height*scale) + '" width="' + (width*scale) + '" viewBox="' + viewbox + '">' +
flattenSVGfromString(outSVG.data) + '</svg>';

return(outstr);
}

function renderPrintSVG(outSVG: SVGelement) {
document.getElementById("printarea").innerHTML = '<div id="printsvgarea">' +
getPrintSVGWithoutAddress(outSVG) +
'</div>';
Expand Down

0 comments on commit 38f9ed7

Please sign in to comment.