From ceff544e1f31f279cd9f12d7777892ac513a5f26 Mon Sep 17 00:00:00 2001 From: Zach-Orvis Date: Thu, 29 Feb 2024 07:23:50 -0600 Subject: [PATCH] Properly downloads zip for summary stats --- ...40b622142f1c98125abcfe89a76a661b0e8e343910 | 2 +- Leaflet.AreaCapture.js | 23 ++++++++----------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/.jekyll-cache/Jekyll/Cache/Jekyll--Cache/b7/9606fb3afea5bd1609ed40b622142f1c98125abcfe89a76a661b0e8e343910 b/.jekyll-cache/Jekyll/Cache/Jekyll--Cache/b7/9606fb3afea5bd1609ed40b622142f1c98125abcfe89a76a661b0e8e343910 index 34f8f6a..d1b7dff 100644 --- a/.jekyll-cache/Jekyll/Cache/Jekyll--Cache/b7/9606fb3afea5bd1609ed40b622142f1c98125abcfe89a76a661b0e8e343910 +++ b/.jekyll-cache/Jekyll/Cache/Jekyll--Cache/b7/9606fb3afea5bd1609ed40b622142f1c98125abcfe89a76a661b0e8e343910 @@ -1 +1 @@ -I"ã{"source"=>"C:/Users/dozac/OneDrive/Documents/GitHub/leaflet-treering", "destination"=>"C:/Users/dozac/OneDrive/Documents/GitHub/leaflet-treering/_site", "collections_dir"=>"", "cache_dir"=>".jekyll-cache", "plugins_dir"=>"_plugins", "layouts_dir"=>"_layouts", "data_dir"=>"_data", "includes_dir"=>"_includes", "collections"=>{"posts"=>{"output"=>true, "permalink"=>"/:categories/:year/:month/:day/:title:output_ext"}}, "safe"=>false, "include"=>["testassets"], "exclude"=>[".sass-cache", ".jekyll-cache", "gemfiles", "Gemfile", "Gemfile.lock", "node_modules", "vendor/bundle/", "vendor/cache/", "vendor/gems/", "vendor/ruby/"], "keep_files"=>[".git", ".svn"], "encoding"=>"utf-8", "markdown_ext"=>"markdown,mkdown,mkdn,mkd,md", "strict_front_matter"=>false, "show_drafts"=>nil, "limit_posts"=>0, "future"=>false, "unpublished"=>false, "whitelist"=>[], "plugins"=>[], "markdown"=>"kramdown", "highlighter"=>"rouge", "lsi"=>false, "excerpt_separator"=>"\n\n", "incremental"=>false, "detach"=>false, "port"=>"4000", "host"=>"127.0.0.1", "baseurl"=>nil, "show_dir_listing"=>false, "permalink"=>"date", "paginate_path"=>"/page:num", "timezone"=>nil, "quiet"=>false, "verbose"=>false, "defaults"=>[], "liquid"=>{"error_mode"=>"warn", "strict_filters"=>false, "strict_variables"=>false}, "kramdown"=>{"auto_ids"=>true, "toc_levels"=>[1, 2, 3, 4, 5, 6], "entity_output"=>"as_char", "smart_quotes"=>"lsquo,rsquo,ldquo,rdquo", "input"=>"GFM", "hard_wrap"=>false, "guess_lang"=>true, "footnote_nr"=>1, "show_warnings"=>false, "syntax_highlighter"=>"rouge", "syntax_highlighter_opts"=>{:default_lang=>"plaintext", :guess_lang=>true}, "coderay"=>{}}, "sass"=>{"load_paths"=>["_sass"]}, "livereload_port"=>35729, "serving"=>true, "watch"=>true, "url"=>"http://localhost:4000"}:ET \ No newline at end of file +I"i{"source"=>"C:/Users/dozac/OneDrive/Documents/GitHub/leaflet-treering", "destination"=>"C:/Users/dozac/OneDrive/Documents/GitHub/leaflet-treering/_site", "collections_dir"=>"", "cache_dir"=>".jekyll-cache", "plugins_dir"=>"_plugins", "layouts_dir"=>"_layouts", "data_dir"=>"_data", "includes_dir"=>"_includes", "collections"=>{"posts"=>{"output"=>true, "permalink"=>"/:categories/:year/:month/:day/:title:output_ext"}}, "safe"=>false, "include"=>["testassets"], "exclude"=>[".sass-cache", ".jekyll-cache", "gemfiles", "Gemfile", "Gemfile.lock", "node_modules", "vendor/bundle/", "vendor/cache/", "vendor/gems/", "vendor/ruby/"], "keep_files"=>[".git", ".svn"], "encoding"=>"utf-8", "markdown_ext"=>"markdown,mkdown,mkdn,mkd,md", "strict_front_matter"=>false, "show_drafts"=>nil, "limit_posts"=>0, "future"=>false, "unpublished"=>false, "whitelist"=>[], "plugins"=>[], "markdown"=>"kramdown", "highlighter"=>"rouge", "lsi"=>false, "excerpt_separator"=>"\n\n", "incremental"=>false, "detach"=>false, "port"=>"4000", "host"=>"127.0.0.1", "baseurl"=>nil, "show_dir_listing"=>false, "permalink"=>"date", "paginate_path"=>"/page:num", "timezone"=>nil, "quiet"=>false, "verbose"=>false, "defaults"=>[], "liquid"=>{"error_mode"=>"warn", "strict_filters"=>false, "strict_variables"=>false}, "kramdown"=>{"auto_ids"=>true, "toc_levels"=>[1, 2, 3, 4, 5, 6], "entity_output"=>"as_char", "smart_quotes"=>"lsquo,rsquo,ldquo,rdquo", "input"=>"GFM", "hard_wrap"=>false, "guess_lang"=>true, "footnote_nr"=>1, "show_warnings"=>false}, "sass"=>{"load_paths"=>["_sass"]}, "livereload_port"=>35729, "serving"=>true, "watch"=>true, "url"=>"http://localhost:4000"}:ET \ No newline at end of file diff --git a/Leaflet.AreaCapture.js b/Leaflet.AreaCapture.js index 14bed0e..493abd0 100644 --- a/Leaflet.AreaCapture.js +++ b/Leaflet.AreaCapture.js @@ -249,20 +249,15 @@ function EllipseCSVDownload(Inte) { let csvStats = this.stats(false); let csvStatsNA = this.stats(true); - console.log(csvRaw) - console.log(csvRawNA) - console.log(csvStats) - console.log(csvStatsNA) - - // let zip = new JSZip(); - // zip.file((Inte.treering.meta.assetName + '_ellipse_raw_data_noNA.csv'), csvRaw); - // zip.file((Inte.treering.meta.assetName + '_ellipse_raw_data_withNA.csv'), csvRawNA); - // zip.file((Inte.treering.meta.assetName + '_ellipse_summary_data_noNA.csv'), csvStats); - // zip.file((Inte.treering.meta.assetName + '_ellipse_summary_data_withNA.csv'), csvStatsNA); - // zip.generateAsync({type: 'blob'}) - // .then((blob) => { - // saveAs(blob, (Inte.treering.meta.assetName + '_ellipses_csv.zip')); - // }); + let zip = new JSZip(); + zip.file((Inte.treering.meta.assetName + '_ellipse_raw_data_noNA.csv'), csvRaw); + zip.file((Inte.treering.meta.assetName + '_ellipse_raw_data_withNA.csv'), csvRawNA); + zip.file((Inte.treering.meta.assetName + '_ellipse_summary_data_noNA.csv'), csvStats); + zip.file((Inte.treering.meta.assetName + '_ellipse_summary_data_withNA.csv'), csvStatsNA); + zip.generateAsync({type: 'blob'}) + .then((blob) => { + saveAs(blob, (Inte.treering.meta.assetName + '_ellipses_csv.zip')); + }); } /**