Fixing check for field that was removed
This commit is contained in:
parent
7b74e5e997
commit
c82cfa1d23
5 changed files with 5 additions and 8 deletions
|
|
@ -7,7 +7,6 @@ export function debugControlValues(generator) {
|
|||
// Text controls
|
||||
console.log('Text controls:');
|
||||
console.log(' button-text:', values['button-text']);
|
||||
console.log(' text-enabled:', values['text-enabled']);
|
||||
console.log(' font-size:', values['font-size']);
|
||||
console.log(' text-x:', values['text-x']);
|
||||
console.log(' text-y:', values['text-y']);
|
||||
|
|
|
|||
|
|
@ -54,8 +54,7 @@ export class RainbowTextEffect extends ButtonEffect {
|
|||
|
||||
// Get text configuration
|
||||
const text = controlValues[`button-text${suffix}`] || '';
|
||||
const enabled = controlValues[`text${suffix}-enabled`];
|
||||
if (!text || !enabled) return;
|
||||
if (!text || text.trim() === '') return;
|
||||
|
||||
// Check if wave is also enabled - if so, skip (wave will handle rainbow)
|
||||
if (controlValues[`animate-text-wave${suffix}`]) return;
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ export class SpinTextEffect extends ButtonEffect {
|
|||
const suffix = this.textLineNumber === 1 ? "" : "2";
|
||||
const text = controlValues[`button-text${suffix}`] || "";
|
||||
|
||||
if (!text || !controlValues[`text${suffix}-enabled`]) return;
|
||||
if (!text || text.trim() === '') return;
|
||||
if (!animState) return;
|
||||
|
||||
const speed = controlValues[`spin-speed${suffix}`] || 1;
|
||||
|
|
|
|||
|
|
@ -90,9 +90,9 @@ export class TextShadowEffect extends ButtonEffect {
|
|||
|
||||
isEnabled(controlValues) {
|
||||
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`];
|
||||
return textEnabled && shadowEnabled;
|
||||
return text && text.trim() !== "" && shadowEnabled;
|
||||
}
|
||||
|
||||
apply(context, controlValues, animState, renderData) {
|
||||
|
|
|
|||
|
|
@ -65,8 +65,7 @@ export class WaveTextEffect extends ButtonEffect {
|
|||
|
||||
// Get text configuration
|
||||
const text = controlValues[`button-text${suffix}`] || '';
|
||||
const enabled = controlValues[`text${suffix}-enabled`];
|
||||
if (!text || !enabled) return;
|
||||
if (!text || text.trim() === '') return;
|
||||
|
||||
const fontSize = controlValues[`font-size${suffix}`] || 12;
|
||||
const fontWeight = controlValues[`font-bold${suffix}`] ? 'bold' : 'normal';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue