1
1
mirror of https://github.com/exyte/Macaw.git synced 2024-09-17 16:07:44 +03:00
This commit is contained in:
Alisa Mylnikova 2020-03-17 17:43:17 +07:00
parent bac14c1e85
commit bb5e9e0e39
3 changed files with 12 additions and 8 deletions

View File

@ -27,17 +27,21 @@ internal class AnimationSequence: BasicAnimation {
open override func stop() {
super.stop()
animations.forEach { animation in
animation.stop()
guard let active = animations.first(where: { $0.isActive() }) else {
return
}
active.stop()
}
open override func pause() {
super.pause()
animations.forEach { animation in
animation.pause()
guard let active = animations.first(where: { $0.isActive() }) else {
return
}
active.pause()
}
open override func play() {

View File

@ -465,7 +465,7 @@ open class SVGParser {
if let units = element.allAttributes["patternContentUnits"]?.text, units == "objectBoundingBox" {
contentUserSpace = false
}
var contentNode: Node?
if pattern.children.isEmpty {
if let parentPattern = parentPattern {
@ -483,7 +483,7 @@ open class SVGParser {
}
contentNode = Group(contents: shapes)
}
return UserSpacePattern(content: contentNode!,
bounds: bounds,
userSpace: userSpace,
@ -1599,7 +1599,7 @@ open class SVGParser {
guard let element = stop.element else {
return .none
}
var offset: Double = 0 // This is default value, value can be omitted
if let parsedOffset = getDoubleValueFromPercentage(element, attribute: "offset") {
offset = parsedOffset

View File

@ -147,7 +147,7 @@ open class MacawView: MView, MGestureRecognizerDelegate {
placeManager.setLayout(place: layoutHelper.getTransform(renderer!, contentLayout, bounds.size.toMacaw()))
if let viewLayer = mLayer {
let deltaTransform = CATransform3DMakeAffineTransform(self.place.toCG())
let deltaTransform = CATransform3DMakeAffineTransform(self.place.toCG())
viewLayer.transform = CATransform3DConcat(viewLayer.transform, deltaTransform)
}
}