Skip to content

Commit 9064fd1

Browse files
committed
Update ScreenObjectSnapshot interface.
1 parent 72432ea commit 9064fd1

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

haishinkit/src/main/java/com/haishinkit/screen/scene/ScreenObjectSnapshot.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,15 @@ import kotlinx.serialization.Serializable
1717
* The type identifier of the screen object.
1818
* This value is typically used to determine which screen object to recreate.
1919
*
20+
* @property id
21+
* The unique identifier of this screen object.
22+
*
2023
* @property frame
2124
* The position and size of the screen object within its parent coordinate space.
2225
*
26+
* @property isVisible
27+
* The visibility of the screen object.
28+
*
2329
* @property layoutMargin
2430
* The margin applied to the screen object when performing layout calculations.
2531
*
@@ -41,6 +47,7 @@ data class ScreenObjectSnapshot(
4147
val type: String,
4248
val id: String,
4349
val frame: Rect,
50+
val isVisible: Boolean,
4451
val layoutMargin: EdgeInsets,
4552
val horizontalAlignment: Int,
4653
val verticalAlignment: Int,

haishinkit/src/main/java/com/haishinkit/screen/scene/ScreenObjectSnapshotFactory.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class ScreenObjectSnapshotFactory {
1717
screenObject.frame.width(),
1818
screenObject.frame.height(),
1919
),
20+
isVisible = screenObject.isVisible,
2021
horizontalAlignment = screenObject.horizontalAlignment,
2122
verticalAlignment = screenObject.horizontalAlignment,
2223
layoutMargin = screenObject.layoutMargin,
@@ -39,6 +40,7 @@ class ScreenObjectSnapshotFactory {
3940
screenObject.frame.width(),
4041
screenObject.frame.height(),
4142
),
43+
isVisible = screenObject.isVisible,
4244
horizontalAlignment = screenObject.horizontalAlignment,
4345
verticalAlignment = screenObject.verticalAlignment,
4446
layoutMargin = screenObject.layoutMargin,

0 commit comments

Comments
 (0)