Issue #11: fix user and time modes.

This commit is contained in:
Sergey Vartanov 2020-08-26 09:54:15 +03:00
parent f452a08177
commit f88f3b9f50
3 changed files with 26 additions and 16 deletions

View file

@ -219,6 +219,8 @@ class Constructor:
nodes = way.nodes
if self.mode == "user-coloring":
if not way:
return
user_color = get_user_color(way.user, self.seed)
self.ways.append(
Way("way", nodes, path,
@ -629,8 +631,10 @@ class Constructor:
if self.mode == "user-coloring":
fill = get_user_color(node.user, self.seed)
shapes = ["small"]
if self.mode == "time":
fill = get_time_color(node.timestamp)
shapes = ["small"]
# for k in tags:
# if k in processed or self.no_draw(k):
@ -664,4 +668,4 @@ class Constructor:
# print("Tags processed: " + str(processed_tags) + ", tags skipped: " +
# str(skipped_tags) + " (" +
# str(processed_tags / float(
# processed_tags + skipped_tags) * 100) + " %).")
# processed_tags + skipped_tags) * 100) + " %).")