Skip to content

Commit

Permalink
fix positioning of clip button (#5992)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dagobert42 authored Jan 26, 2022
1 parent bab4271 commit 12f1c19
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions frontend/javascripts/oxalis/view/left-border-tabs/histogram_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { updateLayerSettingAction } from "oxalis/model/actions/settings_actions"
import Store, { type DatasetLayerConfiguration } from "oxalis/store";
import api from "oxalis/api/internal_api";
import Toast from "libs/toast";
import { div } from "../../shaders/utils.glsl";

type OwnProps = {|
data: APIHistogramData,
Expand Down Expand Up @@ -285,25 +286,32 @@ class Histogram extends React.PureComponent<HistogramProps, HistogramState> {
const tooltipText = `Automatically clip the histogram to enhance contrast. ${editModeAddendum}`;
return (
<React.Fragment>
<div
style={{
position: "relative",
width: 22,
top: -22,
left: 237,
}}
>
<Tooltip title={tooltipText}>
<VerticalAlignMiddleOutlined
style={{
position: "relative",
transform: "rotate(90deg)",
cursor: "pointer",
}}
onClick={() => this.clipHistogram(isInEditMode, layerName)}
/>
</Tooltip>
</div>
<canvas
ref={ref => {
this.canvasRef = ref;
}}
width={canvasWidth}
height={canvasHeight}
/>
<Tooltip title={tooltipText}>
<VerticalAlignMiddleOutlined
style={{
position: "absolute",
transform: "rotate(90deg)",
top: 14,
right: 82,
cursor: "pointer",
}}
onClick={() => this.clipHistogram(isInEditMode, layerName)}
/>
</Tooltip>
<Slider
range
value={[intensityRangeMin, intensityRangeMax]}
Expand Down

0 comments on commit 12f1c19

Please sign in to comment.