Rename absolute_from_start to translation in scrollable
This commit is contained in:
parent
ca2afb0495
commit
d07bac36ab
1 changed files with 3 additions and 3 deletions
|
|
@ -1058,7 +1058,7 @@ impl Offset {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn absolute_from_start(
|
fn translation(
|
||||||
self,
|
self,
|
||||||
viewport: f32,
|
viewport: f32,
|
||||||
content: f32,
|
content: f32,
|
||||||
|
|
@ -1219,7 +1219,7 @@ impl State {
|
||||||
) -> Vector {
|
) -> Vector {
|
||||||
Vector::new(
|
Vector::new(
|
||||||
if let Some(horizontal) = direction.horizontal() {
|
if let Some(horizontal) = direction.horizontal() {
|
||||||
self.offset_x.absolute_from_start(
|
self.offset_x.translation(
|
||||||
bounds.width,
|
bounds.width,
|
||||||
content_bounds.width,
|
content_bounds.width,
|
||||||
horizontal.alignment,
|
horizontal.alignment,
|
||||||
|
|
@ -1228,7 +1228,7 @@ impl State {
|
||||||
0.0
|
0.0
|
||||||
},
|
},
|
||||||
if let Some(vertical) = direction.vertical() {
|
if let Some(vertical) = direction.vertical() {
|
||||||
self.offset_y.absolute_from_start(
|
self.offset_y.translation(
|
||||||
bounds.height,
|
bounds.height,
|
||||||
content_bounds.height,
|
content_bounds.height,
|
||||||
vertical.alignment,
|
vertical.alignment,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue