mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-05 09:48:44 +00:00
Fix painting bug, Now need to fix layer preview bug so it always stays on top.
This commit is contained in:
1 parent
0eaf98f065
commit
fcd6c4cbcd
2 files changed
+6
-4
No files matched your search
@@ -466,12 +466,12 @@ export class Engine {
|
||||
|
||||
uiEvents.promptEvents.onPromptStrengthChanged(async (strength) => {
|
||||
this.realTimeDrawEngine.currentStrength = strength / 100.0;
|
||||
this.realTimeDrawEngine.render();
|
||||
// this.realTimeDrawEngine.render();
|
||||
});
|
||||
|
||||
uiEvents.promptEvents.onPromptTextChanged(async (prompt) => {
|
||||
this.realTimeDrawEngine.currentPrompt = prompt;
|
||||
this.realTimeDrawEngine.render();
|
||||
// this.realTimeDrawEngine.render();
|
||||
});
|
||||
|
||||
uiEvents.onAddShapeToEngine((shapeData) => {
|
||||
@@ -681,7 +681,7 @@ export class Engine {
|
||||
await this.realTimeDrawEngine.render();
|
||||
},
|
||||
});
|
||||
imageNode.kNode.zIndex(1);
|
||||
|
||||
this.commandManager.createNode(imageNode);
|
||||
}
|
||||
public addPaintNode(
|
||||
|
||||
@@ -138,6 +138,7 @@ export class RealTimeDrawEngine {
|
||||
this.drawingsLayer = new Konva.Layer({
|
||||
clearBeforeDraw: true, // Ensures transparent background
|
||||
});
|
||||
|
||||
this.mediaLayerRef.getStage()?.add(this.drawingsLayer); // to od pass in stage
|
||||
|
||||
// Set background layer to red and media layer to green for visibility
|
||||
@@ -270,7 +271,7 @@ export class RealTimeDrawEngine {
|
||||
y: this.captureCanvas.y(),
|
||||
draggable: false,
|
||||
});
|
||||
|
||||
this.drawingsLayer.moveToTop();
|
||||
this.drawingsLayer.add(currentLine); // Add to drawingsLayer
|
||||
isDrawing = true;
|
||||
};
|
||||
@@ -407,6 +408,7 @@ export class RealTimeDrawEngine {
|
||||
this.enableDragging();
|
||||
if (this.cleanupFunction) {
|
||||
this.cleanupFunction();
|
||||
this.cleanupFunction = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user