fix: use cvlp file extension for json export
This commit is contained in:
parent
fff1b48c43
commit
ed4f7fbb46
|
@ -112,9 +112,9 @@
|
|||
var select = document.getElementById("filetype")
|
||||
var filetype = select.options[select.selectedIndex].value
|
||||
switch (filetype) {
|
||||
case 'json':
|
||||
case 'cvlp':
|
||||
var blob = new Blob([JSON.stringify(logo, null, '\t')], {type: "application/json"})
|
||||
saveAs(blob, "oshw_logo.json")
|
||||
saveAs(blob, "oshw_logo.cvlp")
|
||||
break
|
||||
case 'svg':
|
||||
var blob = new Blob([new XMLSerializer().serializeToString(json2svg(logo))], {type: "image/svg+xml"})
|
||||
|
@ -137,7 +137,7 @@
|
|||
break
|
||||
case 'zip':
|
||||
var zip = new JSZip()
|
||||
zip.file("oshw_logo.json", JSON.stringify(logo, null, '\t'))
|
||||
zip.file("oshw_logo.cvlp", JSON.stringify(logo, null, '\t'))
|
||||
zip.file("oshw_logo.svg", new XMLSerializer().serializeToString(json2svg(logo)))
|
||||
zip.file("oshw_logo.fp", json2pcb(logo))
|
||||
zip.file("oshw_logo.kicad_mod", json2kicad(logo))
|
||||
|
@ -201,7 +201,7 @@
|
|||
chip thickness: <input id="chip_thickness_input" type="number" step="any" value=1.0 min=0 onchange="draw()"/><br />
|
||||
text thickness: <input id="text_thickness_input" type="number" step="any" value=1.0 min=0 onchange="draw()"/><br />
|
||||
<button type="button" onclick="download()">save</button>: <select id="filetype">
|
||||
<option value="json">CuVoodoo Land Pattern (.json)</option>
|
||||
<option value="cvlp">CuVoodoo Land Pattern (.cvlp)</option>
|
||||
<option value="svg">Scalable Vector Graphics (.svg)</option>
|
||||
<option value="pcb">gEDA pcb footprint (.fp)</option>
|
||||
<option value="kicad">KiCad s-expr. footprint (.kicad_mod)</option>
|
||||
|
|
Loading…
Reference in New Issue