From 07c39c0780dee7a6ee9647e2d783595f7512c79a Mon Sep 17 00:00:00 2001 From: reschan Date: Sat, 9 Jul 2022 11:13:09 +0700 Subject: [PATCH] fix: multiple transform on an image --- js/atree.js | 10 ++++++---- media/atree/highlight_t_2_a_f.png | Bin 0 -> 5881 bytes 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 media/atree/highlight_t_2_a_f.png diff --git a/js/atree.js b/js/atree.js index 630dbc4..6f160a9 100644 --- a/js/atree.js +++ b/js/atree.js @@ -1168,7 +1168,9 @@ function atree_set_edge(atree_connectors_map, parent, child, state) { let connector_img = atree_parse_connector(render_state, ctype, rotate); connector_img_elem.src = connector_img.img - connector_elem.className = ""; + if (connector_img.rotate != "flip") { + connector_elem.className = ""; + } connector_elem.classList.add("rotate-" + connector_img.rotate); connector_elem.replaceChildren(connector_img_elem); continue; @@ -1207,19 +1209,19 @@ function atree_parse_connector(orient, type, rotate) { let t_connector_dict = { 0: { "1100": {attrib: "_2_l", rotate: 0}, - "1001": {attrib: "_2_a", rotate: "flip"}, + "1001": {attrib: "_2_a_f", rotate: 0}, "0101": {attrib: "_2_a", rotate: 0}, "1101": {attrib: "_3", rotate: 0}, }, 90: { - "1010": {attrib: "_2_a", rotate: "flip"}, + "1010": {attrib: "_2_a_f", rotate: 90}, "1001": {attrib: "_2_a", rotate: 90}, "0011": {attrib: "_2_l", rotate: 90}, "1011": {attrib: "_3", rotate: 90} }, 270: { "0110": {attrib: "_2_a", rotate: 270}, - "0101": {attrib: "_2_a", rotate: "flip"}, + "0101": {attrib: "_2_a_f", rotate: 270}, "0011": {attrib: "_2_l", rotate: 270}, "0111": {attrib: "_3", rotate: 270} } diff --git a/media/atree/highlight_t_2_a_f.png b/media/atree/highlight_t_2_a_f.png new file mode 100644 index 0000000000000000000000000000000000000000..08d4a3402fe1d030d6c425d157387f6a52887b74 GIT binary patch literal 5881 zcmeHLdt6NG`k(GZIiVtzF>TY>s`+hTg2!l|FpPMS3b(*mJ~PTy!p6J)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