Skip to content

Commit

Permalink
Removing domNode optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
tbolis committed Oct 4, 2016
1 parent 490e450 commit f5c9635
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-sketch",
"version": "0.2.11",
"version": "0.2.12",
"description": "Sketch Element for React based applications, backed-up by fabricjs as its core",
"keywords": [
"react",
Expand Down
4 changes: 1 addition & 3 deletions src/SketchField.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ class SketchField extends Component {
};

componentDidMount() {
this._domNode = ReactDOM.findDOMNode(this);

let {tool,
undoSteps,
defaultData,
Expand Down Expand Up @@ -257,7 +255,7 @@ class SketchField extends Component {
_resize(e) {
if (e) e.preventDefault();
let canvas = this._fc;
let domNode = this._domNode;
let domNode = ReactDOM.findDOMNode(this);
let {offsetWidth,clientHeight} = domNode;
let prevWidth = canvas.getWidth();
let prevHeight = canvas.getHeight();
Expand Down

0 comments on commit f5c9635

Please sign in to comment.