diff --git a/api/tests/integration/tests/layout/ref/acs_issue_2458.ket b/api/tests/integration/tests/layout/ref/acs_issue_2458.ket index 89239e4592..30137a1d43 100644 --- a/api/tests/integration/tests/layout/ref/acs_issue_2458.ket +++ b/api/tests/integration/tests/layout/ref/acs_issue_2458.ket @@ -42,12 +42,12 @@ "mode": "open-angle", "pos": [ { - "x": 9.8, + "x": 10.008333, "y": 0.0, "z": 0.0 }, { - "x": 20.216667, + "x": 21.674999, "y": 0.0, "z": 0.0 } @@ -286,8 +286,8 @@ { "label": "P", "location": [ - 10.425, - 1.333333, + 10.668056, + 1.402778, 0.0 ] } @@ -300,8 +300,8 @@ { "label": "P", "location": [ - 12.091667, - 1.333333, + 12.543056, + 1.402778, 0.0 ] } @@ -314,7 +314,7 @@ { "label": "O", "location": [ - 9.175, + 9.348611, 0.0, 0.0 ] @@ -328,8 +328,8 @@ { "label": "O", "location": [ - 14.591668, - 1.333333, + 15.390278, + 1.402778, 0.0 ] } @@ -342,8 +342,8 @@ { "label": "O", "location": [ - 16.258335, - 1.333333, + 17.265278, + 1.402778, 0.0 ] } @@ -356,7 +356,7 @@ { "label": "N", "location": [ - 21.258333, + 22.820831, 1.309017, 0.0 ] @@ -364,7 +364,7 @@ { "label": "C", "location": [ - 22.209391, + 23.771889, 1.0, 0.0 ] @@ -372,7 +372,7 @@ { "label": "C", "location": [ - 20.670547, + 22.233047, 0.5, 0.0 ] @@ -380,7 +380,7 @@ { "label": "C", "location": [ - 22.209391, + 23.771889, -0.0, 0.0 ] @@ -388,7 +388,7 @@ { "label": "N", "location": [ - 23.075417, + 24.637915, 1.5, 0.0 ] @@ -396,7 +396,7 @@ { "label": "N", "location": [ - 21.258333, + 22.820833, -0.309017, 0.0 ] @@ -404,7 +404,7 @@ { "label": "C", "location": [ - 23.075417, + 24.637915, -0.5, 0.0 ] @@ -412,7 +412,7 @@ { "label": "C", "location": [ - 23.941441, + 25.503941, 1.0, 0.0 ] @@ -420,7 +420,7 @@ { "label": "N", "location": [ - 23.941441, + 25.503941, 0.0, 0.0 ] @@ -428,7 +428,7 @@ { "label": "O", "location": [ - 23.075415, + 24.637915, -1.5, 0.0 ] @@ -436,7 +436,7 @@ { "label": "N", "location": [ - 24.807467, + 26.369965, 1.5, 0.0 ] @@ -535,8 +535,8 @@ { "label": "P", "location": [ - 17.091669, - 1.333333, + 18.168055, + 1.402778, 0.0 ] } @@ -549,8 +549,8 @@ { "label": "O", "location": [ - 19.591667, - 1.333333, + 21.015278, + 1.402778, 0.0 ] } diff --git a/core/indigo-core/molecule/src/base_molecule.cpp b/core/indigo-core/molecule/src/base_molecule.cpp index 258a41f0f6..4e81f7ddd5 100644 --- a/core/indigo-core/molecule/src/base_molecule.cpp +++ b/core/indigo-core/molecule/src/base_molecule.cpp @@ -4535,7 +4535,9 @@ void BaseMolecule::getAtomBoundingBox(int atom_idx, float font_size, LABEL_MODE if (font_size <= EPSILON) return; - float symbol_size = font_size * 0.6f; + float constexpr WIDTH_FACTOR = 0.7f; // width of font symbols + + float symbol_size = font_size * WIDTH_FACTOR; if (isPseudoAtom(atom_idx) || isTemplateAtom(atom_idx)) { diff --git a/utils/indigo-service/backend/service/tests/api/indigo_test.py b/utils/indigo-service/backend/service/tests/api/indigo_test.py index 273e1b6209..78c5d709af 100644 --- a/utils/indigo-service/backend/service/tests/api/indigo_test.py +++ b/utils/indigo-service/backend/service/tests/api/indigo_test.py @@ -1670,128 +1670,6 @@ def test_check_overlap(self): result_data["overlapping_atoms"], ) - def test_render_eleptical_arrow(self): - ket = """{ - "root": { - "nodes": [ - { - "$ref": "mol0" - }, - { - "$ref": "mol1" - }, - { - "$ref": "mol2" - }, - { - "type": "arrow", - "data": { - "mode": "elliptical-arc-arrow-open-angle", - "pos": [ - { - "x": 5.799999999999997, - "y": -8.200000000000003, - "z": 0 - }, - { - "x": 7.205569279687058, - "y": -8.200000000000003, - "z": 0 - } - ], - "height": 1 - } - }, - { - "type": "arrow", - "data": { - "mode": "open-angle", - "pos": [ - { - "x": 7.775, - "y": -8.225, - "z": 0 - }, - { - "x": 8.875, - "y": -8.225, - "z": 0 - } - ] - } - }, - { - "type": "plus", - "location": [ - 6.525, - -8.225, - 0 - ], - "prop": {} - } - ], - "connections": [], - "templates": [] - }, - "mol0": { - "type": "molecule", - "atoms": [ - { - "label": "N", - "location": [ - 5.749999999999999, - -8.350000000000001, - 0 - ] - } - ] - }, - "mol1": { - "type": "molecule", - "atoms": [ - { - "label": "O", - "location": [ - 7.3999999999999995, - -8.3, - 0 - ] - } - ] - }, - "mol2": { - "type": "molecule", - "atoms": [ - { - "label": "C", - "location": [ - 9.15, - -8.3, - 0 - ] - } - ] - } -}""" - ref_path = joinPathPy("ref/", __file__) - headers, data = self.get_headers( - { - "output_format": "image/png", - "struct": ket, - } - ) - result = requests.post( - self.url_prefix + "/render", - headers=headers, - data=data, - ) - fname = "render-eleptical-arrow.png" - # with open(os.path.join(ref_path, fname), "wb") as file: - # file.write(result.content) - with open(os.path.join(ref_path, fname), "rb") as file: - ref = file.read() - self.assertEqual(result.content, ref) - def test_check_stereo(self): # up headers, data = self.get_headers( diff --git a/utils/indigo-service/backend/service/tests/api/ref/render-eleptical-arrow.png b/utils/indigo-service/backend/service/tests/api/ref/render-eleptical-arrow.png deleted file mode 100644 index 39157a278f..0000000000 Binary files a/utils/indigo-service/backend/service/tests/api/ref/render-eleptical-arrow.png and /dev/null differ