Skip to main content

Reveal component methods

ActionMethodParametersExampleNotes
Lock reveal componentrevealComponentLockcomponentId - Stringwindow.wyng['_WYNG_ID_'].revealComponentLock('reveal_123')
Unlock reveal componentrevealComponentUnlockcomponentId - Stringwindow.wyng['_WYNG_ID_'].revealComponentLock('reveal_123')
Select specific outcomerevealComponentSelectOutcomecomponentId - String parameters - Objectwindow.wyng['_WYNG_ID_'].revealComponentSelectOutcome('reveal_123', { outcomeName: 'Win a car' })If the Outcome selection mode is "random", outcomeName is not required, and ignored if present. If the Outcome selection mode is "custom", outcomeName is required.
Spin wheel and show outcomerevealComponentSpinWheelAndStopcomponentId - String parameters - Objectwindow.wyng['_WYNG_ID_'].revealComponentSpinWheelAndStop('reveal_123', { speed: 3, duration: 5000 })
Get selected outcome inforevealComponentGetOutcomecomponentId - Stringwindow.wyng['_WYNG_ID_'].revealComponentGetOutcome('reveal_123')
Reset outcome and Reveal to initial staterevealComponentResetOutcomecomponentId - Stringwindow.wyng['_WYNG_ID_'].revealComponentResetOutcome('reveal_123')