Skip to content

Commit

Permalink
remove 0.13 backport
Browse files Browse the repository at this point in the history
  • Loading branch information
robtfm committed Jan 9, 2024
1 parent 496d702 commit b6bbc15
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions crates/bevy_ui/src/focus.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crate::{camera_config::UiCameraConfig, CalculatedClip, Node, TargetCamera, UiScale, UiStack};
use bevy_derive::{Deref, DerefMut};
use bevy_ecs::{
change_detection::DetectChangesMut,
entity::Entity,
Expand Down Expand Up @@ -244,11 +245,6 @@ pub fn ui_focus_system(

let node_rect = node.node.logical_rect(node.global_transform);

// Intersect with the calculated clip rect to find the bounds of the visible region of the node
let visible_rect = node
.calculated_clip
.map(|clip| node_rect.intersect(clip.clip))
.unwrap_or(node_rect);

// The mouse position relative to the node
// (0., 0.) is the top-left corner, (1., 1.) is the bottom-right corner
Expand All @@ -259,7 +255,6 @@ pub fn ui_focus_system(
// If the current cursor position is within the bounds of the node's visible area, consider it for
// clicking
let relative_cursor_position_component = RelativeCursorPosition {
normalized_visible_node_rect: visible_rect.normalize(node_rect),
normalized: relative_cursor_position,
};

Expand Down

0 comments on commit b6bbc15

Please sign in to comment.