fix: lazy load 3d view
This commit is contained in:
parent
e4b3cce517
commit
738f814ecb
@ -7,7 +7,6 @@
|
||||
imageToArray,
|
||||
} from "helpers";
|
||||
import { images as imageStore } from "stores";
|
||||
import OrbView from "./OrbView";
|
||||
import { onMount } from "svelte";
|
||||
import Toast from "components/Toast";
|
||||
import { throttle } from "lodash";
|
||||
@ -263,11 +262,14 @@
|
||||
polygonPoints.length === 2 ? cx1.stroke() : cx1.fill();
|
||||
}
|
||||
|
||||
function switchViewMode(e: MouseEvent) {
|
||||
let OrbView;
|
||||
async function switchViewMode(e: MouseEvent) {
|
||||
e.stopPropagation();
|
||||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
|
||||
if (!OrbView) OrbView = (await import("./OrbView")).default;
|
||||
|
||||
mode = mode === "2d" ? "3d" : "2d";
|
||||
|
||||
if (mode === "3d") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user