Skip to content

Commit

Permalink
chore: update scale bar position (#1136)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaloster authored Oct 10, 2024
1 parent 358b0a0 commit 6b0933d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .infra/rdev/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ stack:
services:
explorer:
image:
tag: sha-d6f3e23b
tag: sha-29601284
replicaCount: 1
env:
# env vars common to all deployment stages
Expand Down
4 changes: 3 additions & 1 deletion client/src/components/Graph/Graph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1200,8 +1200,10 @@ class Graph extends React.Component<GraphProps, GraphState> {
this.openseadragon.scalebar({
type: Openseadragon.ScalebarType.MICROSCOPY,
pixelsPerMeter: calculatedPixelsPerMeter,
yOffset: 60,
xOffset: 80,
minWidth: "75px",
location: Openseadragon.ScalebarLocation.BOTTOM_LEFT,
location: Openseadragon.ScalebarLocation.BOTTOM_RIGHT,
color: "black",
fontColor: "black",
backgroundColor: "rgba(255, 255, 255, 0.5)",
Expand Down
25 changes: 0 additions & 25 deletions client/src/components/Graph/openseadragon-scalebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,6 @@
this.divElt.style.top = `${location.y}px`;
},
drawMicroscopyScalebar(size, text) {
// this.divElt.style.display = "flex";
// this.divElt.style.alignItems = "flex-end"; // Align the ticks to the bottom
// this.divElt.style.justifyContent = "space-between";

// OG code ****************************************************
this.divElt.style.fontSize = this.fontSize;
this.divElt.style.fontFamily = this.fontFamily;
this.divElt.style.textAlign = "center";
Expand All @@ -286,26 +281,6 @@
this.divElt.style.backgroundColor = this.backgroundColor;
this.divElt.innerHTML = text;
this.divElt.style.width = `${size}px`;

// // New code ****************************************************

// // Create the first label (0)
// const label0 = document.createElement("div");
// label0.className = "label";
// label0.innerHTML = "0";
// label0.style.top = "3px";
// label0.style.fontSize = "12px";

// const tick1 = document.createElement("span");
// tick1.className = "tick";
// tick1.style.position = "absolute";
// tick1.style.top = "10px"; // Align tick above the line
// tick1.style.left = "7px";
// tick1.style.height = "6px"; // Smaller tick
// tick1.style.width = "2px";
// tick1.style.backgroundColor = "black";
// label0.appendChild(tick1);
// this.divElt.appendChild(label0);
},
drawMapScalebar(size, text) {
this.divElt.style.fontSize = this.fontSize;
Expand Down
2 changes: 2 additions & 0 deletions client/src/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ declare module "openseadragon" {
type?: string;
pixelsPerMeter?: number;
minWidth?: string;
yOffset?: number;
xOffset?: number;
location?: string;
color?: string;
fontColor?: string;
Expand Down

0 comments on commit 6b0933d

Please sign in to comment.