Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
showHintAfterMisses,
highlightOnComplete,
highlightCompleteColor,
}) {
if (!id || !page) {
throw new Error('parameter id, page are required');
}
this.comp = page.selectComponent('#' + id);
if (!this.comp) {
throw new Error(`hanzi-writer-view with id ${id} not found`);
}
this.isDestroyed = false;
this.writer = new HanziWriter(this.comp, removeEmptyKeys({
width: this.comp.data.width,
height: this.comp.data.height,
charDataLoader: charDataLoader || defaultCharDataLoader,
onLoadCharDataError,
onLoadCharDataSuccess,
showOutline,
showCharacter,
padding,
strokeAnimationSpeed,
strokeFadeDuration,
strokeHighlightDuration,
strokeHighlightSpeed,
delayBetweenStrokes,
delayBetweenLoops,
strokeColor,
radicalColor,