Fixing check for field that was removed

This commit is contained in:
Dan 2026-01-09 13:27:32 +00:00
parent 7b74e5e997
commit c82cfa1d23
5 changed files with 5 additions and 8 deletions

View file

@ -7,7 +7,6 @@ export function debugControlValues(generator) {
// Text controls // Text controls
console.log('Text controls:'); console.log('Text controls:');
console.log(' button-text:', values['button-text']); console.log(' button-text:', values['button-text']);
console.log(' text-enabled:', values['text-enabled']);
console.log(' font-size:', values['font-size']); console.log(' font-size:', values['font-size']);
console.log(' text-x:', values['text-x']); console.log(' text-x:', values['text-x']);
console.log(' text-y:', values['text-y']); console.log(' text-y:', values['text-y']);

View file

@ -54,8 +54,7 @@ export class RainbowTextEffect extends ButtonEffect {
// Get text configuration // Get text configuration
const text = controlValues[`button-text${suffix}`] || ''; const text = controlValues[`button-text${suffix}`] || '';
const enabled = controlValues[`text${suffix}-enabled`]; if (!text || text.trim() === '') return;
if (!text || !enabled) return;
// Check if wave is also enabled - if so, skip (wave will handle rainbow) // Check if wave is also enabled - if so, skip (wave will handle rainbow)
if (controlValues[`animate-text-wave${suffix}`]) return; if (controlValues[`animate-text-wave${suffix}`]) return;

View file

@ -63,7 +63,7 @@ export class SpinTextEffect extends ButtonEffect {
const suffix = this.textLineNumber === 1 ? "" : "2"; const suffix = this.textLineNumber === 1 ? "" : "2";
const text = controlValues[`button-text${suffix}`] || ""; const text = controlValues[`button-text${suffix}`] || "";
if (!text || !controlValues[`text${suffix}-enabled`]) return; if (!text || text.trim() === '') return;
if (!animState) return; if (!animState) return;
const speed = controlValues[`spin-speed${suffix}`] || 1; const speed = controlValues[`spin-speed${suffix}`] || 1;

View file

@ -90,9 +90,9 @@ export class TextShadowEffect extends ButtonEffect {
isEnabled(controlValues) { isEnabled(controlValues) {
const suffix = this.textLineNumber === 1 ? "" : "2"; const suffix = this.textLineNumber === 1 ? "" : "2";
const textEnabled = controlValues[`text${suffix}-enabled`]; const text = controlValues[`button-text${suffix}`];
const shadowEnabled = controlValues[`text${suffix}-shadow-enabled`]; const shadowEnabled = controlValues[`text${suffix}-shadow-enabled`];
return textEnabled && shadowEnabled; return text && text.trim() !== "" && shadowEnabled;
} }
apply(context, controlValues, animState, renderData) { apply(context, controlValues, animState, renderData) {

View file

@ -65,8 +65,7 @@ export class WaveTextEffect extends ButtonEffect {
// Get text configuration // Get text configuration
const text = controlValues[`button-text${suffix}`] || ''; const text = controlValues[`button-text${suffix}`] || '';
const enabled = controlValues[`text${suffix}-enabled`]; if (!text || text.trim() === '') return;
if (!text || !enabled) return;
const fontSize = controlValues[`font-size${suffix}`] || 12; const fontSize = controlValues[`font-size${suffix}`] || 12;
const fontWeight = controlValues[`font-bold${suffix}`] ? 'bold' : 'normal'; const fontWeight = controlValues[`font-bold${suffix}`] ? 'bold' : 'normal';