TDKCandidates // Let maxLinesPerPage modifiable.

This commit is contained in:
ShikiSuen 2022-10-08 23:37:18 +08:00
parent 4c44cf09c9
commit ab959a5c12
1 changed files with 19 additions and 7 deletions

View File

@ -70,6 +70,7 @@ public class CandidatePool {
} }
public var maxLinesPerPage: Int { public var maxLinesPerPage: Int {
get {
switch currentLayout { switch currentLayout {
case .horizontal: case .horizontal:
return maxRowsPerPage return maxRowsPerPage
@ -79,6 +80,17 @@ public class CandidatePool {
return 0 return 0
} }
} }
set {
switch currentLayout {
case .horizontal:
maxRowsPerPage = newValue
case .vertical:
maxColumnsPerPage = newValue
@unknown default:
return
}
}
}
public var rangeForLastPageBlanked: Range<Int> { public var rangeForLastPageBlanked: Range<Int> {
switch currentLayout { switch currentLayout {