Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TienHao committed Nov 21, 2024
1 parent 451e680 commit 017d000
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export class CatalogQueryComponent extends React.Component {
<div className={Classes.DIALOG_FOOTER_ACTIONS}>
<AnchorButton intent={Intent.WARNING} disabled={!configStore.isQuerying} onClick={() => CatalogApiService.Instance.cancelQuery(configStore.catalogDB)} text={"Cancel"} />
{configStore.enableLoadVizier ? <AnchorButton intent={Intent.PRIMARY} disabled={disable} onClick={() => this.loadVizierCatalogs()} text={"Load selected"} /> : null}
<Tooltip content={"Pleace select WCS coordinates"} disabled={!appStore.overlayStore.isImgCoordinates} position={Position.BOTTOM} hoverOpenDelay={300}>
<Tooltip content={"Please select WCS coordinates"} disabled={!appStore.overlayStore.isImgCoordinates} position={Position.BOTTOM} hoverOpenDelay={300}>
<AnchorButton intent={Intent.SUCCESS} disabled={disable || !appStore.overlayStore.isImgCoordinates} onClick={() => this.query()} text={"Query"} />
</Tooltip>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/ImageView/Overlay/OverlayComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as _ from "lodash";
import {observer} from "mobx-react";

import {CursorInfo, ImageItem, ImageType, SPECTRAL_TYPE_STRING} from "models";
import {AppStore, OverlayStore, PreferenceStore, SystemType} from "stores";
import {AppStore, OverlayStore, PreferenceStore} from "stores";

import "./OverlayComponent.scss";

Expand Down Expand Up @@ -214,7 +214,7 @@ export class OverlayComponent extends React.Component<OverlayComponentProps> {
const formatStringX = this.props.overlaySettings.numbers.formatStringX;
const formatStyingY = this.props.overlaySettings.numbers.formatStringY;
const explicitSystem = this.props.overlaySettings.global.explicitSystem;
if (formatStringX !== undefined && formatStyingY !== undefined && explicitSystem !== undefined && explicitSystem !== SystemType.Image && frame.validWcs) {
if (formatStringX !== undefined && formatStyingY !== undefined && explicitSystem !== undefined && OverlayStore.Instance.isWcsCoordinates && frame.validWcs) {
AST.set(frame.wcsInfo, `Format(${frame.dirX})=${formatStringX}, Format(${frame.dirY})=${formatStyingY}, System=${explicitSystem},` + dirAxesSetting);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/stores/Frame/FrameStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1932,7 +1932,7 @@ export class FrameStore {
let cursorPosWCS, cursorPosFormatted;
let precisionX = 0;
let precisionY = 0;
if ((this.validWcs || this.isYX || this.isPVImage || this.isUVImage || this.isSwappedZ) && this.overlayStore.isWcsCoordinates) {
if (((this.validWcs || this.isYX) && this.overlayStore.isWcsCoordinates) || this.isPVImage || this.isUVImage || this.isSwappedZ) {
// We need to compare X and Y coordinates in both directions
// to avoid a confusing drop in precision at rounding threshold
const offsetBlock = [
Expand Down

0 comments on commit 017d000

Please sign in to comment.