Many fixes -- especially and endorserServer

This commit is contained in:
Matthew Raymer
2023-09-03 21:08:30 +08:00
parent b514d64068
commit 5501ac1a2f
17 changed files with 315 additions and 285 deletions

View File

@@ -39,7 +39,7 @@
<script lang="ts">
import { SVGRenderer } from "three/addons/renderers/SVGRenderer.js";
import { Component, Vue } from "vue-facing-decorator";
import { World } from "components/World/World.js";
import { World } from "@/components/World/World.js";
import QuickNav from "@/components/QuickNav.vue";
interface RendererSVGType {
@@ -50,8 +50,17 @@ interface Dictionary<T> {
[key: string]: T;
}
interface Notification {
group: string;
type: string;
title: string;
text: string;
}
@Component({ components: { World, QuickNav } })
export default class StatisticsView extends Vue {
$notify!: (notification: Notification, timeout?: number) => void;
world: World;
worldProperties: Dictionary<number> = {};
@@ -61,9 +70,9 @@ export default class StatisticsView extends Vue {
const newWorld = new World(container, this);
newWorld.start();
this.world = newWorld;
} catch (err : unknown) {
} catch (err: unknown) {
const error = err as Error;
(this as any).$notify(
this.$notify(
{
group: "alert",
type: "danger",
@@ -91,7 +100,6 @@ export default class StatisticsView extends Vue {
}
}
function ExportToSVG(rendererSVG: RendererSVGType, filename: string) {
const XMLS = new XMLSerializer();
const svgfile = XMLS.serializeToString(rendererSVG.domElement);