Fix bug in making new xlinks (#1105)

This commit is contained in:
Tim Wilkinson 2024-02-29 16:32:45 -08:00 committed by GitHub
parent 6d81b4c846
commit 6f30ab1cc5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -598,7 +598,7 @@ html.print([[
const row = document.createElement("tr");
row.innerHTML = "<td><input type='text' value=''></td><td><input type='text' value=''></td><td><input type='text' value=''></td><td><input type='text' value='0'></td>]]
.. (function() local s = "<td" if #layout.ports <= 1 then s = s .. " style='display:none'" end s = s .. "><select>" for pos, port in ipairs(layout.ports) do s = s .. "<option value='" .. port .. "'>" .. pos .. "</option>" end return s .. "</select></td>" end)()
.. [[<td><button onclick='xlink_remove(this)'>-</button></td>"
.. [[<td><input type='hidden' value=''><button onclick='xlink_remove(this)'>-</button></td>"
tbody.appendChild(row)
validate();
}
@ -759,7 +759,7 @@ do
do
html.print("<option value='" .. port .. "'" .. (xlink.port == port and " selected" or "") .. ">" .. pos .. "</option>")
end
html.print("</td></select>")
html.print("</select></td>")
html.print("<td><input type='hidden' value='" .. xlink.mac .. "'><button onclick='xlink_remove(this)'>-</button></td>")
html.print("</tr>")
end