Add transition

pull/6697/head
Cagatay Civici 2024-10-31 11:10:24 +03:00
parent def9c96170
commit 234acc9415
1 changed files with 9 additions and 0 deletions

View File

@ -316,6 +316,15 @@ export default {
$t().preset(preset).preset(this.getPresetExt()).surfacePalette(surfacePalette).use({ useDefaultOptions: true });
},
onRTLChange(value) {
if (!document.startViewTransition) {
this.toggleRTL();
return;
}
document.startViewTransition(() => this.toggleRTL(value));
},
toggleRTL(value) {
const htmlElement = document.documentElement;
if (value) {