Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Morphing animation scale/translate/rotation #427

Merged
merged 7 commits into from
Jul 17, 2018

Conversation

f3dm76
Copy link
Collaborator

@f3dm76 f3dm76 commented Jun 18, 2018

No description provided.

@@ -19,7 +19,7 @@ class SVGCanvas: Group {
layout.layout(node: self, in: size)
return size
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to use linter

@@ -40,6 +40,7 @@ class SVGSize {

protocol NodeLayout {

var svgSize: SVGSize { get }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid using svgSize in general protocol

if let view = nodesMap.getView(canvas) {
rect = canvas.layout(size: view.bounds.size.toMacaw()).rect()
} else {
rect = Group(contents: canvas.contents).bounds
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really effective. It's better to use utility method to get bounds for list of nodes which will be used here and in Group.bounds

@@ -31,6 +31,7 @@ open class Group: Node {
tag: tag
)

self.contents = contents
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You change both contentsVar and contents which is not necessary, because contentsVar will be updated automatically.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

node property for contentsVar is being set up here, not the contents which indeed will be updated automatically

@ystrot ystrot self-assigned this Jul 9, 2018
@ystrot ystrot added this to the 0.9.3 milestone Jul 17, 2018
@ystrot ystrot merged commit 53a9f10 into exyte:master Jul 17, 2018
@f3dm76 f3dm76 deleted the fix/morphingAnimation branch July 17, 2018 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants