fix: only show port label prompt inside component editor
Double-click rename for INPUT/OUTPUT/CLOCK gates now only triggers when inside the component editor, not in the main circuit. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -159,8 +159,8 @@ export function initEvents() {
|
||||
return;
|
||||
}
|
||||
|
||||
// Double-click on I/O gates → rename
|
||||
if (gate.type === 'INPUT' || gate.type === 'OUTPUT' || gate.type === 'CLOCK') {
|
||||
// Double-click on I/O gates → rename (only inside component editor)
|
||||
if (state.componentEditorActive && (gate.type === 'INPUT' || gate.type === 'OUTPUT' || gate.type === 'CLOCK')) {
|
||||
const current = gate.label || '';
|
||||
const label = prompt(`Label for ${gate.type}#${gate.id}:`, current);
|
||||
if (label !== null) {
|
||||
|
||||
Reference in New Issue
Block a user