1
1
mirror of https://github.com/exyte/Macaw.git synced 2024-11-11 01:42:35 +03:00

Shapes related animations fixes

This commit is contained in:
Viktor Sukochev 2017-02-15 17:51:12 +07:00
parent a2b697a2ac
commit fe6774eea8

View File

@ -75,7 +75,11 @@ public extension AnimatableVariable {
var safeFrom = from
if safeFrom == nil {
safeFrom = shape.stroke as! T
if let shapeStroke = shape.stroke as? T {
safeFrom = shapeStroke
} else {
safeFrom = Stroke(width: 1.0) as! T
}
}
shape.stroke = safeFrom
@ -129,7 +133,11 @@ public extension AnimatableVariable {
var safeFrom = from
if safeFrom == nil {
safeFrom = shape.fill as! T
if let shapeFill = shape.fill as? T {
safeFrom = shapeFill
} else {
safeFrom = Color.clear as! T
}
}
shape.fill = safeFrom