some comments

This commit is contained in:
DD Liu 2017-07-27 16:48:37 -04:00
parent dc2fea3dd6
commit 0c1e7ed961
3 changed files with 6 additions and 7 deletions

View file

@ -16,7 +16,7 @@ class PaintEditorComponent extends React.Component {
this.setState({canvas: canvas});
}
render () {
// Tools can't work without a canvas, so we might as well not render them until we have it
// Tools can't work without a canvas, so we don't render them until we have it
if (this.state.canvas) {
return (
<div>

View file

@ -29,7 +29,6 @@ class PaperCanvas extends React.Component {
paper.remove();
}
setCanvas (canvas) {
debugger;
this.canvas = canvas;
if (this.props.canvasRef) {
this.props.canvasRef(canvas);

View file

@ -1,6 +1,6 @@
const paper = require('paper');
const log = require('../log/log');
const broadBrushHelper = require('./broad-brush-helper');
import paper from 'paper';
import log from '../log/log';
import broadBrushHelper from './broad-brush-helper';
class BlobTool {
@ -11,9 +11,9 @@ class BlobTool {
return 'segmentbrush';
}
// brush size >= threshold use segment brush, else use broadbrush
// If brush size >= threshold use segment brush, else use broadbrush
// Segment brush has performance issues at low threshold, but broad brush has weird corners
// which are more obvious the bigger it is
// which get more obvious the bigger it is
static get THRESHOLD () {
return 100000;
}