1
1
mirror of https://github.com/exyte/Macaw.git synced 2024-10-10 19:37:32 +03:00

Animation layer bounds fix

This commit is contained in:
Victor Sukochev 2016-05-16 10:52:15 +02:00
parent 47dc30c858
commit b005403b6a
2 changed files with 4 additions and 3 deletions

View File

@ -232,7 +232,7 @@ class PathExampleView: MacawView {
*/
let n = 40
let n = 20
// let g = 800.0
var clouds = [Node]()
for _ in 0 ... (n - 1) {

View File

@ -85,8 +85,9 @@ public class AnimationProducer {
if let shapeBounds = shape.bounds() {
print("Shape bounds: \(shapeBounds.description())")
let cgRect = shapeBounds.cgRect()
layer.frame = CGRectMake(0.0, 0.0, cgRect.width, cgRect.height)
// layer.frame = CGRectMake(0.0, 0.0, 100.0, 100.0)
layer.frame = CGRectMake(0.0, 0.0,
cgRect.width + cgRect.origin.x,
cgRect.height + cgRect.origin.y)
}
layer.shape = shape