mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2024-12-23 05:52:42 -05:00
some comments
This commit is contained in:
parent
dc2fea3dd6
commit
0c1e7ed961
3 changed files with 6 additions and 7 deletions
|
@ -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>
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue