epam / Indigo

Universal cheminformatics toolkit, utilities and database search tools
http://lifescience.opensource.epam.com
Apache License 2.0
316 stars 104 forks source link

Text above single arrow reaction is not centered #2609

Open Zhirnoff opened 2 weeks ago

Zhirnoff commented 2 weeks ago

Steps to Reproduce

  1. Copy and Paste on canvas

    
    $RDFILE 1
    $DATM    11/05/24 14:47
    $RFMT
    $RXN
    
    -INDIGO- 1105241447
    
    1  1
    $MOL
    
    -INDIGO-11052414472D
    
    6  6  0  0  0  0  0  0  0  0999 V2000
    9.9598   -8.6501    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    11.6902   -8.6496    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    10.8266   -8.1500    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    11.6902   -9.6505    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    9.9598   -9.6550    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    10.8288  -10.1500    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    3  1  2  0  0  0  0
    1  5  1  0  0  0  0
    5  6  2  0  0  0  0
    6  4  1  0  0  0  0
    4  2  2  0  0  0  0
    2  3  1  0  0  0  0
    M  END
    $MOL
    
    -INDIGO-11052414472D
    
    6  6  0  0  0  0  0  0  0  0999 V2000
    18.3598   -8.6001    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    20.0902   -8.5996    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    19.2266   -8.1000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    20.0902   -9.6005    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    18.3598   -9.6050    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    19.2288  -10.1000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    3  1  2  0  0  0  0
    1  5  1  0  0  0  0
    5  6  2  0  0  0  0
    6  4  1  0  0  0  0
    4  2  2  0  0  0  0
    2  3  1  0  0  0  0
    M  END

$DTYPE Name $DATUM Agrsthtyjyil9op98p90i6yrtrwwr6u579po9 $DTYPE Reference $DATUM Not available $DTYPE Reaction Conditions $DATUM Agrsthtyjyil9op98p90i6yrtrwwr6u579po9



**Actual behavior**
Text above single arrow reaction is not centered
![2024-11-05_15h01_48](https://github.com/user-attachments/assets/0608d51c-2ed4-436e-aecf-f3e3ce1efd2b)

**Expected behavior**
Text above single arrow reaction is centered as described in requrements p.3 Dynamic Positioning and Alignment

![2024-11-05_14h59_23](https://github.com/user-attachments/assets/9bb69aa2-4cc8-4bfc-b07c-d902268376c5)

**Desktop:**
 - OS: Windows 11
 - Browser Chrome
 - Version 128.0.6613.120 (Official Build) (64-bit)

**Ketcher version** 
[Version 2.26.0-rc.7]
**Indigo version** 
[Version 1.27.0-dev.1]

Bug foun while pre-testing: https://github.com/epam/Indigo/issues/2559
ivanmaslow commented 4 hours ago

Alignment depends on size of text - it should be fixed: short.zip: image long.zip: image