Finish import_viewer gui

This commit is contained in:
Pieter Vander Vennet 2022-01-24 03:09:21 +01:00
parent cd09efca94
commit 33ef83c4a9
14 changed files with 198 additions and 103 deletions

View file

@ -625,6 +625,13 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
}
return JSON.parse(JSON.stringify(x));
}
public static ParseDate(str: string): Date{
if (str.endsWith(" UTC")) {
str = str.replace(" UTC", "+00")
}
return new Date(str)
}
private static colorDiff(c0: { r: number, g: number, b: number }, c1: { r: number, g: number, b: number }) {
return Math.abs(c0.r - c1.r) + Math.abs(c0.g - c1.g) + Math.abs(c0.b - c1.b);