Skip to content

Commit

Permalink
tab widget visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
magland committed Apr 26, 2024
1 parent 5391640 commit ad751f7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const TabWidget: FunctionComponent<PropsWithChildren<Props>> = ({children, tabs,
children2.map((c, i) => {
const visible = i === currentTabIndex
return (
<div key={`child-${i}`} style={{visibility: visible ? 'visible' : 'hidden', overflowY: 'hidden', overflowX: 'hidden', position: 'absolute', left: 0, top: tabBarHeight, width: W, height: H}}>
<div key={`child-${i}`} style={{visibility: visible ? undefined : 'hidden', overflowY: 'hidden', overflowX: 'hidden', position: 'absolute', left: 0, top: tabBarHeight, width: W, height: H}}>
<c.type {...c.props} width={W} height={H - tabBarHeight}/>
</div>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const sortingCurationReducer = (state: SortingCuration, action: SortingCu
const uids: (number | string)[] = typeof(action.unitId) === 'object' ? action.unitId : [action.unitId]
const newLabelsByUnit = {...(state.labelsByUnit || {})}
let somethingChanged = false
for (let uid of uids) {
for (const uid of uids) {
const labels = newLabelsByUnit[uid + ''] || []
if (!labels.includes(action.label)) {
somethingChanged = true
Expand Down Expand Up @@ -62,7 +62,7 @@ export const sortingCurationReducer = (state: SortingCuration, action: SortingCu
const uids: (number | string)[] = typeof(action.unitId) === 'object' ? action.unitId : [action.unitId]
const newLabelsByUnit = {...(state.labelsByUnit || {})}
let somethingChanged = false
for (let uid of uids) {
for (const uid of uids) {
const labels = newLabelsByUnit[uid + ''] || []
if (labels.includes(action.label)) {
somethingChanged = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ const SortingCuration2View: FunctionComponent<Props> = ({data, width, height}) =
if ((cbState === 'unchecked') || (cbState === 'indeterminant')) {
sortingCurationDispatch({
type: 'ADD_UNIT_LABEL',
unitId: selectedUnitIds,
unitId: [...selectedUnitIds],
label
})
}
else if (cbState === 'checked') {
sortingCurationDispatch({
type: 'REMOVE_UNIT_LABEL',
unitId: selectedUnitIds,
unitId: [...selectedUnitIds],
label
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const UnitMetricScatterPlot: FunctionComponent<UnitMetricScatterPlotProps> = ({m
const radius = 6
const markers: ScatterPlotMarker[] = useMemo(() => {
const ret: ScatterPlotMarker[] = []
for (let unit of units) {
for (const unit of units) {
const xValue = unit.values[metric1.key]
const yValue = unit.values[metric2.key]
if ((xValue !== undefined) && (yValue !== undefined)) {
Expand Down

0 comments on commit ad751f7

Please sign in to comment.