Skip to content

Commit 7c610ec

Browse files
committed
PR feedback - minor refactoring.
1 parent eee571b commit 7c610ec

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecPreformatSpan.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,12 @@ open class AztecPreformatSpan(
5858
override var endBeforeBleed: Int = -1
5959
override var startBeforeCollapse: Int = -1
6060

61-
var originalAscent: Int = 0
62-
var originalTop: Int = 0
63-
var originalDescent: Int = 0
64-
var originalBottom: Int = 0
61+
private var originalAscent: Int = 0
62+
private var originalTop: Int = 0
63+
private var originalDescent: Int = 0
64+
private var originalBottom: Int = 0
6565

66+
// this method adds extra padding to the top and bottom lines of the text while removing it from middle lines
6667
override fun chooseHeight(text: CharSequence, start: Int, end: Int, spanstartv: Int, v: Int,
6768
fm: Paint.FontMetricsInt) {
6869
val spanned = text as Spanned

aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecQuoteSpan.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,12 @@ open class AztecQuoteSpan(
8888

8989
override val TAG: String = "blockquote"
9090

91-
var originalAscent: Int = 0
92-
var originalTop: Int = 0
93-
var originalDescent: Int = 0
94-
var originalBottom: Int = 0
91+
private var originalAscent: Int = 0
92+
private var originalTop: Int = 0
93+
private var originalDescent: Int = 0
94+
private var originalBottom: Int = 0
9595

96+
// this method adds extra padding to the top and bottom lines of the text while removing it from middle lines
9697
override fun chooseHeight(text: CharSequence, start: Int, end: Int, spanstartv: Int, v: Int,
9798
fm: Paint.FontMetricsInt) {
9899
val spanned = text as Spanned

0 commit comments

Comments
 (0)