Skip to content

Commit

Permalink
multicamera unclamping (#1252)
Browse files Browse the repository at this point in the history
* multicamera unclamping

* fixing type error

* mend

* changing default camera text

Co-authored-by: BryonCLewis <[email protected]>
  • Loading branch information
BryonLewis and BryonLewis authored May 31, 2022
1 parent e8dcd95 commit 6fae2f6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
3 changes: 1 addition & 2 deletions client/dive-common/components/ImportMultiCamDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,7 @@ export default defineComponent({
outlined
dense
>
Visualization currently doesn't support multi views so please choose
a list of images or video to display by default when viewing
Please choose the camera which will be selected by default when the loading the dataset.
</v-alert>
<div>
<div>
Expand Down
12 changes: 9 additions & 3 deletions client/src/components/annotators/useMediaController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,15 @@ export function useMediaController() {
// 4x zoom max
max: 4,
});
geoViewerRef.value.clampBoundsX(true);
geoViewerRef.value.clampBoundsY(true);
geoViewerRef.value.clampZoom(true);
if (Object.keys(geoViewers).length === 1) {
geoViewerRef.value.clampBoundsX(true);
geoViewerRef.value.clampBoundsY(true);
geoViewerRef.value.clampZoom(true);
} else {
geoViewerRef.value.clampBoundsX(false);
geoViewerRef.value.clampBoundsY(false);
geoViewerRef.value.clampZoom(false);
}
resetZoom();
}

Expand Down
2 changes: 1 addition & 1 deletion server/dive_utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def strNumericCompare(input1: str, input2: str) -> int:
return -1
if type(b) == int:
return 1
return 1 if a > b else -1
return 1 if str(a) > str(b) else -1
return 0


Expand Down
2 changes: 1 addition & 1 deletion server/dive_utils/serializers/meva.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def load_kpf_as_tracks(readers: List[Iterable[ByteString]]):
error_report: Dict[str, str] = {}
try:
for reader in readers:
rows = b"".join(list(reader)).decode("utf-8")
rows = ''.join([str(elem) for elem in reader])
yml = kpf.load_yaml(rows)
for row in yml:
if kpf.TYPES in row:
Expand Down

0 comments on commit 6fae2f6

Please sign in to comment.