URI: 
       Corrected the half block drag position. - icy_draw - icy_draw is the successor to mystic draw. fork / mirror
  HTML git clone https://git.drkhsh.at/icy_draw.git
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit ed84c54fd1276f28a17144902508494beaef26c3
   DIR parent f1eea0d2396a2ebdbd917aaa1c8fbe99fb3987ac
  HTML Author: Mike Krüger <mkrueger@posteo.de>
       Date:   Thu, 21 Sep 2023 18:30:10 +0200
       
       Corrected the half block drag position.
       
       Diffstat:
         M src/ui/editor/ansi/mod.rs           |       8 ++++----
       
       1 file changed, 4 insertions(+), 4 deletions(-)
       ---
   DIR diff --git a/src/ui/editor/ansi/mod.rs b/src/ui/editor/ansi/mod.rs
       @@ -691,10 +691,10 @@ impl AnsiEditor {
                    if let Some(mouse_pos) = response.interact_pointer_pos() {
                        let layer_offset = self.get_cur_click_offset();
                        let click_pos2 = calc.calc_click_pos_half_block(mouse_pos);
       -                let half_block_click_pos = Position::new(
       -                    click_pos2.x as i32 - layer_offset.x,
       -                    click_pos2.y as i32 - layer_offset.y,
       -                );
       +                let click_pos2 = Position::new(click_pos2.x as i32, click_pos2.y as i32);
       +
       +                let half_block_layer_offset = Position::new(layer_offset.x, layer_offset.y * 2);
       +                let half_block_click_pos = click_pos2 - half_block_layer_offset;
        
                        let mut c_abs = self.half_block_click_pos;
                        while c_abs != half_block_click_pos {