mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Fix typo and remove react import
This commit is contained in:
parent
bb012e289a
commit
99234c9653
1 changed files with 7 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
||||||
import React, { ChangeEvent } from "react";
|
import React from "react";
|
||||||
import ReactDOM from "react-dom";
|
import ReactDOM from "react-dom";
|
||||||
import rough from "roughjs/bin/wrappers/rough";
|
import rough from "roughjs/bin/wrappers/rough";
|
||||||
import { RoughCanvas } from "roughjs/bin/canvas";
|
import { RoughCanvas } from "roughjs/bin/canvas";
|
||||||
|
@ -1370,19 +1370,19 @@ class App extends React.Component<{}, AppState> {
|
||||||
this.changeProperty(element => (element.fillStyle = style));
|
this.changeProperty(element => (element.fillStyle = style));
|
||||||
};
|
};
|
||||||
|
|
||||||
private changeStrokeWidth = (event: ChangeEvent<HTMLSelectElement>) => {
|
private changeStrokeWidth = (event: React.ChangeEvent<HTMLSelectElement>) => {
|
||||||
this.changeProperty(element => (element.strokeWidth = +event.target.value));
|
this.changeProperty(element => (element.strokeWidth = +event.target.value));
|
||||||
};
|
};
|
||||||
|
|
||||||
private changeRoughness = (event: ChangeEvent<HTMLSelectElement>) => {
|
private changeRoughness = (event: React.ChangeEvent<HTMLSelectElement>) => {
|
||||||
this.changeProperty(element => (element.roughness = +event.target.value));
|
this.changeProperty(element => (element.roughness = +event.target.value));
|
||||||
};
|
};
|
||||||
|
|
||||||
private changeOpacity = (event: ChangeEvent<HTMLInputElement>) => {
|
private changeOpacity = (event: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
this.changeProperty(element => (element.opacity = +event.target.value));
|
this.changeProperty(element => (element.opacity = +event.target.value));
|
||||||
};
|
};
|
||||||
|
|
||||||
private changeSrokeColor = (color: string) => {
|
private changeStrokeColor = (color: string) => {
|
||||||
this.changeProperty(element => (element.strokeColor = color));
|
this.changeProperty(element => (element.strokeColor = color));
|
||||||
this.setState({ currentItemStrokeColor: color });
|
this.setState({ currentItemStrokeColor: color });
|
||||||
};
|
};
|
||||||
|
@ -1601,7 +1601,7 @@ class App extends React.Component<{}, AppState> {
|
||||||
/>
|
/>
|
||||||
<SketchPicker
|
<SketchPicker
|
||||||
color={this.state.currentItemStrokeColor}
|
color={this.state.currentItemStrokeColor}
|
||||||
onChange={color => this.changeSrokeColor(color.hex)}
|
onChange={color => this.changeStrokeColor(color.hex)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
@ -1612,7 +1612,7 @@ class App extends React.Component<{}, AppState> {
|
||||||
getSelectedStrokeColor() ||
|
getSelectedStrokeColor() ||
|
||||||
this.state.currentItemStrokeColor
|
this.state.currentItemStrokeColor
|
||||||
}
|
}
|
||||||
onChange={e => this.changeSrokeColor(e.target.value)}
|
onChange={e => this.changeStrokeColor(e.target.value)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue