diff --git a/www/filemanager/index.html b/www/filemanager/index.html index a55bcf0..f4eaa57 100644 --- a/www/filemanager/index.html +++ b/www/filemanager/index.html @@ -13,6 +13,8 @@ + +
diff --git a/www/filemanager/js/main.js b/www/filemanager/js/main.js index 6771203..c9f7ac8 100644 --- a/www/filemanager/js/main.js +++ b/www/filemanager/js/main.js @@ -24,6 +24,7 @@ $("#btnSelectAll").click(selectAll); $("#btnDeselectAll").click(deselectAll); $("#uploads").change(upload); $("#btnDownload").click(download); +$("#btnPancake").click(pancake); $("#btnUpload").click(function(e) { e.preventDefault(); @@ -88,12 +89,18 @@ function loadSketch(list,cb) { function addItem(id,svgData,doPrepend) { var path; +// console.log($getBoundingClientRect().width); + if (!svgData) path = ""; else if (typeof(svgData)!='string') path = ""; else if (svgData.indexOf("CDATA")==-1) path = ""; else path = svgData.split('d="')[1].split('"')[0]; + svgWidth = svgData.split("width=\"")[1].split("\"")[0]; + var item = $('
'); + item.attr("data-width",svgWidth); + var svg = ''; item.click(function() { @@ -265,3 +272,199 @@ function download() { }); } +function pointsToGCode(points) { + var gcode = ""; + var wasMove = false; + for (var i=0; i')[0].click(); +}