Update changelog and version
This commit is contained in:
parent
2c9e8f45ba
commit
958a187d30
|
|
@ -1,5 +1,11 @@
|
|||
# CHANGELOG
|
||||
|
||||
## [0.3.1]
|
||||
|
||||
## Fixed
|
||||
|
||||
- Size calculation missmatch [#3](https://github.com/Leinnan/bevy_simple_scroll_view/issues/3)
|
||||
|
||||
## [0.3.0]
|
||||
|
||||
## Added
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
[package]
|
||||
name = "bevy_simple_scroll_view"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
edition = "2021"
|
||||
exclude = [".github/","wasm/", "record.gif"]
|
||||
exclude = [".github/", "wasm/", "record.gif"]
|
||||
categories = ["game-development", "gui"]
|
||||
keywords = ["bevy","ui"]
|
||||
keywords = ["bevy", "ui"]
|
||||
repository = "https://github.com/Leinnan/bevy_simple_scroll_view"
|
||||
homepage = "https://github.com/Leinnan/bevy_simple_scroll_view"
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
|
@ -21,4 +21,4 @@ default-features = true
|
|||
|
||||
[features]
|
||||
default = []
|
||||
extra_logs = []
|
||||
extra_logs = []
|
||||
|
|
|
|||
|
|
@ -127,14 +127,15 @@ fn update_size(
|
|||
mut q: Query<(&Children, &ComputedNode), With<ScrollView>>,
|
||||
mut content_q: Query<(&mut ScrollableContent, &ComputedNode), Changed<ComputedNode>>,
|
||||
) {
|
||||
for (children, node) in q.iter_mut() {
|
||||
let container_height = node.size().y * node.inverse_scale_factor();
|
||||
for (children, scroll_view_node) in q.iter_mut() {
|
||||
let container_height = scroll_view_node.size().y * scroll_view_node.inverse_scale_factor();
|
||||
for &child in children.iter() {
|
||||
let Ok((mut scroll, node)) = content_q.get_mut(child) else {
|
||||
continue;
|
||||
};
|
||||
|
||||
scroll.max_scroll = (node.size().y * node.inverse_scale_factor()- container_height).max(0.0);
|
||||
scroll.max_scroll =
|
||||
(node.size().y * node.inverse_scale_factor() - container_height).max(0.0);
|
||||
#[cfg(feature = "extra_logs")]
|
||||
info!(
|
||||
"CONTAINER {}, max_scroll: {}",
|
||||
|
|
|
|||
Loading…
Reference in New Issue