tangled
alpha
login
or
join now
jonmsterling.com
/
AquaKit
4
fork
atom
A collection of user interface components and drawing routines for building tasteful apps using AppKit.
appkit
swift
aqua
ui
mac
4
fork
atom
overview
issues
1
pulls
pipelines
Make some functions static
jonmsterling.com
4 weeks ago
36d1218b
941afe37
+4
-4
1 changed file
expand all
collapse all
unified
split
Sources
AquaKit
Scroll Views
AquaScrollState.swift
+4
-4
Sources/AquaKit/Scroll Views/AquaScrollState.swift
···
24
24
}
25
25
26
26
public var verticalOverscroll: CGFloat {
27
27
-
absoluteExcess(of: scrollPosition.y, in: 0..<maxOffset.height)
27
27
+
Self.absoluteExcess(of: scrollPosition.y, in: 0..<maxOffset.height)
28
28
}
29
29
30
30
-
public func absoluteExcess(of position: CGFloat, in range: Range<CGFloat>) -> CGFloat {
30
30
+
public static func absoluteExcess(of position: CGFloat, in range: Range<CGFloat>) -> CGFloat {
31
31
if position < range.lowerBound {
32
32
range.lowerBound - position
33
33
} else if position > range.upperBound {
···
37
37
}
38
38
}
39
39
40
40
-
public func absoluteExcess(of point: NSPoint, in size: NSSize) -> NSSize {
40
40
+
public static func absoluteExcess(of point: NSPoint, in size: NSSize) -> NSSize {
41
41
NSSize(
42
42
width: absoluteExcess(of: point.x, in: 0..<size.width),
43
43
height: absoluteExcess(of: point.y, in: 0..<size.height)
···
45
45
}
46
46
47
47
public var effectiveContentSize: NSSize {
48
48
-
contentSize + absoluteExcess(of: scrollPosition, in: maxOffset)
48
48
+
contentSize + Self.absoluteExcess(of: scrollPosition, in: maxOffset)
49
49
}
50
50
}
51
51