Skip to content

Commit

Permalink
refactor: iframe animation optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
enesozturk committed Apr 1, 2024
1 parent 4f58870 commit d74b62c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ export class W3mApproveTransactionView extends LitElement {
this.bodyObserver = new ResizeObserver(() => {
const data = blueprint?.getBoundingClientRect()
const dimensions = data ?? { left: 0, top: 0, width: 0, height: 0 }
this.iframe.style.width = `${dimensions.width}px`
this.iframe.style.width = `360px`
this.iframe.style.height = `${dimensions.height - verticalPadding}px`
this.iframe.style.left = `${dimensions.left}px`
this.iframe.style.left = 'calc(50% - 180px)'
this.iframe.style.top = `${dimensions.top + verticalPadding / 2}px`
this.ready = true
})
Expand All @@ -70,7 +70,7 @@ export class W3mApproveTransactionView extends LitElement {
{ opacity: 0, transform: isMobile ? 'translateY(50px)' : 'scale(.95)' },
{ opacity: 1, transform: isMobile ? 'translateY(0)' : 'scale(1)' }
],
{ duration: 200, easing: 'ease', fill: 'forwards', delay: 300 }
{ duration: 200, easing: 'ease', fill: 'forwards' }
)
}

Expand Down
1 change: 0 additions & 1 deletion packages/wallet/src/W3mFrame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export class W3mFrame {
iframe.style.zIndex = '999999'
iframe.style.display = 'none'
iframe.style.opacity = '0'
iframe.style.borderRadius = `clamp(0px, var(--wui-border-radius-l), 44px)`
document.body.appendChild(iframe)
this.iframe = iframe
this.iframe.onload = () => {
Expand Down

0 comments on commit d74b62c

Please sign in to comment.