From 234acc9415fc775be13e09dc93adefd806ecd6de Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Thu, 31 Oct 2024 11:10:24 +0300 Subject: [PATCH] Add transition --- apps/showcase/layouts/AppConfigurator.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/showcase/layouts/AppConfigurator.vue b/apps/showcase/layouts/AppConfigurator.vue index f0c1a7366..fa6e1a7c6 100755 --- a/apps/showcase/layouts/AppConfigurator.vue +++ b/apps/showcase/layouts/AppConfigurator.vue @@ -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) {