Skip to content

Commit 0c5e85a

Browse files
committed
Round the annotation positions when normalizing
1 parent 12c9e96 commit 0c5e85a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/util/util.rb

+6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ def self.normalize_manifest!(manifest)
1717
[a["time"], a["position"]["x"], a["position"]["y"], a["text"],
1818
a["author"]["id"], a["author"]["uri"], a["author"]["name"]]
1919
end
20+
21+
manifest["annotations"].each do |annotation|
22+
pos = annotation["position"]
23+
pos["x"] = pos["x"].round(5)
24+
pos["y"] = pos["y"].round(5)
25+
end
2026
end
2127

2228
def self.manifest_diff(old, new)

0 commit comments

Comments
 (0)