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

Remove verbose semicolons #639

Merged
merged 3 commits into from
Jan 3, 2016
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions Charts/Classes/Utils/ChartViewPortHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,13 @@ public class ChartViewPortHandler: NSObject
return CGPoint(x: _contentRect.origin.x + _contentRect.size.width / 2.0, y: _contentRect.origin.y + _contentRect.size.height / 2.0)
}

public var chartHeight: CGFloat { return _chartHeight; }
public var chartHeight: CGFloat {
Copy link
Member

Choose a reason for hiding this comment

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

{} at same line or follow
{
...
{
maybe?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

{} at same line then semicolons would be needed. That's far from swift style.

I just mistakenly followed my own code style. I've corrected that.

return _chartHeight
}

public var chartWidth: CGFloat { return _chartWidth; }
public var chartWidth: CGFloat {
return _chartWidth
}

// MARK: - Scaling/Panning etc.

Expand Down Expand Up @@ -239,11 +243,11 @@ public class ChartViewPortHandler: NSObject

let maxTransX = -width * (_scaleX - 1.0)
let newTransX = min(max(matrix.tx, maxTransX - _transOffsetX), _transOffsetX)
_transX = newTransX;
_transX = newTransX

let maxTransY = height * (_scaleY - 1.0)
let newTransY = max(min(matrix.ty, maxTransY + _transOffsetY), -_transOffsetY)
_transY = newTransY;
_transY = newTransY

matrix.tx = _transX
matrix.a = _scaleX
Expand Down Expand Up @@ -308,7 +312,7 @@ public class ChartViewPortHandler: NSObject
/// Sets the maximum scale factor for the y-axis
public func setMaximumScaleY(yScale: CGFloat)
{
_maxScaleY = yScale;
_maxScaleY = yScale

limitTransAndScale(matrix: &_touchMatrix, content: _contentRect)
}
Expand Down Expand Up @@ -482,4 +486,4 @@ public class ChartViewPortHandler: NSObject
{
return (_scaleY < _maxScaleY)
}
}
}