Skip to content

Commit

Permalink
Fix date and small scene handling
Browse files Browse the repository at this point in the history
  • Loading branch information
SmilyOrg committed Sep 4, 2022
1 parent e50f101 commit cd749ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion internal/image/exiftool-mostlygeek.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ func (decoder *ExifToolMostlyGeekLoader) DecodeInfo(path string, info *Info) err
if strings.Contains(name, "Date") || strings.Contains(name, "Time") {
if info.DateTime.IsZero() {
info.DateTime, _, _, _ = parseDateTime(value)
} else {
} else if name != "FileModifyDate" && name != "FileCreateDate" {
// Prefer time with timezone if available
t, hasTimezone, _, _ := parseDateTime(value)
if hasTimezone && info.DateTime.Location() == time.UTC {
info.DateTime = t
Expand Down
6 changes: 5 additions & 1 deletion ui/src/components/TileViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ export default {
}
}
const sceneSmallerThanViewport =
this.scene.bounds.w < element.clientWidth ||
this.scene.bounds.h < element.clientHeight;
this.map = new Map({
target: element,
// pixelRatio: 1,
Expand All @@ -171,10 +175,10 @@ export default {
enableRotation: false,
extent,
smoothExtentConstraint: false,
showFullExtent: sceneSmallerThanViewport,
}),
controls: [],
});
console.log(this.map.getView().getMinZoom())
this.map.on("click", event => this.onClick(event));
this.map.on("movestart", event => this.onMoveStart(event));
this.map.on("moveend", event => this.onMoveEnd(event));
Expand Down

0 comments on commit cd749ae

Please sign in to comment.