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

Minor changes to logic in ViewPortJob subclasses. #2992

Merged
merged 2 commits into from
Nov 23, 2017
Merged

Minor changes to logic in ViewPortJob subclasses. #2992

merged 2 commits into from
Nov 23, 2017

Conversation

jjatie
Copy link
Collaborator

@jjatie jjatie commented Nov 13, 2017

No description provided.

@codecov-io
Copy link

codecov-io commented Nov 14, 2017

Codecov Report

Merging #2992 into master will increase coverage by 0.13%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2992      +/-   ##
==========================================
+ Coverage   19.64%   19.77%   +0.13%     
==========================================
  Files         113      113              
  Lines       13792    13663     -129     
==========================================
- Hits         2709     2702       -7     
+ Misses      11083    10961     -122
Impacted Files Coverage Δ
Source/Charts/Jobs/MoveViewJob.swift 0% <ø> (ø) ⬆️
Source/Charts/Jobs/ZoomViewJob.swift 0% <0%> (ø) ⬆️
Source/Charts/Jobs/ViewPortJob.swift 0% <0%> (ø) ⬆️
Source/Charts/Jobs/AnimatedViewPortJob.swift 0% <0%> (ø) ⬆️
Source/Charts/Charts/BarLineChartViewBase.swift 23.11% <0%> (+0.21%) ⬆️
Source/Charts/Jobs/AnimatedZoomViewJob.swift 0% <0%> (ø) ⬆️
Source/Charts/Utils/ViewPortHandler.swift 24.8% <0%> (+0.09%) ⬆️
Source/Charts/Charts/ChartViewBase.swift 23.26% <0%> (-0.97%) ⬇️
Source/Charts/Charts/RadarChartView.swift 0% <0%> (ø) ⬆️
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a1811c7...d1c6d37. Read the comment docs.

@@ -17,11 +17,11 @@ import CoreGraphics
open class ViewPortJob: NSObject
{
@objc internal var point: CGPoint = CGPoint()
@objc internal weak var viewPortHandler: ViewPortHandler?
@objc internal weak var viewPortHandler: ViewPortHandler? // TODO: Can this be unowned?
Copy link
Member

Choose a reason for hiding this comment

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

before merge, do we need to finish TODO? I am willing to check if we can use unowned when I got time, but seems weak is totally fine here. What's your concern using weak?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

weak does work here, but I think what is actually intended is unowned. In terms of function, nothing would change, but it does clean up a lot of guard statements if we can use unowned I feel like that is a separate PR and one that requires a bit more digging. I'm not sure what the policy is on TODOs

Copy link
Member

Choose a reason for hiding this comment

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

I don't know the policy neither. but if it is another PR, could you remove the comment? I will merge later.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@liuxuan30
Copy link
Member

Generally this PR looks great to use @discardableResult to remove those "let _" stuff and removed unused init().

@liuxuan30 liuxuan30 merged commit bc40b16 into ChartsOrg:master Nov 23, 2017
@jjatie jjatie deleted the view-port-job-logic-cleanup branch November 23, 2017 03:16
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.

3 participants