Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Track caption and readout font size and text truncation #1941

Merged
merged 9 commits into from
Mar 5, 2024
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
29 changes: 5 additions & 24 deletions typescript/packages/well-log-viewer/src/SyncLogViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -985,18 +985,7 @@ class SyncLogViewer extends Component<SyncLogViewerProps, State> {

createRightPanel(): ReactNode {
return (
<div
key="rightPanel"
style={{
flex: "0, 0",
display: "flex",
flexDirection: "column",
height: "100%",
width: "255px",
minWidth: "255px",
maxWidth: "255px",
}}
>
<div key="rightPanel" className="right-panel">
<AxisSelector
header="Primary scale"
axes={this.state.axes}
Expand All @@ -1014,20 +1003,12 @@ class SyncLogViewer extends Component<SyncLogViewerProps, State> {
infos={this.state.infos[index]}
/>
))}
<div style={{ paddingLeft: "10px", display: "flex" }}>
<span>Zoom:</span>
<span
style={{
flex: "1 1 100px",
padding: "0 20px 0 10px",
}}
>
<div className="zoom">
<span className="zoom-label">Zoom:</span>
<span className="zoom-value">
<ZoomSlider
value={this.state.sliderValue}
max={
this.props.welllogOptions?.maxContentZoom ||
256 /*default*/
}
max={this.props.welllogOptions?.maxContentZoom}
onChange={this.onZoomSliderChange}
/>
</span>
Expand Down
72 changes: 32 additions & 40 deletions typescript/packages/well-log-viewer/src/WellLogViewer.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { ReactNode } from "react";
import React, { Component } from "react";

import PropTypes from "prop-types";
Expand Down Expand Up @@ -245,6 +246,36 @@ export default class WellLogViewer extends Component<
this.updateReadoutPanel();
}

createRightPanel(): ReactNode {
return (
<div key="rightPanel" className="right-panel">
<AxisSelector
header="Primary scale"
axes={this.state.axes}
axisLabels={this.props.axisTitles}
value={this.state.primaryAxis}
onChange={this.onChangePrimaryAxis}
/>
<InfoPanel
header="Readout"
onGroupClick={this.onInfoGroupClick}
infos={this.state.infos}
/>
<br />
<div className="zoom">
<span className="zoom-label">Zoom:</span>
<span className="zoom-value">
<ZoomSlider
value={this.state.sliderValue}
max={this.props.options?.maxContentZoom}
onChange={this.onZoomSliderChange}
/>
</span>
</div>
</div>
);
}

render(): JSX.Element {
return (
<div style={{ height: "100%", width: "100%", display: "flex" }}>
Expand All @@ -267,46 +298,7 @@ export default class WellLogViewer extends Component<
onContentSelection={this.onContentSelection}
onTemplateChanged={this.onTemplateChanged}
/>
<div
style={{
flex: "0, 0",
display: "flex",
flexDirection: "column",
height: "100%",
width: "255px",
minWidth: "255px",
maxWidth: "255px",
}}
>
<AxisSelector
header="Primary scale"
axes={this.state.axes}
axisLabels={this.props.axisTitles}
value={this.state.primaryAxis}
onChange={this.onChangePrimaryAxis}
/>
<InfoPanel
header="Readout"
onGroupClick={this.onInfoGroupClick}
infos={this.state.infos}
/>
<br />
<div style={{ paddingLeft: "10px", display: "flex" }}>
<span>Zoom:</span>
<span
style={{
flex: "1 1 100px",
padding: "0 20px 0 10px",
}}
>
<ZoomSlider
value={this.state.sliderValue}
max={this.props.options?.maxContentZoom}
onChange={this.onZoomSliderChange}
/>
</span>
</div>
</div>
{this.createRightPanel()}
</div>
);
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading