Update changelog and version

This commit is contained in:
Piotr Siuszko 2025-01-24 12:34:35 +01:00
parent 2c9e8f45ba
commit 74245f1e20
3 changed files with 14 additions and 7 deletions

View File

@ -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

View File

@ -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"

View File

@ -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: {}",