mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-22 23:23:54 +08:00
fix(Sentry 3228): Bad math sending an incomplete bounds struct to Electron
This commit is contained in:
parent
d9ac4e4359
commit
ea6aa2b643
1 changed files with 6 additions and 4 deletions
|
@ -430,10 +430,12 @@ class Atom extends Model
|
|||
|
||||
startTime = Date.now()
|
||||
boundsForI = (i) ->
|
||||
x: Math.round(startBounds.x + (width-startBounds.width) * -0.5 * i)
|
||||
y: Math.round(startBounds.y + (height-startBounds.height) * -0.5 * i)
|
||||
width: Math.round(startBounds.width + (width-startBounds.width) * i)
|
||||
height: Math.round(startBounds.height + (height-startBounds.height) * i)
|
||||
# It's very important this function never return undefined for any of the
|
||||
# keys which blows up setBounds.
|
||||
x: Math.round(startBounds.x + (width-startBounds.width) * -0.5 * i) ? 0
|
||||
y: Math.round(startBounds.y + (height-startBounds.height) * -0.5 * i) ? 0
|
||||
width: Math.round(startBounds.width + (width-startBounds.width) * i) ? width
|
||||
height: Math.round(startBounds.height + (height-startBounds.height) * i) ? height
|
||||
|
||||
tick = ->
|
||||
t = Math.min(1, (Date.now() - startTime) / (duration))
|
||||
|
|
Loading…
Reference in a new issue