Skip to content

Commit

Permalink
simplify cell construction: remove unneeded div
Browse files Browse the repository at this point in the history
  • Loading branch information
justvanrossum committed Sep 17, 2023
1 parent 4b90e09 commit cd17e46
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions src/fontra/views/editor/panel-designspace-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -912,24 +912,17 @@ function makeIconCellFactory(iconPaths, triggerOnDoubleClick = false) {
}

function interpolationErrorCell(item, colDesc) {
const iconElement = html.createDomElement("inline-svg", {
src: "/tabler-icons/bug.svg",
});
return item[colDesc.key]
? html.div(
{
style: "width: 1.2em; height: 1.2em; color: #F36;",
onclick: (event) => {
event.stopImmediatePropagation();
dialog(
"The source has an interpolation incompatibility",
item[colDesc.key],
[{ title: "Okay" }]
);
},
? html.createDomElement("inline-svg", {
src: "/tabler-icons/bug.svg",
style: "width: 1.2em; height: 1.2em; color: #F36;",
onclick: (event) => {
event.stopImmediatePropagation();
dialog("The source has an interpolation incompatibility", item[colDesc.key], [
{ title: "Okay" },
]);
},
[iconElement]
)
})
: "";
}

Expand Down

0 comments on commit cd17e46

Please sign in to comment.