Skip to content
Snippets Groups Projects
Commit f8260e07 authored by Antoine Roy's avatar Antoine Roy
Browse files

State manage the corect way

parent dac6dda3
No related branches found
No related tags found
1 merge request!7Change on the slide bar's UI from pluggin annotation
Pipeline #1590 failed
...@@ -138,7 +138,7 @@ class AnnotationCreation extends Component { ...@@ -138,7 +138,7 @@ class AnnotationCreation extends Component {
textEditorStateBustingKey: 0, textEditorStateBustingKey: 0,
xywh: null, xywh: null,
// eslint-disable-next-line sort-keys // eslint-disable-next-line sort-keys
valueTime: [20, 37], valueTime: [20, 40],
...annoState, ...annoState,
valuetextTime: '', valuetextTime: '',
}; };
...@@ -358,11 +358,12 @@ class AnnotationCreation extends Component { ...@@ -358,11 +358,12 @@ class AnnotationCreation extends Component {
activeTool, colorPopoverOpen, currentColorType, fillColor, popoverAnchorEl, activeTool, colorPopoverOpen, currentColorType, fillColor, popoverAnchorEl,
strokeColor, popoverLineWeightAnchorEl, lineWeightPopoverOpen, strokeWidth, closedMode, strokeColor, popoverLineWeightAnchorEl, lineWeightPopoverOpen, strokeWidth, closedMode,
textBody, svg, tstart, tend, textBody, svg, tstart, tend,
textEditorStateBustingKey, image, textEditorStateBustingKey, image, valueTime,
} = this.state; } = this.state;
const mediaIsVideo = typeof VideosReferences.get(windowId) !== 'undefined'; const mediaIsVideo = typeof VideosReferences.get(windowId) !== 'undefined';
// let value = [20, 47]
return ( return (
<CompanionWindow <CompanionWindow
title={annotation ? 'Edit annotation' : 'New annotation'} title={annotation ? 'Edit annotation' : 'New annotation'}
...@@ -499,15 +500,13 @@ class AnnotationCreation extends Component { ...@@ -499,15 +500,13 @@ class AnnotationCreation extends Component {
Start Start
</Typography> </Typography>
</Grid> </Grid>
<Grid item xs={12} className={classes.paper}> <Grid item xs={12} className={classes.paper}>
<Typography id="range-slider" gutterBottom> <Typography id="range-slider" gutterBottom>
Time range Time range
</Typography> </Typography>
<Slider <Slider
value={this.valueTime} value={valueTime}
onChange={this.handleChangeTime} // onChange={this.handleChangeTime}
valueLabelDisplay="auto" valueLabelDisplay="auto"
aria-labelledby="range-slider" aria-labelledby="range-slider"
getAriaValueText={this.valuetextTime} getAriaValueText={this.valuetextTime}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment