Skip to content

Commit 21c300f

Browse files
committed
log를 제거하고 리팩토링했다.
1 parent d4bca3d commit 21c300f

File tree

5 files changed

+6
-8
lines changed

5 files changed

+6
-8
lines changed

src/atelier.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ export const Atelier = forwardRef(
8383
useEffect(() => {
8484
if (!canvasRef.current) return;
8585

86-
console.log(currentPlugins);
87-
8886
setCurrentPlugins(
8987
Object.assign(
9088
{},
@@ -177,11 +175,11 @@ export const Atelier = forwardRef(
177175
onMouseOut: handleDrawFinish,
178176
}
179177
: {};
180-
}, [currentPlugins, command, lineWidth, color]);
178+
}, [currentPlugins, command, lineWidth, color, width, height, scale]);
181179

182180
const handleClear = useCallback(() => {
183181
canvasRef.current?.getContext('2d')?.clearRect(0, 0, width, height);
184-
}, []);
182+
}, [width, height]);
185183

186184
useImperativeHandle(ref, () => ({
187185
clear: handleClear,

src/plugins/eraser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { DrawingInterface, Plugin, PluginInterface } from './plugin';
1+
import { DrawingInterface, Plugin } from './plugin';
22

33
export class EraserPlugin extends Plugin {
44
name: string = 'eraser';

src/plugins/highlighter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { DrawingInterface, Plugin, PluginInterface } from './plugin';
1+
import { DrawingInterface, Plugin } from './plugin';
22

33
interface Coord {
44
x: number;

src/plugins/laser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { DrawingInterface, Plugin, PluginInterface } from './plugin';
1+
import { DrawingInterface, Plugin } from './plugin';
22

33
export class LaserPlugin extends Plugin {
44
name: string = 'laser';

src/plugins/pen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { DrawingInterface, Plugin, PluginInterface } from './plugin';
1+
import { DrawingInterface, Plugin } from './plugin';
22

33
interface Coord {
44
x: number;

0 commit comments

Comments
 (0)