Skip to content

Commit

Permalink
draw.js: cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
jordibc committed Feb 13, 2025
1 parent a9c5d42 commit 3492d1d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions ete4/smartview/static/js/draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -437,13 +437,10 @@ function create_item(item, tl, zoom, wmax) {
on_box_wheel(event, box), {passive: false});

// Save information in the box as a data attribute string (.dataset).
if (name || Object.entries(props).length > 0) {

// This will be used for the "tooltip" in on_box_click().
if (name || Object.entries(props).length > 0)
b.dataset.info = (name ? `<i>${name}</i> ` : "") + "<br>" +
(Object.entries(props).map(([k, v]) => `<b>${k}:</b> ${v}`)
.join("<br>"));
// This will be used for the "tooltip" in on_box_click().
}
Object.entries(props).map(([k, v]) => `<b>${k}:</b> ${v}`).join("<br>");

return b;
}
Expand Down

0 comments on commit 3492d1d

Please sign in to comment.