mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-09-06 02:12:55 +00:00
time data management
This commit is contained in:
@@ -17,7 +17,10 @@
|
||||
}
|
||||
|
||||
function computeValue() {
|
||||
return maybeParseInt(hours) * 3600 + maybeParseInt(minutes) * 60 + maybeParseInt(seconds);
|
||||
return Math.max(
|
||||
maybeParseInt(hours) * 3600 + maybeParseInt(minutes) * 60 + maybeParseInt(seconds),
|
||||
1
|
||||
);
|
||||
}
|
||||
|
||||
function updateValue() {
|
||||
@@ -31,7 +34,7 @@
|
||||
minutes = '--';
|
||||
seconds = '--';
|
||||
} else if (value !== computeValue()) {
|
||||
let rounded = Math.round(value);
|
||||
let rounded = Math.max(Math.round(value), 1);
|
||||
if (showHours) {
|
||||
hours = Math.floor(rounded / 3600);
|
||||
minutes = Math.floor((rounded % 3600) / 60)
|
||||
|
Reference in New Issue
Block a user