From b0eb431ef0dcc71dd5005ccbfc78ed588bf01188 Mon Sep 17 00:00:00 2001 From: thorn573 <68254973+thorn573@users.noreply.github.com> Date: Tue, 23 Jan 2024 11:40:09 -0600 Subject: [PATCH] Dating bug & cut bug (DataAccess reload) --- ...609ed40b622142f1c98125abcfe89a76a661b0e8e343910 | 2 +- Leaflet.AreaCapture.js | 5 +++++ _site/leaflet-treering.js | 14 +++++++++----- leaflet-treering.js | 14 +++++++++----- 4 files changed, 24 insertions(+), 11 deletions(-) diff --git a/.jekyll-cache/Jekyll/Cache/Jekyll--Cache/b7/9606fb3afea5bd1609ed40b622142f1c98125abcfe89a76a661b0e8e343910 b/.jekyll-cache/Jekyll/Cache/Jekyll--Cache/b7/9606fb3afea5bd1609ed40b622142f1c98125abcfe89a76a661b0e8e343910 index 34f8f6a..b415d9d 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"Ñ{"source"=>"C:/Users/thorn/Documents/GitHub/leaflet-treering", "destination"=>"C:/Users/thorn/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 diff --git a/Leaflet.AreaCapture.js b/Leaflet.AreaCapture.js index 7270f04..7d93bcc 100644 --- a/Leaflet.AreaCapture.js +++ b/Leaflet.AreaCapture.js @@ -226,6 +226,11 @@ function EllipseCSVDownload(Inte) { * @function */ EllipseCSVDownload.prototype.action = function() { + if (Inte.ellipseData.data.length < 1) { + alert("Error: Must create ellipse data ebfore downloading."); + return; + } + // Sort ellipses by year before downloading. Inte.ellipseData.data.sort((a, b) => { if (a.year < b.year) { diff --git a/_site/leaflet-treering.js b/_site/leaflet-treering.js index 2d09aab..50d9ecc 100644 --- a/_site/leaflet-treering.js +++ b/_site/leaflet-treering.js @@ -389,7 +389,7 @@ function MeasurementData (dataObject, Lt) { this.index++; // update every time a point is placed -Lt.helper.updateFunctionContainer(true); + Lt.helper.updateFunctionContainer(true); }; /** @@ -537,6 +537,9 @@ Lt.helper.updateFunctionContainer(true); if (!this.points[1]) { this.earlywood = true; this.year = 0; + + // Updates after points are cut + Lt.helper.updateFunctionContainer(true); return } @@ -561,7 +564,7 @@ Lt.helper.updateFunctionContainer(true); // If first start point removed, create new one. if (!this.points[0].start) this.points[0] = {'start': true, 'skip': false, 'break': false, 'latLng': this.points[0].latLng}; - // updates after points are cut + // Updates after points are cut Lt.helper.updateFunctionContainer(true); }; @@ -3545,6 +3548,10 @@ function Dating(Lt) { Lt.data.year += shift; Lt.visualAsset.reload(); + + // Updates once user hits enter + Lt.helper.updateFunctionContainer(true); + this.disable(); } } @@ -3564,9 +3571,6 @@ function Dating(Lt) { * @function disable */ Dating.prototype.disable = function() { - // updates once user hits enter - Lt.helper.updateFunctionContainer(true); - this.btn.state('inactive'); $(Lt.viewer.getContainer()).off('click'); $(document).off('keypress'); diff --git a/leaflet-treering.js b/leaflet-treering.js index 2d09aab..50d9ecc 100644 --- a/leaflet-treering.js +++ b/leaflet-treering.js @@ -389,7 +389,7 @@ function MeasurementData (dataObject, Lt) { this.index++; // update every time a point is placed -Lt.helper.updateFunctionContainer(true); + Lt.helper.updateFunctionContainer(true); }; /** @@ -537,6 +537,9 @@ Lt.helper.updateFunctionContainer(true); if (!this.points[1]) { this.earlywood = true; this.year = 0; + + // Updates after points are cut + Lt.helper.updateFunctionContainer(true); return } @@ -561,7 +564,7 @@ Lt.helper.updateFunctionContainer(true); // If first start point removed, create new one. if (!this.points[0].start) this.points[0] = {'start': true, 'skip': false, 'break': false, 'latLng': this.points[0].latLng}; - // updates after points are cut + // Updates after points are cut Lt.helper.updateFunctionContainer(true); }; @@ -3545,6 +3548,10 @@ function Dating(Lt) { Lt.data.year += shift; Lt.visualAsset.reload(); + + // Updates once user hits enter + Lt.helper.updateFunctionContainer(true); + this.disable(); } } @@ -3564,9 +3571,6 @@ function Dating(Lt) { * @function disable */ Dating.prototype.disable = function() { - // updates once user hits enter - Lt.helper.updateFunctionContainer(true); - this.btn.state('inactive'); $(Lt.viewer.getContainer()).off('click'); $(document).off('keypress');