Skip to content

Commit

Permalink
Merge pull request ChartsOrg#639 from AntiMoron/master
Browse files Browse the repository at this point in the history
Remove verbose semicolons
  • Loading branch information
danielgindi committed Jan 3, 2016
2 parents cbe0bac + de117c1 commit 65e3ae9
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions Charts/Classes/Utils/ChartViewPortHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,25 @@ public class ChartViewPortHandler: NSObject
return _contentRect.size.height
}

public var contentRect: CGRect { return _contentRect; }
public var contentRect: CGRect
{
return _contentRect
}

public var contentCenter: CGPoint
{
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
{
return _chartHeight
}

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

// MARK: - Scaling/Panning etc.

Expand Down Expand Up @@ -239,11 +248,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 +317,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 +491,4 @@ public class ChartViewPortHandler: NSObject
{
return (_scaleY < _maxScaleY)
}
}
}

0 comments on commit 65e3ae9

Please sign in to comment.