Fix MCM detection: use el.id (not el.name which has s_str_ prefix)
elName was s_str_MCM09 which didn't match /^MCM/ regex, so MCM fell through to default branch getting bindings on all elements. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
cdd8d7da42
commit
4052d6564b
@ -303,7 +303,7 @@ function generateElementBindings(elements: SvgElement[]): Record<string, any> {
|
||||
if (!el.tagpaths || el.tagpaths.length === 0) continue;
|
||||
|
||||
const prefix = `props.elements[${n}]`;
|
||||
const elName = el.name || el.id || '';
|
||||
const elName = el.id || el.name || '';
|
||||
|
||||
const isStartStop = /_SS\d+/i.test(elName);
|
||||
|
||||
@ -315,7 +315,7 @@ function generateElementBindings(elements: SvgElement[]): Record<string, any> {
|
||||
// Sub-element fill bindings — varies by device type
|
||||
const isButton = /_(?:JR|S|SS|EN)\d/i.test(elName);
|
||||
const isDpm = /_DPM\d*/i.test(elName);
|
||||
const isMcm = /^MCM\d*/i.test(elName);
|
||||
const isMcm = /^MCM\d*$/i.test(elName);
|
||||
const isEpc = /_EPC\d*/i.test(elName);
|
||||
|
||||
if (el.elements && el.elements.length > 0) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user