Skip to content
Open
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
d6d4a1d
wip: initial leptos port for use-rect
omar-mohamed-khallaf Jun 16, 2025
2084f92
wip: complete implementation
omar-mohamed-khallaf Jun 16, 2025
7abb9a8
Merge branch 'RustForWeb:main' into main
omar-mohamed-khallaf Jun 16, 2025
4b3a8db
Don't call callbacks with the lock held
omar-mohamed-khallaf Jun 16, 2025
641e780
Optimize searching for observed element
omar-mohamed-khallaf Jun 16, 2025
d7e5fdf
Merge branch 'RustForWeb:main' into main
omar-mohamed-khallaf Jun 16, 2025
c2bedcd
replace Arc with Rc
omar-mohamed-khallaf Jun 16, 2025
39fe6a2
use borderbox for ResizeObserver option
omar-mohamed-khallaf Jun 16, 2025
539fb3d
rename variable
omar-mohamed-khallaf Jun 17, 2025
f4b4bd6
Hashmap implementation for use-rect
omar-mohamed-khallaf Jun 17, 2025
01ff2d1
refactor: new implementation using js_sys
omar-mohamed-khallaf Jun 17, 2025
3a56d34
fix: dependencies
omar-mohamed-khallaf Jun 17, 2025
336b59b
fix: use_rect
omar-mohamed-khallaf Jun 17, 2025
a6e22b1
fix: use_rect
omar-mohamed-khallaf Jun 17, 2025
c5b0260
Revert "fix: use_rect"
omar-mohamed-khallaf Jun 17, 2025
da54910
fix: call callbacks when the element is found
omar-mohamed-khallaf Jun 17, 2025
c57d8ee
feat: generalize observe_element and use it for use_size
omar-mohamed-khallaf Jun 17, 2025
2bc4835
use dyn_ref when possible
omar-mohamed-khallaf Jun 17, 2025
4fa5c81
fix typo
omar-mohamed-khallaf Jun 17, 2025
a354d34
fix: logical error
omar-mohamed-khallaf Jun 17, 2025
511d127
chores
omar-mohamed-khallaf Jun 17, 2025
769b865
fix: remove duplicate search for element in map
omar-mohamed-khallaf Jun 18, 2025
a566886
refactor
omar-mohamed-khallaf Jun 18, 2025
4440706
fix: remove duplicate set of size on initial observation
omar-mohamed-khallaf Jun 18, 2025
3892a47
Merge branch 'main' into main
omar-mohamed-khallaf Jun 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: call callbacks when the element is found
Signed-off-by: Omar Mohamed <[email protected]>
  • Loading branch information
omar-mohamed-khallaf committed Jun 17, 2025
commit da549106cc093f3693d2d944ebace5d377d126b4
2 changes: 2 additions & 0 deletions packages/primitives/core/rect/src/observe_element_rect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ static RESIZE_OBSERVER: LazyLock<SendWrapper<ResizeObserver>> = LazyLock::new(||
let observed_data = OBSERVED_ELEMENTS.get(&target);

if observed_data == JsValue::UNDEFINED {
RESIZE_OBSERVER.unobserve(&target);
} else {
let observed_data = OBSERVED_ELEMENTS
.get(&target)
.dyn_into::<js_sys::Object>()
Expand Down