mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-03 21:16:35 +00:00
Fix message animations on iPad
This commit is contained in:
parent
68767b54ad
commit
6aa79050b0
@ -217,15 +217,15 @@ public final class ChatMessageTransitionNode: ASDisplayNode {
|
|||||||
|
|
||||||
func beginAnimation() {
|
func beginAnimation() {
|
||||||
let verticalDuration: Double = ChatMessageTransitionNode.animationDuration
|
let verticalDuration: Double = ChatMessageTransitionNode.animationDuration
|
||||||
let horizontalDuration: Double = verticalDuration// * 0.5
|
let horizontalDuration: Double = verticalDuration
|
||||||
let delay: Double = 0.0
|
let delay: Double = 0.0
|
||||||
|
|
||||||
var updatedContentAreaInScreenSpace = self.getContentAreaInScreenSpace()
|
var updatedContentAreaInScreenSpace = self.getContentAreaInScreenSpace()
|
||||||
|
updatedContentAreaInScreenSpace.size.width = updatedContentAreaInScreenSpace.origin.x + self.clippingNode.bounds.width
|
||||||
updatedContentAreaInScreenSpace.origin.x = 0.0
|
updatedContentAreaInScreenSpace.origin.x = 0.0
|
||||||
updatedContentAreaInScreenSpace.size.width = self.clippingNode.bounds.width
|
|
||||||
|
|
||||||
let clippingOffset = updatedContentAreaInScreenSpace.minY - self.clippingNode.frame.minY
|
let clippingOffset = updatedContentAreaInScreenSpace.minY - self.clippingNode.frame.minY
|
||||||
self.clippingNode.frame = CGRect(origin: CGPoint(x: 0.0, y: updatedContentAreaInScreenSpace.minY), size: self.clippingNode.bounds.size)
|
self.clippingNode.frame = CGRect(origin: CGPoint(x: 0.0, y: updatedContentAreaInScreenSpace.minY), size: CGSize(width: updatedContentAreaInScreenSpace.size.width, height: self.clippingNode.bounds.height))
|
||||||
self.clippingNode.bounds = CGRect(origin: CGPoint(x: 0.0, y: clippingOffset), size: self.clippingNode.bounds.size)
|
self.clippingNode.bounds = CGRect(origin: CGPoint(x: 0.0, y: clippingOffset), size: self.clippingNode.bounds.size)
|
||||||
|
|
||||||
switch self.source {
|
switch self.source {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user