Skip to content
Snippets Groups Projects
Commit 02705f69 authored by Alexander Rose's avatar Alexander Rose
Browse files

added missing react component state intitialization

parent aedb03f6
No related branches found
No related tags found
No related merge requests found
......@@ -206,6 +206,12 @@ export class SliderBase extends React.Component<SliderBaseProps, SliderBaseState
private sliderElement: HTMLElement | undefined = void 0;
private handleElements: (HTMLElement | undefined)[] = [];
state: SliderBaseState = {
handle: null,
recent: 0,
bounds: [0, 0],
};
constructor(props: SliderBaseProps) {
super(props);
......
......@@ -22,6 +22,12 @@ export class ImageCanvas extends React.Component<{ imageData: ImageData, aspectR
private canvas: HTMLCanvasElement | null = null;
private ctx: CanvasRenderingContext2D | null = null;
state = {
imageData: new ImageData(1, 1),
width: 1,
height: 1
}
updateStateFromProps() {
this.setState({
imageData: this.props.imageData,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment