fix(canvas): persistent drawing tools + online/offline label + drag fixes
Drawing/shape tools (pencil, line, rect, circle) now stay active for multiple strokes instead of resetting to selector after each use. Renamed collab overlay badge from "Solo/Share" to "Offline/Online". Prevent canvas drag when interacting with image-gen and prompt content. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
8649598c26
commit
afd2a5a40b
|
|
@ -314,7 +314,8 @@ export class FolkImageGen extends FolkShape {
|
|||
}
|
||||
});
|
||||
|
||||
// Prevent drag on input
|
||||
// Prevent canvas drag when interacting with content
|
||||
this.#imageArea?.addEventListener("pointerdown", (e) => e.stopPropagation());
|
||||
this.#promptInput?.addEventListener("pointerdown", (e) => e.stopPropagation());
|
||||
|
||||
// Close button
|
||||
|
|
|
|||
|
|
@ -539,7 +539,8 @@ export class FolkPrompt extends FolkShape {
|
|||
this.#clearChat();
|
||||
});
|
||||
|
||||
// Prevent drag on inputs
|
||||
// Prevent canvas drag when interacting with chat content
|
||||
this.#messagesEl?.addEventListener("pointerdown", (e) => e.stopPropagation());
|
||||
this.#promptInput?.addEventListener("pointerdown", (e) => e.stopPropagation());
|
||||
|
||||
// Voice dictation
|
||||
|
|
|
|||
|
|
@ -331,9 +331,9 @@ export class RStackCollabOverlay extends HTMLElement {
|
|||
if (!badge) return;
|
||||
|
||||
if (this.#soloMode) {
|
||||
badge.innerHTML = `<span class="count solo">\u{1F464} Solo</span>`;
|
||||
badge.innerHTML = `<span class="count solo">\u{1F4F4} Offline</span>`;
|
||||
badge.classList.add('visible', 'solo');
|
||||
badge.title = 'Solo mode \u2014 your presence is hidden. Click to go collaborative.';
|
||||
badge.title = 'Offline \u2014 your presence is hidden. Click to go online.';
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -351,7 +351,7 @@ export class RStackCollabOverlay extends HTMLElement {
|
|||
<span class="count">\u{1F465} ${count} online</span>
|
||||
`;
|
||||
badge.classList.add('visible');
|
||||
badge.title = 'Collaborative \u2014 sharing your presence. Click for solo mode.';
|
||||
badge.title = 'Online \u2014 sharing your presence. Click to go offline.';
|
||||
}
|
||||
|
||||
#renderCursors() {
|
||||
|
|
|
|||
|
|
@ -5625,11 +5625,6 @@ Use real coordinates, YYYY-MM-DD dates, ISO currency codes. Ask clarifying quest
|
|||
|
||||
wbPreviewEl = null;
|
||||
wbCurrentPath = [];
|
||||
|
||||
// Drawing tools are temporary — return to selector after one stroke
|
||||
if (wbTool && wbTool !== "eraser") {
|
||||
setWbTool(null);
|
||||
}
|
||||
});
|
||||
|
||||
// Eraser click fallback for old SVG overlay elements
|
||||
|
|
|
|||
Loading…
Reference in New Issue