@shopify/flash-list 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +159 -0
- package/LICENSE.md +7 -0
- package/README.md +65 -0
- package/RNFlashList.podspec +26 -0
- package/android/build.gradle +59 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/kotlin/com/shopify/reactnative/flash_list/AutoLayoutShadow.kt +94 -0
- package/android/src/main/kotlin/com/shopify/reactnative/flash_list/AutoLayoutView.kt +79 -0
- package/android/src/main/kotlin/com/shopify/reactnative/flash_list/AutoLayoutViewManager.kt +69 -0
- package/android/src/main/kotlin/com/shopify/reactnative/flash_list/CellContainer.java +16 -0
- package/android/src/main/kotlin/com/shopify/reactnative/flash_list/CellContainerImpl.kt +16 -0
- package/android/src/main/kotlin/com/shopify/reactnative/flash_list/CellContainerManager.kt +27 -0
- package/android/src/main/kotlin/com/shopify/reactnative/flash_list/FlashListPackage.kt +19 -0
- package/android/src/test/java/com/shopify/reactnative/flash_list/AutoLayoutShadowTest.kt +146 -0
- package/android/src/test/java/com/shopify/reactnative/flash_list/models/Rect.kt +59 -0
- package/android/src/test/java/com/shopify/reactnative/flash_list/models/TestCollection.kt +6 -0
- package/android/src/test/java/com/shopify/reactnative/flash_list/models/TestDataModel.kt +8 -0
- package/android/src/test/resources/LayoutTestData.json +708 -0
- package/dist/AnimatedFlashList.d.ts +6 -0
- package/dist/AnimatedFlashList.d.ts.map +1 -0
- package/dist/AnimatedFlashList.js +8 -0
- package/dist/AnimatedFlashList.js.map +1 -0
- package/dist/FlashList.d.ts +121 -0
- package/dist/FlashList.d.ts.map +1 -0
- package/dist/FlashList.js +502 -0
- package/dist/FlashList.js.map +1 -0
- package/dist/FlashListProps.d.ts +251 -0
- package/dist/FlashListProps.d.ts.map +1 -0
- package/dist/FlashListProps.js +3 -0
- package/dist/FlashListProps.js.map +1 -0
- package/dist/GridLayoutProviderWithProps.d.ts +30 -0
- package/dist/GridLayoutProviderWithProps.d.ts.map +1 -0
- package/dist/GridLayoutProviderWithProps.js +80 -0
- package/dist/GridLayoutProviderWithProps.js.map +1 -0
- package/dist/PureComponentWrapper.d.ts +22 -0
- package/dist/PureComponentWrapper.d.ts.map +1 -0
- package/dist/PureComponentWrapper.js +37 -0
- package/dist/PureComponentWrapper.js.map +1 -0
- package/dist/__tests__/AverageWindow.test.d.ts +2 -0
- package/dist/__tests__/AverageWindow.test.d.ts.map +1 -0
- package/dist/__tests__/AverageWindow.test.js +69 -0
- package/dist/__tests__/AverageWindow.test.js.map +1 -0
- package/dist/__tests__/FlashList.test.d.ts +2 -0
- package/dist/__tests__/FlashList.test.d.ts.map +1 -0
- package/dist/__tests__/FlashList.test.js +656 -0
- package/dist/__tests__/FlashList.test.js.map +1 -0
- package/dist/__tests__/GridLayoutProviderWithProps.test.d.ts +2 -0
- package/dist/__tests__/GridLayoutProviderWithProps.test.d.ts.map +1 -0
- package/dist/__tests__/GridLayoutProviderWithProps.test.js +133 -0
- package/dist/__tests__/GridLayoutProviderWithProps.test.js.map +1 -0
- package/dist/__tests__/PlatformHelper.web.test.d.ts +2 -0
- package/dist/__tests__/PlatformHelper.web.test.d.ts.map +1 -0
- package/dist/__tests__/PlatformHelper.web.test.js +25 -0
- package/dist/__tests__/PlatformHelper.web.test.js.map +1 -0
- package/dist/__tests__/ViewabilityHelper.test.d.ts +2 -0
- package/dist/__tests__/ViewabilityHelper.test.d.ts.map +1 -0
- package/dist/__tests__/ViewabilityHelper.test.js +187 -0
- package/dist/__tests__/ViewabilityHelper.test.js.map +1 -0
- package/dist/__tests__/helpers/mountFlashList.d.ts +20 -0
- package/dist/__tests__/helpers/mountFlashList.d.ts.map +1 -0
- package/dist/__tests__/helpers/mountFlashList.js +44 -0
- package/dist/__tests__/helpers/mountFlashList.js.map +1 -0
- package/dist/__tests__/useBlankAreaTracker.test.d.ts +2 -0
- package/dist/__tests__/useBlankAreaTracker.test.d.ts.map +1 -0
- package/dist/__tests__/useBlankAreaTracker.test.js +179 -0
- package/dist/__tests__/useBlankAreaTracker.test.js.map +1 -0
- package/dist/benchmark/AutoScrollHelper.d.ts +18 -0
- package/dist/benchmark/AutoScrollHelper.d.ts.map +1 -0
- package/dist/benchmark/AutoScrollHelper.js +68 -0
- package/dist/benchmark/AutoScrollHelper.js.map +1 -0
- package/dist/benchmark/JSFPSMonitor.d.ts +23 -0
- package/dist/benchmark/JSFPSMonitor.d.ts.map +1 -0
- package/dist/benchmark/JSFPSMonitor.js +65 -0
- package/dist/benchmark/JSFPSMonitor.js.map +1 -0
- package/dist/benchmark/roundToDecimalPlaces.d.ts +2 -0
- package/dist/benchmark/roundToDecimalPlaces.d.ts.map +1 -0
- package/dist/benchmark/roundToDecimalPlaces.js +9 -0
- package/dist/benchmark/roundToDecimalPlaces.js.map +1 -0
- package/dist/benchmark/useBenchmark.d.ts +35 -0
- package/dist/benchmark/useBenchmark.d.ts.map +1 -0
- package/dist/benchmark/useBenchmark.js +167 -0
- package/dist/benchmark/useBenchmark.js.map +1 -0
- package/dist/benchmark/useBlankAreaTracker.d.ts +34 -0
- package/dist/benchmark/useBlankAreaTracker.d.ts.map +1 -0
- package/dist/benchmark/useBlankAreaTracker.js +67 -0
- package/dist/benchmark/useBlankAreaTracker.js.map +1 -0
- package/dist/benchmark/useDataMultiplier.d.ts +9 -0
- package/dist/benchmark/useDataMultiplier.d.ts.map +1 -0
- package/dist/benchmark/useDataMultiplier.js +25 -0
- package/dist/benchmark/useDataMultiplier.js.map +1 -0
- package/dist/benchmark/useFlatListBenchmark.d.ts +13 -0
- package/dist/benchmark/useFlatListBenchmark.d.ts.map +1 -0
- package/dist/benchmark/useFlatListBenchmark.js +100 -0
- package/dist/benchmark/useFlatListBenchmark.js.map +1 -0
- package/dist/errors/CustomError.d.ts +8 -0
- package/dist/errors/CustomError.d.ts.map +1 -0
- package/dist/errors/CustomError.js +14 -0
- package/dist/errors/CustomError.js.map +1 -0
- package/dist/errors/ExceptionList.d.ts +20 -0
- package/dist/errors/ExceptionList.d.ts.map +1 -0
- package/dist/errors/ExceptionList.js +22 -0
- package/dist/errors/ExceptionList.js.map +1 -0
- package/dist/errors/Warnings.d.ts +10 -0
- package/dist/errors/Warnings.d.ts.map +1 -0
- package/dist/errors/Warnings.js +15 -0
- package/dist/errors/Warnings.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/dist/native/auto-layout/AutoLayoutView.d.ts +21 -0
- package/dist/native/auto-layout/AutoLayoutView.d.ts.map +1 -0
- package/dist/native/auto-layout/AutoLayoutView.js +48 -0
- package/dist/native/auto-layout/AutoLayoutView.js.map +1 -0
- package/dist/native/auto-layout/AutoLayoutViewNativeComponent.d.ts +4 -0
- package/dist/native/auto-layout/AutoLayoutViewNativeComponent.d.ts.map +1 -0
- package/dist/native/auto-layout/AutoLayoutViewNativeComponent.js +6 -0
- package/dist/native/auto-layout/AutoLayoutViewNativeComponent.js.map +1 -0
- package/dist/native/auto-layout/AutoLayoutViewNativeComponent.web.d.ts +5 -0
- package/dist/native/auto-layout/AutoLayoutViewNativeComponent.web.d.ts.map +1 -0
- package/dist/native/auto-layout/AutoLayoutViewNativeComponent.web.js +6 -0
- package/dist/native/auto-layout/AutoLayoutViewNativeComponent.web.js.map +1 -0
- package/dist/native/auto-layout/AutoLayoutViewNativeComponentProps.d.ts +14 -0
- package/dist/native/auto-layout/AutoLayoutViewNativeComponentProps.d.ts.map +1 -0
- package/dist/native/auto-layout/AutoLayoutViewNativeComponentProps.js +3 -0
- package/dist/native/auto-layout/AutoLayoutViewNativeComponentProps.js.map +1 -0
- package/dist/native/cell-container/CellContainer.d.ts +6 -0
- package/dist/native/cell-container/CellContainer.d.ts.map +1 -0
- package/dist/native/cell-container/CellContainer.js +9 -0
- package/dist/native/cell-container/CellContainer.js.map +1 -0
- package/dist/native/cell-container/CellContainer.web.d.ts +7 -0
- package/dist/native/cell-container/CellContainer.web.d.ts.map +1 -0
- package/dist/native/cell-container/CellContainer.web.js +13 -0
- package/dist/native/cell-container/CellContainer.web.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/utils/AverageWindow.d.ts +21 -0
- package/dist/utils/AverageWindow.d.ts.map +1 -0
- package/dist/utils/AverageWindow.js +49 -0
- package/dist/utils/AverageWindow.js.map +1 -0
- package/dist/utils/PlatformHelper.d.ts +14 -0
- package/dist/utils/PlatformHelper.d.ts.map +1 -0
- package/dist/utils/PlatformHelper.js +16 -0
- package/dist/utils/PlatformHelper.js.map +1 -0
- package/dist/utils/PlatformHelper.web.d.ts +14 -0
- package/dist/utils/PlatformHelper.web.d.ts.map +1 -0
- package/dist/utils/PlatformHelper.web.js +18 -0
- package/dist/utils/PlatformHelper.web.js.map +1 -0
- package/dist/viewability/ViewToken.d.ts +8 -0
- package/dist/viewability/ViewToken.d.ts.map +1 -0
- package/dist/viewability/ViewToken.js +3 -0
- package/dist/viewability/ViewToken.js.map +1 -0
- package/dist/viewability/ViewabilityHelper.d.ts +25 -0
- package/dist/viewability/ViewabilityHelper.d.ts.map +1 -0
- package/dist/viewability/ViewabilityHelper.js +104 -0
- package/dist/viewability/ViewabilityHelper.js.map +1 -0
- package/dist/viewability/ViewabilityManager.d.ts +24 -0
- package/dist/viewability/ViewabilityManager.d.ts.map +1 -0
- package/dist/viewability/ViewabilityManager.js +94 -0
- package/dist/viewability/ViewabilityManager.js.map +1 -0
- package/ios/RNFlashList.xcodeproj/project.pbxproj +3 -0
- package/ios/RNFlashList.xcodeproj/project.xcworkspace/contents.xcworkspacedata +4 -0
- package/ios/Sources/AutoLayoutView.swift +218 -0
- package/ios/Sources/AutoLayoutViewManager.m +14 -0
- package/ios/Sources/AutoLayoutViewManager.swift +12 -0
- package/ios/Sources/CellContainer.swift +9 -0
- package/ios/Sources/CellContainerManager.m +8 -0
- package/ios/Sources/CellContainerManager.swift +12 -0
- package/ios/Sources/FlatListPro-Bridging-Header.h +8 -0
- package/ios/Tests/AutoLayoutViewTests.swift +113 -0
- package/jestSetup.js +15 -0
- package/package.json +75 -0
- package/src/AnimatedFlashList.ts +11 -0
- package/src/FlashList.tsx +801 -0
- package/src/FlashListProps.ts +312 -0
- package/src/GridLayoutProviderWithProps.ts +137 -0
- package/src/PureComponentWrapper.tsx +42 -0
- package/src/__tests__/AverageWindow.test.ts +80 -0
- package/src/__tests__/FlashList.test.tsx +738 -0
- package/src/__tests__/GridLayoutProviderWithProps.test.ts +150 -0
- package/src/__tests__/PlatformHelper.web.test.ts +29 -0
- package/src/__tests__/ViewabilityHelper.test.ts +283 -0
- package/src/__tests__/helpers/mountFlashList.tsx +62 -0
- package/src/__tests__/useBlankAreaTracker.test.tsx +206 -0
- package/src/benchmark/AutoScrollHelper.ts +70 -0
- package/src/benchmark/JSFPSMonitor.ts +74 -0
- package/src/benchmark/roundToDecimalPlaces.ts +4 -0
- package/src/benchmark/useBenchmark.ts +240 -0
- package/src/benchmark/useBlankAreaTracker.ts +117 -0
- package/src/benchmark/useDataMultiplier.ts +19 -0
- package/src/benchmark/useFlatListBenchmark.ts +107 -0
- package/src/errors/CustomError.ts +10 -0
- package/src/errors/ExceptionList.ts +23 -0
- package/src/errors/Warnings.ts +18 -0
- package/src/index.ts +32 -0
- package/src/native/auto-layout/AutoLayoutView.tsx +72 -0
- package/src/native/auto-layout/AutoLayoutViewNativeComponent.ts +7 -0
- package/src/native/auto-layout/AutoLayoutViewNativeComponent.web.ts +8 -0
- package/src/native/auto-layout/AutoLayoutViewNativeComponentProps.ts +14 -0
- package/src/native/cell-container/CellContainer.ts +7 -0
- package/src/native/cell-container/CellContainer.web.tsx +9 -0
- package/src/utils/AverageWindow.ts +49 -0
- package/src/utils/PlatformHelper.ts +16 -0
- package/src/utils/PlatformHelper.web.ts +20 -0
- package/src/viewability/ViewToken.ts +7 -0
- package/src/viewability/ViewabilityHelper.ts +162 -0
- package/src/viewability/ViewabilityManager.ts +133 -0
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
package com.shopify.reactnative.flash_list
|
|
2
|
+
|
|
3
|
+
import com.google.gson.Gson
|
|
4
|
+
import com.shopify.reactnative.flash_list.models.Rect
|
|
5
|
+
import com.shopify.reactnative.flash_list.models.TestDataModel
|
|
6
|
+
import org.junit.Assert.assertEquals
|
|
7
|
+
import org.junit.Test
|
|
8
|
+
|
|
9
|
+
internal class AutoLayoutShadowTest {
|
|
10
|
+
private val gson = Gson()
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Test against expected output from stored JSON */
|
|
14
|
+
@Test
|
|
15
|
+
fun clearGapsAndOverlapsVerticalList() {
|
|
16
|
+
val alShadow = getAutolayoutShadow(0)
|
|
17
|
+
val testModel = getTestModel()
|
|
18
|
+
testModel.vertical.forEachIndexed { index, it ->
|
|
19
|
+
alShadow.clearGapsAndOverlaps(it.input as Array<CellContainer>)
|
|
20
|
+
assertEquals("Index: $index", gson.toJson(it.expectedOutput), gson.toJson(it.input))
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Test against expected output from stored JSON */
|
|
26
|
+
@Test
|
|
27
|
+
fun clearGapsAndOverlapsHorizontalList() {
|
|
28
|
+
val alShadow = getAutolayoutShadow(0)
|
|
29
|
+
alShadow.horizontal = true
|
|
30
|
+
val testModel = getTestModel()
|
|
31
|
+
testModel.horizontal.forEachIndexed { index, it ->
|
|
32
|
+
alShadow.clearGapsAndOverlaps(it.input as Array<CellContainer>)
|
|
33
|
+
assertEquals("Index: $index", gson.toJson(it.expectedOutput), gson.toJson(it.input))
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Test against expected output from stored JSON */
|
|
39
|
+
@Test
|
|
40
|
+
fun clearGapsAndOverlapsWindowSize() {
|
|
41
|
+
val alShadow = getAutolayoutShadow(0)
|
|
42
|
+
alShadow.horizontal = true
|
|
43
|
+
alShadow.windowSize = 90
|
|
44
|
+
val testModel = getTestModel()
|
|
45
|
+
testModel.window.forEachIndexed { index, it ->
|
|
46
|
+
alShadow.clearGapsAndOverlaps(it.input as Array<CellContainer>)
|
|
47
|
+
assertEquals("Index: $index", gson.toJson(it.expectedOutput), gson.toJson(it.input))
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Should only correct items in the visible window*/
|
|
53
|
+
@Test
|
|
54
|
+
fun clearGapsAndOverlapsBoundaryTest() {
|
|
55
|
+
val alShadow = getAutolayoutShadow(300)
|
|
56
|
+
alShadow.renderOffset = 100
|
|
57
|
+
|
|
58
|
+
//--------- Vertical -----------
|
|
59
|
+
//Item above visible window
|
|
60
|
+
arrayOf<CellContainer>(getRect(0, 0, 100, 100), getRect(120, 0, 100, 100)).let {
|
|
61
|
+
alShadow.clearGapsAndOverlaps(it)
|
|
62
|
+
assertEquals(120, it[1].left)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
//Item below visible window
|
|
66
|
+
arrayOf<CellContainer>(getRect(0, 0, 100, 100), getRect(120, 550, 100, 100)).let {
|
|
67
|
+
alShadow.clearGapsAndOverlaps(it)
|
|
68
|
+
assertEquals(550, it[1].top)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
//Item within visible window
|
|
72
|
+
arrayOf<CellContainer>(getRect(0, 250, 100, 100), getRect(120, 250, 100, 100)).let {
|
|
73
|
+
alShadow.clearGapsAndOverlaps(it)
|
|
74
|
+
assertEquals(100, it[1].left)
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
//At the top edge
|
|
78
|
+
arrayOf<CellContainer>(getRect(0, 200, 100, 100), getRect(120, 200, 100, 100)).let {
|
|
79
|
+
alShadow.clearGapsAndOverlaps(it)
|
|
80
|
+
assertEquals(100, it[1].left)
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
//--------- Horizontal -----------
|
|
84
|
+
|
|
85
|
+
alShadow.horizontal = true
|
|
86
|
+
|
|
87
|
+
//Item left of visible window
|
|
88
|
+
arrayOf<CellContainer>(getRect(0, 0, 100, 100), getRect(0, 120, 100, 100)).let {
|
|
89
|
+
alShadow.clearGapsAndOverlaps(it)
|
|
90
|
+
assertEquals(120, it[1].top)
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
//Item right of visible window
|
|
94
|
+
arrayOf<CellContainer>(getRect(0, 0, 100, 100), getRect(550, 120, 100, 100)).let {
|
|
95
|
+
alShadow.clearGapsAndOverlaps(it)
|
|
96
|
+
assertEquals(120, it[1].top)
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
//Item within visible window
|
|
100
|
+
arrayOf<CellContainer>(getRect(250, 0, 100, 100), getRect(250, 120, 100, 100)).let {
|
|
101
|
+
alShadow.clearGapsAndOverlaps(it)
|
|
102
|
+
assertEquals(100, it[1].top)
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
//At the left edge
|
|
106
|
+
arrayOf<CellContainer>(getRect(200, 0, 100, 100), getRect(250, 150, 100, 100)).let {
|
|
107
|
+
alShadow.clearGapsAndOverlaps(it)
|
|
108
|
+
assertEquals(100, it[1].top)
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@Test
|
|
113
|
+
fun checkBlankForLastItem() {
|
|
114
|
+
val alShadow = getAutolayoutShadow(0)
|
|
115
|
+
val testModel = getTestModel()
|
|
116
|
+
testModel.vertical.forEachIndexed { index, it ->
|
|
117
|
+
alShadow.clearGapsAndOverlaps(it.input as Array<CellContainer>)
|
|
118
|
+
it.expectedOutput.map { value -> value.bottom }.maxOrNull()?.let { max ->
|
|
119
|
+
alShadow.computeBlankFromGivenOffset(0, 0, 0)
|
|
120
|
+
assertEquals("Index: $index", alShadow.windowSize - max, alShadow.blankOffsetAtEnd)
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
private fun getTestModel(): TestDataModel {
|
|
126
|
+
var str = this.javaClass.classLoader.getResource("LayoutTestData.json").readText()
|
|
127
|
+
return gson.fromJson<TestDataModel>(str, TestDataModel::class.java)
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
private fun getRect(l: Int, t: Int, r: Int, b: Int): Rect {
|
|
131
|
+
var rect = Rect(b - t, r - l)
|
|
132
|
+
rect.left = l
|
|
133
|
+
rect.right = r
|
|
134
|
+
rect.bottom = b
|
|
135
|
+
rect.top = t
|
|
136
|
+
return rect
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
private fun getAutolayoutShadow(offset: Int): AutoLayoutShadow {
|
|
140
|
+
val alShadow = AutoLayoutShadow()
|
|
141
|
+
alShadow.windowSize = 500
|
|
142
|
+
alShadow.renderOffset = 0
|
|
143
|
+
alShadow.scrollOffset = offset
|
|
144
|
+
return alShadow
|
|
145
|
+
}
|
|
146
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
package com.shopify.reactnative.flash_list.models
|
|
2
|
+
|
|
3
|
+
import com.shopify.reactnative.flash_list.CellContainer
|
|
4
|
+
|
|
5
|
+
class Rect (h: Int? = 0, w: Int? = 0): CellContainer {
|
|
6
|
+
private var left = 0
|
|
7
|
+
private var right = 0
|
|
8
|
+
private var top = 0
|
|
9
|
+
private var bottom = 0
|
|
10
|
+
private var height = 0
|
|
11
|
+
private var width = 0
|
|
12
|
+
|
|
13
|
+
override fun setIndex(value: Int) {
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
override fun getIndex(): Int {
|
|
17
|
+
return 0
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
override fun setLeft(value: Int) {
|
|
21
|
+
left = value
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
override fun getLeft(): Int {
|
|
25
|
+
return left
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
override fun setTop(value: Int) {
|
|
29
|
+
top = value
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
override fun getTop(): Int {
|
|
33
|
+
return top
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
override fun setRight(value: Int) {
|
|
37
|
+
right = value
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
override fun getRight(): Int {
|
|
41
|
+
return right
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
override fun setBottom(value: Int) {
|
|
45
|
+
bottom = value
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
override fun getBottom(): Int {
|
|
49
|
+
return bottom
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
override fun getHeight(): Int {
|
|
53
|
+
return height
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
override fun getWidth(): Int {
|
|
57
|
+
return width
|
|
58
|
+
}
|
|
59
|
+
}
|