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}); this.setState({canvas: canvas});
} }
render () { 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) { if (this.state.canvas) {
return ( return (
<div> <div>

View file

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

View file

@ -1,6 +1,6 @@
const paper = require('paper'); import paper from 'paper';
const log = require('../log/log'); import log from '../log/log';
const broadBrushHelper = require('./broad-brush-helper'); import broadBrushHelper from './broad-brush-helper';
class BlobTool { class BlobTool {
@ -11,9 +11,9 @@ class BlobTool {
return 'segmentbrush'; 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 // 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 () { static get THRESHOLD () {
return 100000; return 100000;
} }