Skip to content

Commit

Permalink
Dating bug & cut bug (DataAccess reload)
Browse files Browse the repository at this point in the history
  • Loading branch information
thorn573 committed Jan 23, 2024
1 parent 3a740ec commit b0eb431
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -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
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
5 changes: 5 additions & 0 deletions Leaflet.AreaCapture.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
14 changes: 9 additions & 5 deletions _site/leaflet-treering.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

/**
Expand Down Expand Up @@ -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
}

Expand All @@ -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);
};

Expand Down Expand Up @@ -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();
}
}
Expand All @@ -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');
Expand Down
14 changes: 9 additions & 5 deletions leaflet-treering.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

/**
Expand Down Expand Up @@ -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
}

Expand All @@ -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);
};

Expand Down Expand Up @@ -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();
}
}
Expand All @@ -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');
Expand Down

0 comments on commit b0eb431

Please sign in to comment.