Skip to content

Commit 8cbaafe

Browse files
committed
automatically import
1 parent 7d0f46e commit 8cbaafe

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

app/components/import/state.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,14 @@ class ImportState {
8181
img.src = this.path;
8282

8383
} else if (this.rotCanvas) {
84-
console.log(this.rotCanvas);
8584
this.ctx.drawImage(this.rotCanvas, 0, 0);
8685
delete this.rotCanvas;
87-
requestAnimationFrame(this.loaded);
86+
requestAnimationFrame(() => {
87+
this.loaded();
88+
importState.getBBoxes();
89+
importState.importSprites();
90+
importState.importAll();
91+
});
8892
}
8993
};
9094

app/components/mappings/rotate.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export const Rotate = observer(() => {
4646
function reImport() {
4747
importState.rotCanvas = canvasRef.current;
4848
importState.config.active = true;
49+
mappingState.rotate.active = false;
4950
}
5051

5152
return (

0 commit comments

Comments
 (0)