chore: add debounce to setSubtitleOffset
This commit is contained in:
committed by
Ivan Schurawel
parent
032d03d201
commit
acdbf59b50
@@ -32,6 +32,7 @@ import { getIncludeCorsCredentials } from '../../scripts/settings/webSettings';
|
||||
import { setBackdropTransparency, TRANSPARENCY_LEVEL } from '../../components/backdrop/backdrop';
|
||||
import Events from '../../utils/events.ts';
|
||||
import { includesAny } from '../../utils/container.ts';
|
||||
import debounce from 'lodash-es/debounce';
|
||||
|
||||
/**
|
||||
* Returns resolved URL.
|
||||
@@ -571,7 +572,12 @@ function tryRemoveElement(elem) {
|
||||
}
|
||||
}
|
||||
|
||||
setSubtitleOffset(offset) {
|
||||
setSubtitleOffset = debounce(this._setSubtitleOffset, 500);
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
_setSubtitleOffset(offset) {
|
||||
const offsetValue = parseFloat(offset);
|
||||
|
||||
// if .ass currently rendering
|
||||
|
||||
Reference in New Issue
Block a user