mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 09:28:11 +00:00
Fixed hack.
This commit is contained in:
1 parent
ea37a4c3d6
commit
829c4ea27b
1 file changed
+8
-17
+8
-17
@@ -36,9 +36,6 @@ export class Engine {
|
||||
|
||||
private selectionManager: SelectionManager;
|
||||
|
||||
// WIL need to fix this ui issue.
|
||||
public ranOnce: Boolean = false;
|
||||
|
||||
// signal reference
|
||||
constructor(canvasReference: HTMLDivElement) {
|
||||
console.log("Engine Created!");
|
||||
@@ -193,22 +190,16 @@ export class Engine {
|
||||
|
||||
uiEvents.aiStylize.onRequest(async (data) => {
|
||||
console.log("Engine heard AI Stylize request: ", data);
|
||||
//console.log(data);
|
||||
// Hack to ensure this doesn't break because UI BUG
|
||||
|
||||
if (this.ranOnce === true) {
|
||||
try {
|
||||
await this.renderEngine.startProcessing(data);
|
||||
} catch (error) {
|
||||
// throw error to retry
|
||||
uiAccess.dialogueError.show({
|
||||
title: "Generation Error",
|
||||
message: error.toString(),
|
||||
});
|
||||
}
|
||||
try {
|
||||
await this.renderEngine.startProcessing(data);
|
||||
} catch (error) {
|
||||
// throw error to retry
|
||||
uiAccess.dialogueError.show({
|
||||
title: "Generation Error",
|
||||
message: error.toString(),
|
||||
});
|
||||
}
|
||||
|
||||
this.ranOnce = true;
|
||||
});
|
||||
|
||||
// TODO: You may listen to all the image toolbar events here
|
||||
|
||||
Reference in new issue
Block a user