Add ability to import multiple mural

This commit is contained in:
2025-02-11 22:40:17 +01:00
parent 909188ba7a
commit 49f1cf008b
3 changed files with 80 additions and 60 deletions
+3 -3
View File
@@ -7,7 +7,7 @@ import { Store } from "../../lib/store";
import { MuralList } from "./muralList";
import { Coordinates, CordType } from "../../lib/coordinates";
import { Palette } from "../../lib/palette";
import { importArtWork } from "../importMural";
import { importArtWorks } from "../importMural";
import { Popup } from "./Popup";
import { Storage } from "../../lib/storage";
import { takeCanvasShot } from "../../lib/canvashot";
@@ -106,8 +106,8 @@ export class Menu extends React.Component<Props, State> {
import = async () => {
try {
const mural = await importArtWork(this.props.store, this.props.cords, this.props.palette);
if (mural) {
const murals = await importArtWorks(this.props.store, this.props.cords, this.props.palette);
for (const mural of murals) {
this.props.store.add(mural);
}
} catch (error) {
-1
View File
@@ -14,7 +14,6 @@ import { BIN_FORMATS } from "../importMural";
import saveAs from "file-saver";
import { Popup } from "./Popup";
import { Palette } from "../../lib/palette";
import { Mural } from "../../lib/mural";
const Margin = styled.div`
margin: 2px;