Skip to content

Commit a0724cb

Browse files
adityasharatfacebook-github-bot
authored andcommitted
Deletes unused APIs
Summary: Deletes unused APIs Reviewed By: apowolny Differential Revision: D78284002 fbshipit-source-id: aea786b9ee34689c5242deb176355a88800c7f9e
1 parent 9609e3f commit a0724cb

File tree

1 file changed

+2
-60
lines changed
  • litho-rendercore-visibility/src/main/java/com/facebook/rendercore/visibility

1 file changed

+2
-60
lines changed

litho-rendercore-visibility/src/main/java/com/facebook/rendercore/visibility/VisibilityOutput.kt

Lines changed: 2 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ class VisibilityOutput(
4646
val onVisibilityChange: VisibilityEventCallbackData?
4747
) {
4848

49-
private var focusedRatio = 0f
50-
5149
constructor(
5250
id: String,
5351
key: String,
@@ -77,62 +75,6 @@ class VisibilityOutput(
7775
onFullImpression,
7876
onVisibilityChange)
7977

80-
val visibilityTop: Float
81-
get() =
82-
if (visibleHeightRatio == 0f) {
83-
bounds.top.toFloat()
84-
} else {
85-
bounds.top + visibleHeightRatio * (bounds.bottom - bounds.top)
86-
}
87-
88-
val visibilityBottom: Float
89-
get() =
90-
if (visibleHeightRatio == 0f) {
91-
bounds.bottom.toFloat()
92-
} else {
93-
bounds.bottom - visibleHeightRatio * (bounds.bottom - bounds.top)
94-
}
95-
96-
val visibilityLeft: Float
97-
get() = bounds.left + visibleWidthRatio * (bounds.right - bounds.left)
98-
99-
val visibilityRight: Float
100-
get() = bounds.right - visibleHeightRatio * (bounds.right - bounds.left)
101-
102-
val fullImpressionTop: Float
103-
get() = bounds.bottom.toFloat()
104-
105-
val fullImpressionBottom: Float
106-
get() = bounds.top.toFloat()
107-
108-
val fullImpressionLeft: Float
109-
get() = bounds.right.toFloat()
110-
111-
val fullImpressionRight: Float
112-
get() = bounds.left.toFloat()
113-
114-
val focusedTop: Float
115-
get() = bounds.top + focusedRatio * (bounds.bottom - bounds.top)
116-
117-
val focusedBottom: Float
118-
get() = bounds.bottom - focusedRatio * (bounds.bottom - bounds.top)
119-
120-
val focusedLeft: Float
121-
get() = bounds.left + focusedRatio * (bounds.right - bounds.left)
122-
123-
val focusedRight: Float
124-
get() = bounds.right - focusedRatio * (bounds.right - bounds.left)
125-
126-
val componentArea: Int
127-
get() {
128-
val rect = bounds
129-
return if (rect.isEmpty) 0 else rect.width() * rect.height()
130-
}
131-
132-
fun setFocusedRatio(focusedRatio: Float) {
133-
this.focusedRatio = focusedRatio
134-
}
135-
13678
/**
13779
* The factory that client frameworks must implement to enable [VisibilityExtension] to create a
13880
* [VisibilityOutput] for every visited [LayoutResult] during the layout pass.
@@ -148,7 +90,7 @@ class VisibilityOutput(
14890
}
14991

15092
class VisibilityEventCallbackData(
151-
widthRatio: Float,
152-
heightRatio: Float,
93+
val widthRatio: Float,
94+
val heightRatio: Float,
15395
val callback: Function<Void?>,
15496
)

0 commit comments

Comments
 (0)