Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 0 additions & 45 deletions client/src/components/SpectrogramViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@
const scaledWidth = ref(0);
const scaledHeight = ref(0);
const imageCursorRef: Ref<HTMLElement | undefined> = ref();
const tileURL = props.spectroInfo.spectroId
? `${window.location.protocol}//${window.location.hostname}:${window.location.port}/api/v1/dynamic/spectrograms/${props.spectroInfo.spectroId}/tiles/{z}/{x}/{y}.png/`
: "";
const setCursor = (newCursor: string) => {
cursor.value = newCursor;
};
Expand Down Expand Up @@ -160,24 +157,12 @@
scaledWidth.value,
scaledHeight.value,
false,
props.image ? "quad" : "tile",
tileURL
);
geoJS.getGeoViewer().value.geoOn(geo.event.mousemove, mouseMoveEvent);
}
}
if (props.image) {
geoJS.drawImage(props.image, scaledWidth.value, scaledHeight.value);
} else {
const scaledTileWidth = (scaledWidth.value / props.spectroInfo?.width) * 256;
const scaledTileHeight = (scaledHeight.value / props.spectroInfo?.height) * 256;
geoJS.updateMapSize(
tileURL,
scaledWidth.value,
scaledHeight.value,
scaledTileWidth,
scaledTileHeight
);
}
initialized.value = true;
emit("geoViewerRef", geoJS.getGeoViewer());
Expand All @@ -191,7 +176,7 @@
baseHeight = naturalHeight;
} else if (props.spectroInfo) {
baseWidth = props.spectroInfo.width;
baseHeight = props.spectroInfo.height;

Check warning on line 179 in client/src/components/SpectrogramViewer.vue

View workflow job for this annotation

GitHub Actions / Lint [eslint]

'baseHeight' is assigned a value but never used
}
scaledWidth.value = baseWidth * scaledVals.value.x; // Maintain aspect ratio
if (scaledWidth.value < baseWidth) {
Expand All @@ -199,16 +184,6 @@
}
if (props.image) {
geoJS.drawImage(props.image, scaledWidth.value, scaledHeight.value, false);
} else {
const scaledTileWidth = (scaledWidth.value / baseWidth) * 256;
const scaledTileHeight = (scaledHeight.value / baseHeight) * 256;
geoJS.updateMapSize(
tileURL,
scaledWidth.value,
scaledHeight.value,
scaledTileWidth,
scaledTileHeight
);
}
}

Expand Down Expand Up @@ -316,16 +291,6 @@

if (props.image) {
geoJS.drawImage(props.image, scaledWidth.value, scaledHeight.value, false);
} else if (tileURL) {
const scaledTileWidth = (scaledWidth.value / baseWidth) * 256;
const scaledTileHeight = (scaledHeight.value / baseHeight) * 256;
geoJS.updateMapSize(
tileURL,
scaledWidth.value,
scaledHeight.value,
scaledTileWidth,
scaledTileHeight
);
}
} else if (event.shiftKey) {
if (event.deltaY > 0) {
Expand All @@ -344,16 +309,6 @@
}
if (props.image) {
geoJS.drawImage(props.image, scaledWidth.value, scaledHeight.value, false);
} else {
const scaledTileWidth = (scaledWidth.value / baseWidth) * 256;
const scaledTileHeight = (scaledHeight.value / baseHeight) * 256;
geoJS.updateMapSize(
tileURL,
scaledWidth.value,
scaledHeight.value,
scaledTileWidth,
scaledTileHeight
);
}
}
};
Expand Down
Loading
Loading