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:
parent
47dc30c858
commit
b005403b6a
@ -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) {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user