From 2ceb654d58fa742be3ee8010e546afb40f62d145 Mon Sep 17 00:00:00 2001 From: thorn573 <68254973+thorn573@users.noreply.github.com> Date: Tue, 6 Feb 2024 10:41:06 -0600 Subject: [PATCH 1/2] RWL year fix --- Leaflet.DataAccess.js | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/Leaflet.DataAccess.js b/Leaflet.DataAccess.js index d146868..93544ea 100644 --- a/Leaflet.DataAccess.js +++ b/Leaflet.DataAccess.js @@ -654,11 +654,12 @@ function Download(Inte) { let name = this.constructNameRWL(Inte.treering.meta.assetName); let year = dat.tw.x[0]; + let yearStr = this.formatYearRWL(year); let stopMarker = " -9999"; - let outTWStr = name + dat.tw.x[0] + this.formatDataPointRWL(dat.tw.y[0]); + let outTWStr = name + yearStr + this.formatDataPointRWL(dat.tw.y[0]); // If data begins on a year ending in '9', begin newline immediately. - if ((year + 1) % 10 == 0) outTWStr += "\n" + name + (year + 1);; + if ((year + 1) % 10 == 0) outTWStr += "\n" + name + this.formatYearRWL(year + 1);; let outEWStr = ""; let outLWStr = ""; @@ -667,11 +668,14 @@ function Download(Inte) { let yearEW = dat.ew.x[0]; let yearLW = dat.lw.x[0]; - outEWStr = name + yearEW + this.formatDataPointRWL(dat.ew.y[0]); - outLWStr = name + yearLW + this.formatDataPointRWL(dat.lw.y[0]); + let yearEWStr = this.formatYearRWL(yearEW); + let yearLWStr = this.formatYearRWL(yearLW); - if ((yearEW + 1) % 10 == 0) outEWStr += "\n" + name + (yearEW + 1);; - if ((yearLW + 1) % 10 == 0) outLWStr += "\n" + name + (yearLW + 1);; + outEWStr = name + yearEWStr + this.formatDataPointRWL(dat.ew.y[0]); + outLWStr = name + yearLWStr + this.formatDataPointRWL(dat.lw.y[0]); + + if ((yearEW + 1) % 10 == 0) outEWStr += "\n" + name + this.formatYearRWL(yearEW + 1);; + if ((yearLW + 1) % 10 == 0) outLWStr += "\n" + name + this.formatYearRWL(yearLW + 1);; } for (let i = 1; i < dat.tw.x.length; i++) { @@ -684,11 +688,12 @@ function Download(Inte) { } if ((year + 1) % 10 == 0) { - outTWStr += "\n" + name + (year + 1); + yearStr = this.formatYearRWL(year + 1); + outTWStr += "\n" + name + yearStr; if (dat?.ew) { - outEWStr += "\n" + name + (year + 1); - outLWStr += "\n" + name + (year + 1); + outEWStr += "\n" + name + yearStr; + outLWStr += "\n" + name + yearStr; } } } @@ -702,6 +707,19 @@ function Download(Inte) { else this.zipFiles("rwl", "txt", outTWStr); } + /** + * Converts year value into RWL format. + * @function + * + * @param {integer} year - Year value. + */ + Download.prototype.formatYearRWL = function(year) { + year = String(year); + year = " ".repeat(4 - year.length) + year; + + return year; + } + /** * Converts measurement points into RWL format. * @function From f19e1bb40193b1a1283fe67d97afd82fd5c74ef0 Mon Sep 17 00:00:00 2001 From: thorn573 <68254973+thorn573@users.noreply.github.com> Date: Tue, 6 Feb 2024 11:28:21 -0600 Subject: [PATCH 2/2] Increased font size --- _site/leaflet-treering.js | 16 +++++++------- _site/style.css | 46 +++++++++++++++++++++------------------ coreassets/templates.html | 8 +++---- leaflet-treering.js | 16 +++++++------- style.css | 46 +++++++++++++++++++++------------------ 5 files changed, 70 insertions(+), 62 deletions(-) diff --git a/_site/leaflet-treering.js b/_site/leaflet-treering.js index 37a7061..07e5458 100644 --- a/_site/leaflet-treering.js +++ b/_site/leaflet-treering.js @@ -1905,14 +1905,14 @@ function AnnotationAsset(Lt) { this.annotationIcon = this.markers[this.index]; }; - let size = this.annotationDialogSize || [284, 265]; + let size = this.annotationDialogSize || [310, 265]; let anchor = this.annotationDialogAnchor || [50, 5]; // handlebars from template.html let content = document.getElementById("annotation-dialog-window-template").innerHTML; this.dialogAnnotationWindow = L.control.dialog({ - 'minSize': [284, 265], + 'minSize': [310, 265], 'maxSize': [Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER], 'size': size, 'anchor': anchor, @@ -3872,7 +3872,7 @@ function DeletePoint(Lt) { this.desc= "To delete existing points, you must adjust the dating of earlier or later points"; this.optA = "shift dating of later points back in time"; this.optB = "shift dating of earlier points forward in time"; - this.size = [280, 240]; + this.size = [318, 230]; this.adjustOuter = false; this.selectedAdjustment = false; this.maintainAdjustment = false; @@ -3911,7 +3911,7 @@ function Cut(Lt) { this.desc = "To delete all points between two selected points, you must adjust the dating of earlier or later points."; this.optA = "shift dating of later points back in time"; this.optB = "shift dating of earlier points forward in time"; - this.size = [280, 240]; + this.size = [320, 240]; this.adjustOuter = false; this.selectedAdjustment = false; this.maintainAdjustment = false; @@ -4003,7 +4003,7 @@ function InsertPoint(Lt) { this.desc = "To insert points along a path between two existing points, you must adjust the dating of earlier or later points."; this.optA = "shift dating of later points forward in time"; this.optB = "shift dating of earlier points back in time"; - this.size = [280, 240]; + this.size = [312, 242]; this.adjustOuter = false; this.selectedAdjustment = false; this.maintainAdjustment = false; @@ -4108,7 +4108,7 @@ function ConvertToStartPoint(Lt) { this.desc = "To convert existing measurement points to a start point, you must adjust the dating of earlier or later points."; this.optA = "shift dating of later points back in time"; this.optB = "shift dating of earlier points forward in time"; - this.size = [280, 240]; + this.size = [322, 242]; this.adjustOuter = false; this.selectedAdjustment = false; this.maintainAdjustment = false; @@ -4180,7 +4180,7 @@ function InsertZeroGrowth(Lt) { this.desc = "To insert a zero width year, you must adjust the dating of earlier or later points."; this.optA = "shift dating of later points forward in time"; this.optB = "shift dating of earlier points back in time"; - this.size = [280, 240]; + this.size = [312, 230]; this.adjustOuter = false; this.selectedAdjustment = false; this.maintainAdjustment = false; @@ -4934,7 +4934,7 @@ function KeyboardShortCutDialog (Lt) { let anchor = this.anchor || [1, 442]; this.dialog = L.control.dialog ({ - 'size': [310, 380], + 'size': [320, 380], 'anchor': anchor, 'initOpen': true, 'position': 'topleft', diff --git a/_site/style.css b/_site/style.css index 7f7f0f7..d978948 100644 --- a/_site/style.css +++ b/_site/style.css @@ -60,18 +60,18 @@ font-size: 1.5em; } .icon-button{ -background-color: #6200ee; -height: 30px; -width: 30px; -color: white; -justify-content: center; -position: sticky; -left: 10px; -margin-right: 20px; -margin-bottom: 11px; -border-color: #A06DEB; -vertical-align: middle; -text-align: center; + background-color: #6200ee; + height: 30px; + width: 30px; + color: white; + justify-content: center; + position: sticky; + left: 10px; + margin-right: 20px; + margin-bottom: 11px; + border-color: #A06DEB; + vertical-align: middle; + text-align: center; } .text-button{ @@ -145,6 +145,10 @@ th { margin: 4px; } +.MeasurementOptions-radio-btn { + font-size: 14px; +} + .preferences-button { font-size: 16px; text-align: center; @@ -181,7 +185,7 @@ th { #keyboardShortcutDiv span { margin-left: 10px; margin-bottom: 5px; - font-size: 12px; + font-size: 14px; display: inline; } @@ -205,7 +209,7 @@ th { } #shift-container p { - font-size: 10px; + font-size: 14px; font-weight: normal; color: #7d7d7d; margin: 0; @@ -225,7 +229,7 @@ th { } #shift-container label { - font-size: 12px; + font-size: 14px; font-weight: normal; color: black; margin: 0; @@ -277,7 +281,7 @@ th { padding: 6px 11px; border: none; border-top: none; - font-size: 12px; + font-size: 14px; margin-top: 0; width: 100%; } @@ -305,7 +309,7 @@ textarea { } .text-content { - font-size: 12px; + font-size: 14px; word-wrap: break-word; } @@ -317,7 +321,7 @@ textarea { } .summaryAttributesDiv li { - font-size: 12px; + font-size: 14px; } .summaryLinkDiv { @@ -329,7 +333,7 @@ textarea { } .editAttributesDiv p { - font-size: 12px; + font-size: 14px; margin: 0 0 0 10px; display: inline; } @@ -340,13 +344,13 @@ textarea { .editAttributesDiv label { font-weight: normal; - font-size: 12px; + font-size: 14px; margin-left: 2px; } .attribute-label { margin-bottom: 0; - font-size: 12px; + font-size: 14px; } .attribute-textbox { diff --git a/coreassets/templates.html b/coreassets/templates.html index 2ba0955..bb1defc 100644 --- a/coreassets/templates.html +++ b/coreassets/templates.html @@ -88,11 +88,11 @@
♧ ♧ ♧ ♧ ♧ ♧ ♧ ♧ ♧ ♧
Please note: Once measurements are initiated, these preferences are set. To modify, delete all existing points for this asset and initiate a new set of measurements.