Skip to content

Commit

Permalink
Made viewport jobs public
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgindi committed Feb 27, 2016
1 parent 4b9ebfa commit a16e84d
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 58 deletions.
48 changes: 24 additions & 24 deletions Charts/Charts.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,14 @@
5BA8EC891A9D151C00CE82E1 /* ChartDataBaseFilter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8EC761A9D151C00CE82E1 /* ChartDataBaseFilter.swift */; };
5BAAA8561BB08E1D00B20D4D /* CombinedHighlighter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BAAA8551BB08E1D00B20D4D /* CombinedHighlighter.swift */; };
5BB6EC1D1ACC28AB006E9C25 /* ChartTransformerHorizontalBarChart.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BB6EC1C1ACC28AB006E9C25 /* ChartTransformerHorizontalBarChart.swift */; };
5BBBD9E11C80976300D01235 /* ZoomViewJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BBBD9E01C80976300D01235 /* ZoomViewJob.swift */; };
5BBBD9E21C80976300D01235 /* ZoomViewJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BBBD9E01C80976300D01235 /* ZoomViewJob.swift */; };
5BCAA74A1C7CAA4E00F83F3B /* ViewPortJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BCAA7491C7CAA4E00F83F3B /* ViewPortJob.swift */; };
5BCAA74B1C7CAA4E00F83F3B /* ViewPortJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BCAA7491C7CAA4E00F83F3B /* ViewPortJob.swift */; };
5BCAA74D1C7CAB4900F83F3B /* MoveViewJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BCAA74C1C7CAB4900F83F3B /* MoveViewJob.swift */; };
5BCAA74E1C7CAB4900F83F3B /* MoveViewJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BCAA74C1C7CAB4900F83F3B /* MoveViewJob.swift */; };
5BCAA7501C7CAD4C00F83F3B /* AnimatedJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BCAA74F1C7CAD4C00F83F3B /* AnimatedJob.swift */; };
5BCAA7511C7CAD4C00F83F3B /* AnimatedJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BCAA74F1C7CAD4C00F83F3B /* AnimatedJob.swift */; };
5BBBD9E11C80976300D01235 /* ZoomChartViewJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BBBD9E01C80976300D01235 /* ZoomChartViewJob.swift */; };
5BBBD9E21C80976300D01235 /* ZoomChartViewJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BBBD9E01C80976300D01235 /* ZoomChartViewJob.swift */; };
5BCAA74A1C7CAA4E00F83F3B /* ChartViewPortJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BCAA7491C7CAA4E00F83F3B /* ChartViewPortJob.swift */; };
5BCAA74B1C7CAA4E00F83F3B /* ChartViewPortJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BCAA7491C7CAA4E00F83F3B /* ChartViewPortJob.swift */; };
5BCAA74D1C7CAB4900F83F3B /* MoveChartViewJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BCAA74C1C7CAB4900F83F3B /* MoveChartViewJob.swift */; };
5BCAA74E1C7CAB4900F83F3B /* MoveChartViewJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BCAA74C1C7CAB4900F83F3B /* MoveChartViewJob.swift */; };
5BCAA7501C7CAD4C00F83F3B /* AnimatedViewPortJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BCAA74F1C7CAD4C00F83F3B /* AnimatedViewPortJob.swift */; };
5BCAA7511C7CAD4C00F83F3B /* AnimatedViewPortJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BCAA74F1C7CAD4C00F83F3B /* AnimatedViewPortJob.swift */; };
5BCAA7531C7CB03900F83F3B /* AnimatedMoveViewJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BCAA7521C7CB03900F83F3B /* AnimatedMoveViewJob.swift */; };
5BCAA7541C7CB03900F83F3B /* AnimatedMoveViewJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BCAA7521C7CB03900F83F3B /* AnimatedMoveViewJob.swift */; };
5BCAA7561C7CB0DE00F83F3B /* AnimatedZoomViewJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BCAA7551C7CB0DE00F83F3B /* AnimatedZoomViewJob.swift */; };
Expand Down Expand Up @@ -332,10 +332,10 @@
5BA8EC7C1A9D151C00CE82E1 /* ChartUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartUtils.swift; sourceTree = "<group>"; };
5BAAA8551BB08E1D00B20D4D /* CombinedHighlighter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CombinedHighlighter.swift; sourceTree = "<group>"; };
5BB6EC1C1ACC28AB006E9C25 /* ChartTransformerHorizontalBarChart.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartTransformerHorizontalBarChart.swift; sourceTree = "<group>"; };
5BBBD9E01C80976300D01235 /* ZoomViewJob.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZoomViewJob.swift; sourceTree = "<group>"; };
5BCAA7491C7CAA4E00F83F3B /* ViewPortJob.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewPortJob.swift; sourceTree = "<group>"; };
5BCAA74C1C7CAB4900F83F3B /* MoveViewJob.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MoveViewJob.swift; sourceTree = "<group>"; };
5BCAA74F1C7CAD4C00F83F3B /* AnimatedJob.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnimatedJob.swift; sourceTree = "<group>"; };
5BBBD9E01C80976300D01235 /* ZoomChartViewJob.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZoomChartViewJob.swift; sourceTree = "<group>"; };
5BCAA7491C7CAA4E00F83F3B /* ChartViewPortJob.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChartViewPortJob.swift; sourceTree = "<group>"; };
5BCAA74C1C7CAB4900F83F3B /* MoveChartViewJob.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MoveChartViewJob.swift; sourceTree = "<group>"; };
5BCAA74F1C7CAD4C00F83F3B /* AnimatedViewPortJob.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnimatedViewPortJob.swift; sourceTree = "<group>"; };
5BCAA7521C7CB03900F83F3B /* AnimatedMoveViewJob.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnimatedMoveViewJob.swift; sourceTree = "<group>"; };
5BCAA7551C7CB0DE00F83F3B /* AnimatedZoomViewJob.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnimatedZoomViewJob.swift; sourceTree = "<group>"; };
5BD4C5751BCDBF6C00462351 /* BarChartDataProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BarChartDataProvider.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -608,10 +608,10 @@
5BCAA7481C7CAA0800F83F3B /* Jobs */ = {
isa = PBXGroup;
children = (
5BCAA7491C7CAA4E00F83F3B /* ViewPortJob.swift */,
5BCAA74C1C7CAB4900F83F3B /* MoveViewJob.swift */,
5BBBD9E01C80976300D01235 /* ZoomViewJob.swift */,
5BCAA74F1C7CAD4C00F83F3B /* AnimatedJob.swift */,
5BCAA7491C7CAA4E00F83F3B /* ChartViewPortJob.swift */,
5BCAA74C1C7CAB4900F83F3B /* MoveChartViewJob.swift */,
5BBBD9E01C80976300D01235 /* ZoomChartViewJob.swift */,
5BCAA74F1C7CAD4C00F83F3B /* AnimatedViewPortJob.swift */,
5BCAA7521C7CB03900F83F3B /* AnimatedMoveViewJob.swift */,
5BCAA7551C7CB0DE00F83F3B /* AnimatedZoomViewJob.swift */,
);
Expand Down Expand Up @@ -848,7 +848,7 @@
buildActionMask = 2147483647;
files = (
5B680D1F1A9D17C30026A057 /* ChartAxisBase.swift in Sources */,
5BCAA74D1C7CAB4900F83F3B /* MoveViewJob.swift in Sources */,
5BCAA74D1C7CAB4900F83F3B /* MoveChartViewJob.swift in Sources */,
5BAAA8561BB08E1D00B20D4D /* CombinedHighlighter.swift in Sources */,
659400BC1BF463C1004F9C27 /* CombinedChartData.swift in Sources */,
5B680D211A9D17C30026A057 /* ChartLimitLine.swift in Sources */,
Expand All @@ -863,7 +863,7 @@
5B6A548B1AA66A3D000F57C2 /* LineChartRenderer.swift in Sources */,
5B6A54821AA5DF34000F57C2 /* ChartYAxisRendererRadarChart.swift in Sources */,
659400B81BF463C1004F9C27 /* ChartDataEntry.swift in Sources */,
5BCAA74A1C7CAA4E00F83F3B /* ViewPortJob.swift in Sources */,
5BCAA74A1C7CAA4E00F83F3B /* ChartViewPortJob.swift in Sources */,
5BD4C5821BCDBF6C00462351 /* ScatterChartDataProvider.swift in Sources */,
5B6A54931AA66AAB000F57C2 /* CombinedChartRenderer.swift in Sources */,
659400C01BF463C1004F9C27 /* LineChartDataSet.swift in Sources */,
Expand All @@ -874,7 +874,7 @@
5B680D221A9D17C30026A057 /* ChartXAxis.swift in Sources */,
5BA8EC891A9D151C00CE82E1 /* ChartDataBaseFilter.swift in Sources */,
659400A21BF463C1004F9C27 /* BarChartDataEntry.swift in Sources */,
5BCAA7501C7CAD4C00F83F3B /* AnimatedJob.swift in Sources */,
5BCAA7501C7CAD4C00F83F3B /* AnimatedViewPortJob.swift in Sources */,
5B6654DB1BB0A86F00890030 /* ChartXAxisValueFormatter.swift in Sources */,
5B6A54A31AA66B7C000F57C2 /* LineChartView.swift in Sources */,
5B6A54891AA66A1A000F57C2 /* PieChartRenderer.swift in Sources */,
Expand Down Expand Up @@ -902,7 +902,7 @@
5BB6EC1D1ACC28AB006E9C25 /* ChartTransformerHorizontalBarChart.swift in Sources */,
5B680D271A9D17C30026A057 /* ChartColorTemplates.swift in Sources */,
659400C21BF463C1004F9C27 /* LineRadarChartDataSet.swift in Sources */,
5BBBD9E11C80976300D01235 /* ZoomViewJob.swift in Sources */,
5BBBD9E11C80976300D01235 /* ZoomChartViewJob.swift in Sources */,
5B6A54951AA66AC0000F57C2 /* CandleStickChartRenderer.swift in Sources */,
5B680D291A9D17C30026A057 /* ChartSelectionDetail.swift in Sources */,
659400A01BF463C1004F9C27 /* BarChartData.swift in Sources */,
Expand Down Expand Up @@ -967,7 +967,7 @@
buildActionMask = 2147483647;
files = (
5597263C1BDABC0500E05E59 /* ChartDefaultXAxisValueFormatter.swift in Sources */,
5BCAA74E1C7CAB4900F83F3B /* MoveViewJob.swift in Sources */,
5BCAA74E1C7CAB4900F83F3B /* MoveChartViewJob.swift in Sources */,
5597263D1BDABC0500E05E59 /* ChartFillFormatter.swift in Sources */,
659400BD1BF463C1004F9C27 /* CombinedChartData.swift in Sources */,
5597263E1BDABC0500E05E59 /* ChartXAxisValueFormatter.swift in Sources */,
Expand All @@ -982,7 +982,7 @@
559726431BDABC0500E05E59 /* CandleChartDataProvider.swift in Sources */,
559726441BDABC0500E05E59 /* ChartDataProvider.swift in Sources */,
659400B91BF463C1004F9C27 /* ChartDataEntry.swift in Sources */,
5BCAA74B1C7CAA4E00F83F3B /* ViewPortJob.swift in Sources */,
5BCAA74B1C7CAA4E00F83F3B /* ChartViewPortJob.swift in Sources */,
559726451BDABC0500E05E59 /* LineChartDataProvider.swift in Sources */,
559726461BDABC0500E05E59 /* ScatterChartDataProvider.swift in Sources */,
659400C11BF463C1004F9C27 /* LineChartDataSet.swift in Sources */,
Expand All @@ -993,7 +993,7 @@
A52C5C3F1BAC5D1100594CDD /* ChartAnimator.swift in Sources */,
A52C5C401BAC5D1100594CDD /* ChartAnimationEasing.swift in Sources */,
659400A31BF463C1004F9C27 /* BarChartDataEntry.swift in Sources */,
5BCAA7511C7CAD4C00F83F3B /* AnimatedJob.swift in Sources */,
5BCAA7511C7CAD4C00F83F3B /* AnimatedViewPortJob.swift in Sources */,
A52C5C411BAC5D1100594CDD /* BarChartView.swift in Sources */,
A52C5C421BAC5D1100594CDD /* BarLineChartViewBase.swift in Sources */,
A52C5C431BAC5D1100594CDD /* BubbleChartView.swift in Sources */,
Expand Down Expand Up @@ -1021,7 +1021,7 @@
65F06F951BE812210074498D /* IBarLineScatterCandleBubbleChartDataSet.swift in Sources */,
A52C5C511BAC5D1100594CDD /* ChartMarker.swift in Sources */,
659400C31BF463C1004F9C27 /* LineRadarChartDataSet.swift in Sources */,
5BBBD9E21C80976300D01235 /* ZoomViewJob.swift in Sources */,
5BBBD9E21C80976300D01235 /* ZoomChartViewJob.swift in Sources */,
A52C5C521BAC5D1100594CDD /* ChartXAxis.swift in Sources */,
5B4AC1CB1C58A2B90028D1A6 /* ChartFill.swift in Sources */,
A52C5C531BAC5D1100594CDD /* ChartYAxis.swift in Sources */,
Expand Down
16 changes: 8 additions & 8 deletions Charts/Classes/Charts/BarLineChartViewBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar
yValue: Double,
axis: ChartYAxis.AxisDependency)
{
let job = ZoomViewJob(viewPortHandler: viewPortHandler, scaleX: scaleX, scaleY: scaleY, xIndex: xIndex, yValue: yValue, transformer: getTransformer(axis), axis: axis, view: self)
let job = ZoomChartViewJob(viewPortHandler: viewPortHandler, scaleX: scaleX, scaleY: scaleY, xIndex: xIndex, yValue: yValue, transformer: getTransformer(axis), axis: axis, view: self)
addViewportJob(job)
}

Expand All @@ -1075,7 +1075,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar
pt: CGPoint(x: viewPortHandler.contentLeft, y: viewPortHandler.contentTop),
axis: axis)

let job = AnimatedZoomViewJob(
let job = AnimatedZoomChartViewJob(
viewPortHandler: viewPortHandler,
transformer: getTransformer(axis),
view: self,
Expand Down Expand Up @@ -1193,7 +1193,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar
/// This also refreshes the chart by calling setNeedsDisplay().
public func moveViewToX(xIndex: CGFloat)
{
let job = MoveViewJob(
let job = MoveChartViewJob(
viewPortHandler: viewPortHandler,
xIndex: xIndex,
yValue: 0.0,
Expand All @@ -1212,7 +1212,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar
{
let valsInView = getDeltaY(axis) / _viewPortHandler.scaleY

let job = MoveViewJob(
let job = MoveChartViewJob(
viewPortHandler: viewPortHandler,
xIndex: 0,
yValue: yValue + Double(valsInView) / 2.0,
Expand All @@ -1232,7 +1232,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar
{
let valsInView = getDeltaY(axis) / _viewPortHandler.scaleY

let job = MoveViewJob(
let job = MoveChartViewJob(
viewPortHandler: viewPortHandler,
xIndex: xIndex,
yValue: yValue + Double(valsInView) / 2.0,
Expand Down Expand Up @@ -1263,7 +1263,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar

let valsInView = getDeltaY(axis) / _viewPortHandler.scaleY

let job = AnimatedMoveViewJob(
let job = AnimatedMoveChartViewJob(
viewPortHandler: viewPortHandler,
xIndex: xIndex,
yValue: yValue + Double(valsInView) / 2.0,
Expand Down Expand Up @@ -1326,7 +1326,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar
let valsInView = getDeltaY(axis) / _viewPortHandler.scaleY
let xsInView = CGFloat(xAxis.values.count) / _viewPortHandler.scaleX

let job = MoveViewJob(
let job = MoveChartViewJob(
viewPortHandler: viewPortHandler,
xIndex: xIndex - xsInView / 2.0,
yValue: yValue + Double(valsInView) / 2.0,
Expand Down Expand Up @@ -1357,7 +1357,7 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar
let valsInView = getDeltaY(axis) / _viewPortHandler.scaleY
let xsInView = CGFloat(xAxis.values.count) / _viewPortHandler.scaleX

let job = AnimatedMoveViewJob(
let job = AnimatedMoveChartViewJob(
viewPortHandler: viewPortHandler,
xIndex: xIndex - xsInView / 2.0,
yValue: yValue + Double(valsInView) / 2.0,
Expand Down
12 changes: 10 additions & 2 deletions Charts/Classes/Charts/ChartViewBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ public class ChartViewBase: UIView, ChartDataProvider, ChartAnimatorDelegate
}
#endif

internal var _viewportJobs = [ViewPortJob]()
internal var _viewportJobs = [ChartViewPortJob]()

public override func observeValueForKeyPath(keyPath: String?, ofObject object: AnyObject?, change: [String : AnyObject]?, context: UnsafeMutablePointer<Void>)
{
Expand All @@ -887,12 +887,20 @@ public class ChartViewBase: UIView, ChartDataProvider, ChartAnimatorDelegate
}
}

public func removeViewportJob(job: ChartViewPortJob)
{
if let index = _viewportJobs.indexOf({ $0 === job })
{
_viewportJobs.removeAtIndex(index)
}
}

public func clearAllViewportJobs()
{
_viewportJobs.removeAll(keepCapacity: false)
}

internal func addViewportJob(job: ViewPortJob)
public func addViewportJob(job: ChartViewPortJob)
{
if (_viewPortHandler.hasChartDimens)
{
Expand Down
6 changes: 3 additions & 3 deletions Charts/Classes/Jobs/AnimatedMoveViewJob.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// AnimatedMoveViewJob.swift
// AnimatedMoveChartViewJob.swift
// Charts
//
// Copyright 2015 Daniel Cohen Gindi & Philipp Jahoda
Expand All @@ -11,9 +11,9 @@

import Foundation

internal class AnimatedMoveViewJob: AnimatedJob
public class AnimatedMoveChartViewJob: AnimatedViewPortJob
{
internal override init(
public override init(
viewPortHandler: ChartViewPortHandler,
xIndex: CGFloat,
yValue: Double,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// AnimatedJob.swift
// AnimatedViewPortJob.swift
// Charts
//
// Copyright 2015 Daniel Cohen Gindi & Philipp Jahoda
Expand All @@ -11,7 +11,7 @@

import Foundation

internal class AnimatedJob: ViewPortJob
public class AnimatedViewPortJob: ChartViewPortJob
{
internal var phase: CGFloat = 1.0
internal var xOrigin: CGFloat = 0.0
Expand All @@ -24,7 +24,7 @@ internal class AnimatedJob: ViewPortJob

private var _easing: ChartEasingFunctionBlock?

internal init(
public init(
viewPortHandler: ChartViewPortHandler,
xIndex: CGFloat,
yValue: Double,
Expand Down Expand Up @@ -52,12 +52,12 @@ internal class AnimatedJob: ViewPortJob
stop(finish: false)
}

internal override func doJob()
public override func doJob()
{
start()
}

private func start()
public func start()
{
_startTime = CACurrentMediaTime()
_endTime = _startTime + _duration
Expand All @@ -69,7 +69,7 @@ internal class AnimatedJob: ViewPortJob
_displayLink.addToRunLoop(NSRunLoop.mainRunLoop(), forMode: NSRunLoopCommonModes)
}

private func stop(finish finish: Bool)
public func stop(finish finish: Bool)
{
if (_displayLink != nil)
{
Expand Down
6 changes: 3 additions & 3 deletions Charts/Classes/Jobs/AnimatedZoomViewJob.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// AnimatedZoomViewJob.swift
// AnimatedZoomChartViewJob.swift
// Charts
//
// Copyright 2015 Daniel Cohen Gindi & Philipp Jahoda
Expand All @@ -11,7 +11,7 @@

import Foundation

internal class AnimatedZoomViewJob: AnimatedJob
public class AnimatedZoomChartViewJob: AnimatedViewPortJob
{
internal var yAxis: ChartYAxis?
internal var xValCount: Int = 0
Expand All @@ -22,7 +22,7 @@ internal class AnimatedZoomViewJob: AnimatedJob
internal var zoomCenterX: CGFloat = 0.0
internal var zoomCenterY: CGFloat = 0.0

internal init(
public init(
viewPortHandler: ChartViewPortHandler,
transformer: ChartTransformer,
view: ChartViewBase,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// ViewPortJob.swift
// ChartViewPortJob.swift
// Charts
//
// Copyright 2015 Daniel Cohen Gindi & Philipp Jahoda
Expand All @@ -12,7 +12,7 @@
import Foundation

// This defines a viewport modification job, used for delaying or animating viewport changes
internal class ViewPortJob
public class ChartViewPortJob
{
internal var point: CGPoint = CGPoint()
internal weak var viewPortHandler: ChartViewPortHandler?
Expand All @@ -21,7 +21,7 @@ internal class ViewPortJob
internal weak var transformer: ChartTransformer?
internal weak var view: ChartViewBase?

internal init(
public init(
viewPortHandler: ChartViewPortHandler,
xIndex: CGFloat,
yValue: Double,
Expand All @@ -35,7 +35,7 @@ internal class ViewPortJob
self.view = view
}

internal func doJob()
public func doJob()
{
// Override this
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// MoveViewJob.swift
// MoveChartViewJob.swift
// Charts
//
// Copyright 2015 Daniel Cohen Gindi & Philipp Jahoda
Expand All @@ -11,9 +11,9 @@

import Foundation

internal class MoveViewJob: ViewPortJob
public class MoveChartViewJob: ChartViewPortJob
{
internal override init(
public override init(
viewPortHandler: ChartViewPortHandler,
xIndex: CGFloat,
yValue: Double,
Expand All @@ -28,7 +28,7 @@ internal class MoveViewJob: ViewPortJob
view: view)
}

internal override func doJob()
public override func doJob()
{
guard let
viewPortHandler = viewPortHandler,
Expand Down
Loading

0 comments on commit a16e84d

Please sign in to comment.