forked from MapComplete/MapComplete
Refactoring: remove import flow, fix various issues, get PDF-export working (but not quite)
This commit is contained in:
parent
2149fc1a1d
commit
f7eaec2243
36 changed files with 739 additions and 3930 deletions
15
test.ts
15
test.ts
|
@ -5,12 +5,14 @@ import Combine from "./UI/Base/Combine"
|
|||
import SpecialVisualizations from "./UI/SpecialVisualizations"
|
||||
import InputHelpers from "./UI/InputElement/InputHelpers"
|
||||
import BaseUIElement from "./UI/BaseUIElement"
|
||||
import { ImmutableStore, UIEventSource } from "./Logic/UIEventSource"
|
||||
import { UIEventSource } from "./Logic/UIEventSource"
|
||||
import { VariableUiElement } from "./UI/Base/VariableUIElement"
|
||||
import { FixedUiElement } from "./UI/Base/FixedUiElement"
|
||||
import Title from "./UI/Base/Title"
|
||||
import SvelteUIElement from "./UI/Base/SvelteUIElement"
|
||||
import ValidatedInput from "./UI/InputElement/ValidatedInput.svelte"
|
||||
import { SvgToPdf } from "./Utils/svgToPdf"
|
||||
import { Utils } from "./Utils"
|
||||
|
||||
function testspecial() {
|
||||
const layout = new LayoutConfig(<any>theme, true) // qp.data === "" ? : new AllKnownLayoutsLazy().get(qp.data)
|
||||
|
@ -47,6 +49,17 @@ function testinput() {
|
|||
new Combine(els).SetClass("flex flex-col").AttachTo("maindiv")
|
||||
}
|
||||
|
||||
async function testPdf() {
|
||||
const svgs = await Promise.all(
|
||||
SvgToPdf.templates["flyer_a4"].pages.map((url) => Utils.download(url))
|
||||
)
|
||||
console.log("Building svg")
|
||||
const pdf = new SvgToPdf("Test", svgs, {})
|
||||
new VariableUiElement(pdf.status).AttachTo("maindiv")
|
||||
await pdf.ConvertSvg("nl")
|
||||
}
|
||||
|
||||
testPdf().then((_) => console.log("All done"))
|
||||
//testinput()
|
||||
/*/
|
||||
testspecial()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue