Revert "chore: pane animation fixes"

This reverts commit f135484b5f.
This commit is contained in:
Aman Harwara
2023-12-07 16:24:08 +05:30
parent f135484b5f
commit 2cc2dddb9b
3 changed files with 2 additions and 21 deletions

View File

@@ -3,13 +3,6 @@ import { log, LoggingDomain } from '@/Logging'
const ENTRANCE_DURATION = 200
const EXIT_DURATION = 200
function cancelExistingAnimations(element: HTMLElement): void {
element.getAnimations().forEach((animation) => {
animation.commitStyles()
animation.cancel()
})
}
export async function animatePaneEntranceTransitionFromOffscreenToTheRight(elementId: string): Promise<void> {
log(LoggingDomain.Panes, 'Animating pane entrance transition from offscreen to the right', elementId)
const element = document.getElementById(elementId)
@@ -17,8 +10,6 @@ export async function animatePaneEntranceTransitionFromOffscreenToTheRight(eleme
return
}
cancelExistingAnimations(element)
const animation = element.animate(
[
{
@@ -36,8 +27,6 @@ export async function animatePaneEntranceTransitionFromOffscreenToTheRight(eleme
)
await animation.finished
animation.commitStyles()
animation.cancel()
performSafariAnimationFix(element)
}
@@ -49,8 +38,6 @@ export async function animatePaneExitTransitionOffscreenToTheRight(elementId: st
return
}
cancelExistingAnimations(element)
const animation = element.animate(
[
{
@@ -65,10 +52,6 @@ export async function animatePaneExitTransitionOffscreenToTheRight(elementId: st
)
await animation.finished
animation.commitStyles()
animation.cancel()
performSafariAnimationFix(element)
}
/**