Skip to content

Commit cc7b88f

Browse files
committed
Merge branch 'refs/heads/develop' into release/1.13.0
2 parents 27c3257 + b4831a6 commit cc7b88f

3 files changed

Lines changed: 10 additions & 8 deletions

File tree

Aztec/Classes/Constants/Metrics.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import Foundation
44
/// A collection of constants and metrics shared between the Aztec importer
55
/// and the editor.
66
///
7-
enum Metrics {
7+
public enum Metrics {
88

9-
static let defaultIndentation = CGFloat(12)
10-
static let maxIndentation = CGFloat(200)
11-
static let listTextIndentation = CGFloat(16)
12-
static let tabStepInterval = 8
13-
static let tabStepCount = 12
14-
static let paragraphSpacing = CGFloat(6)
9+
public static var defaultIndentation = CGFloat(12)
10+
public static var maxIndentation = CGFloat(200)
11+
public static var listTextIndentation = CGFloat(16)
12+
public static var tabStepInterval = 8
13+
public static var tabStepCount = 12
14+
public static var paragraphSpacing = CGFloat(6)
1515
}

Aztec/Classes/TextKit/LayoutManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ private extension LayoutManager {
283283
var resultAttributes = attributes
284284
var indent: CGFloat = 0
285285
if let style = attributes[.paragraphStyle] as? ParagraphStyle {
286-
indent = style.listIndent + Metrics.listTextIndentation
286+
indent = style.listIndent + Metrics.listTextIndentation - (Metrics.listTextIndentation / 4)
287287
}
288288

289289
resultAttributes[.paragraphStyle] = markerParagraphStyle(indent: indent)

Example/Example/EditorDemoController.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ class EditorDemoController: UIViewController {
171171
view.addSubview(titleTextView)
172172
view.addSubview(titlePlaceholderLabel)
173173
view.addSubview(separatorView)
174+
Aztec.Metrics.listTextIndentation = 24
175+
editorView.richTextView.textContainer.lineFragmentPadding = 0
174176
// color setup
175177
if #available(iOS 13.0, *) {
176178
view.backgroundColor = UIColor.systemBackground

0 commit comments

Comments
 (0)