summaryrefslogtreecommitdiff
path: root/assets/static/vendor/leaflet-elevation/src/handlers/heart.js
diff options
context:
space:
mode:
authorDennis Fink2026-11-03 23:18:23 +0100
committerDennis Fink2026-11-03 23:18:23 +0100
commitebe123a6d40bf17ab2a35f331fb08c8c0fc76a3a (patch)
tree441d3a817736e9db25d5c14aa3938c0392166160 /assets/static/vendor/leaflet-elevation/src/handlers/heart.js
parent7f4de25eb8abca76a619bc70bb0fce7e8be36561 (diff)
downloaddennisfink.me-ebe123a6d40bf17ab2a35f331fb08c8c0fc76a3a.tar.gz
dennisfink.me-ebe123a6d40bf17ab2a35f331fb08c8c0fc76a3a.zip
Update vendored Leaflet Elevation and map dependencies
Diffstat (limited to '')
-rw-r--r--assets/static/vendor/leaflet-elevation/src/handlers/heart.js104
1 files changed, 52 insertions, 52 deletions
diff --git a/assets/static/vendor/leaflet-elevation/src/handlers/heart.js b/assets/static/vendor/leaflet-elevation/src/handlers/heart.js
index 1930f60..1e81b3a 100644
--- a/assets/static/vendor/leaflet-elevation/src/handlers/heart.js
+++ b/assets/static/vendor/leaflet-elevation/src/handlers/heart.js
@@ -1,53 +1,53 @@
-export function Heart() {
-
- const _ = L.Control.Elevation.Utils;
-
- return {
- name: 'heart', // <-- Your custom option name (eg. "heart: true")
- unit: 'bpm',
- meta: 'hr', // <-- point.meta.hr
- coordinateProperties: ["heart", "heartRates", "heartRate"], // List of GPX Extensions ("coordinateProperties") to be handled by "@tmcw/toGeoJSON"
- pointToAttr: (point, i) => (point.hr ?? point.meta.hr ?? point.prev('heart')) || 0,
- stats: { max: _.iMax, min: _.iMin, avg: _.iAvg },
- scale: {
- axis : "y",
- position : "left",
- scale : { min: -1, max: +1 },
- tickPadding: 25,
- labelX : -30,
- labelY : -8,
- },
- path: {
- label : 'ECG',
- yAttr : 'heart',
- scaleX : 'distance',
- scaleY : 'heart',
- color : 'white',
- strokeColor : 'red',
- strokeOpacity: "0.85",
- fillOpacity : "0.1",
- },
- tooltip: {
- chart: (item) => L._("hr: ") + item.heart + " " + 'bpm',
- marker: (item) => Math.round(item.heart) + " " + 'bpm',
- order: 1
- },
- summary: {
- "minbpm": {
- label: "Min BPM: ",
- value: (track, unit) => Math.round(track.heart_min || 0) + '&nbsp;' + unit,
- // order: 30
- },
- "maxbpm": {
- label: "Max BPM: ",
- value: (track, unit) => Math.round(track.heart_max || 0) + '&nbsp;' + unit,
- // order: 30
- },
- "avgbpm": {
- label: "Avg BPM: ",
- value: (track, unit) => Math.round(track.heart_avg || 0) + '&nbsp;' + unit,
- // order: 20
- },
- }
- };
+export function Heart() {
+
+ const _ = L.Control.Elevation.Utils;
+
+ return {
+ name: 'heart', // <-- Your custom option name (eg. "heart: true")
+ unit: 'bpm',
+ meta: 'hr', // <-- point.meta.hr
+ coordinateProperties: ["heart", "heartRates", "heartRate"], // List of GPX Extensions ("coordinateProperties") to be handled by "@tmcw/toGeoJSON"
+ pointToAttr: (point, i) => (point.hr ?? point.meta.hr ?? point.prev('heart')) || 0,
+ stats: { max: _.iMax, min: _.iMin, avg: _.iAvg },
+ scale: {
+ axis : "y",
+ position : "left",
+ scale : { min: -1, max: +1 },
+ tickPadding: 25,
+ labelX : -30,
+ labelY : -8,
+ },
+ path: {
+ label : 'ECG',
+ yAttr : 'heart',
+ scaleX : 'distance',
+ scaleY : 'heart',
+ color : 'white',
+ strokeColor : 'red',
+ strokeOpacity: "0.85",
+ fillOpacity : "0.1",
+ },
+ tooltip: {
+ chart: (item) => L._("hr: ") + item.heart + " " + 'bpm',
+ marker: (item) => Math.round(item.heart) + " " + 'bpm',
+ order: 1
+ },
+ summary: {
+ "minbpm": {
+ label: "Min BPM: ",
+ value: (track, unit) => Math.round(track.heart_min || 0) + '&nbsp;' + unit,
+ // order: 30
+ },
+ "maxbpm": {
+ label: "Max BPM: ",
+ value: (track, unit) => Math.round(track.heart_max || 0) + '&nbsp;' + unit,
+ // order: 30
+ },
+ "avgbpm": {
+ label: "Avg BPM: ",
+ value: (track, unit) => Math.round(track.heart_avg || 0) + '&nbsp;' + unit,
+ // order: 20
+ },
+ }
+ };
}; \ No newline at end of file