Skip to content

Commit d78c37e

Browse files
committed
Rename BoxGridRowColumnModifier to BoxGridCellPositionModifier
1 parent c92bfe8 commit d78c37e

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

grid/src/commonMain/kotlin/com/cheonjaeung/compose/grid/BoxGridRowColumnModifier.kt renamed to grid/src/commonMain/kotlin/com/cheonjaeung/compose/grid/BoxGridCellPositionModifier.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ import androidx.compose.ui.node.ParentDataModifierNode
66
import androidx.compose.ui.platform.InspectorInfo
77
import androidx.compose.ui.unit.Density
88

9-
internal class BoxGridRowColumnElement(
9+
internal class BoxGridCellPositionElement(
1010
val row: Int = BoxGridParentData.UNSPECIFIED_ROW,
1111
val column: Int = BoxGridParentData.UNSPECIFIED_COLUMN,
1212
val inspectorInfo: InspectorInfo.() -> Unit
13-
) : ModifierNodeElement<BoxGridRowColumnNode>() {
14-
override fun create(): BoxGridRowColumnNode {
15-
return BoxGridRowColumnNode(row, column)
13+
) : ModifierNodeElement<BoxGridCellPositionNode>() {
14+
override fun create(): BoxGridCellPositionNode {
15+
return BoxGridCellPositionNode(row, column)
1616
}
1717

18-
override fun update(node: BoxGridRowColumnNode) {
18+
override fun update(node: BoxGridCellPositionNode) {
1919
node.row = row
2020
node.column = column
2121
}
@@ -27,7 +27,7 @@ internal class BoxGridRowColumnElement(
2727
override fun equals(other: Any?): Boolean {
2828
if (this === other) return true
2929
if (other == null) return false
30-
if (other !is BoxGridRowColumnElement) return false
30+
if (other !is BoxGridCellPositionElement) return false
3131
return this.row == other.row && this.column == other.column
3232
}
3333

@@ -38,7 +38,7 @@ internal class BoxGridRowColumnElement(
3838
}
3939
}
4040

41-
internal class BoxGridRowColumnNode(
41+
internal class BoxGridCellPositionNode(
4242
var row: Int,
4343
var column: Int
4444
) : Modifier.Node(), ParentDataModifierNode {

grid/src/commonMain/kotlin/com/cheonjaeung/compose/grid/BoxGridScope.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ internal object BoxGridScopeInstance : BoxGridScope {
5353
override fun Modifier.row(row: Int): Modifier {
5454
require(row >= 0) { "$row is invalid value, must be zero or positive" }
5555
return this.then(
56-
BoxGridRowColumnElement(
56+
BoxGridCellPositionElement(
5757
row = row,
5858
inspectorInfo = debugInspectorInfo {
5959
name = "row"
@@ -66,7 +66,7 @@ internal object BoxGridScopeInstance : BoxGridScope {
6666
override fun Modifier.column(column: Int): Modifier {
6767
require(column >= 0) { "$column is invalid value, must be zero or positive" }
6868
return this.then(
69-
BoxGridRowColumnElement(
69+
BoxGridCellPositionElement(
7070
column = column,
7171
inspectorInfo = debugInspectorInfo {
7272
name = "column"

0 commit comments

Comments
 (0)