Skip to content

Commit

Permalink
File Extensions for Import and Export
Browse files Browse the repository at this point in the history
File Extensions for Import and Export
  • Loading branch information
Dexus authored and abebeos committed Dec 10, 2024
1 parent 7d04ec9 commit 615425c
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions main/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,9 @@

dialog.showOpenDialog({ filters: [

{ name: 'CAD formats', extensions: ['svg', 'dxf', 'cdr'] }
{ name: 'CAD formats', extensions: ['svg', 'dxf', 'cdr'] },
{ name: 'SVG', extensions: ['svg'] },
{ name: 'DXF', extensions: ['dxf'] }

],
properties:['openFile', 'multiSelections']
Expand Down Expand Up @@ -1023,7 +1025,12 @@
var exportsvg = document.querySelector('#exportsvg');
exportsvg.onclick = function(){

var fileName = dialog.showSaveDialogSync({title: 'Export Deepnest SVG'});
var fileName = dialog.showSaveDialogSync({
title: 'Export Deepnest SVG',
filters: [
{ name: 'SVG', extensions: ['svg'] }
]
});

if(fileName === undefined){
console.log("No file selected");
Expand Down Expand Up @@ -1051,7 +1058,10 @@
var exportdxf = document.querySelector('#exportdxf');
exportdxf.onclick = function(){
var fileName = dialog.showSaveDialogSync({
title: 'Export Deepnest DXF'
title: 'Export Deepnest DXF',
filters: [
{ name: 'DXF', extensions: ['dxf'] }
]
})

if(fileName === undefined){
Expand Down

0 comments on commit 615425c

Please sign in to comment.