You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve Text tool click targets on text layers to use the text box (#2145)
* Fix text selection
* Remove old implementation
* minor change
* Use inbuilt function instead of helper
* Code review
---------
Co-authored-by: Keavon Chambers <[email protected]>
graph_modification_utils::get_text(layer,&document.network_interface).expect("Text layer should have text when interacting with the Text tool in `interact()`");
320
+
321
+
let buzz_face = font_cache.get(font).map(|data| load_face(data));
322
+
let far = graphene_core::text::bounding_box(text, buzz_face, font_size, line_height_ratio, character_spacing,None);
323
+
let quad = Quad::from_box([DVec2::ZERO, far]);
324
+
let transformed_quad = document.metadata().transform_to_viewport(layer)* quad;
325
+
326
+
let mouse = DVec2::new(input.mouse.position.x, input.mouse.position.y);
0 commit comments