From ddb882faaef40984ef26f8f5d207869f529498b2 Mon Sep 17 00:00:00 2001 From: Joao Vitor Date: Sat, 8 Jan 2022 00:45:35 -0300 Subject: [PATCH] Fixed EyeDropperTool bug The EyeDropperTool was not working properly, the reason was the class name. --- js/ToolManager.js | 2 +- js/pixel-editor.js | 2 +- js/tools/EyeDropperTool.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/ToolManager.js b/js/ToolManager.js index 9a52d36..2244789 100644 --- a/js/ToolManager.js +++ b/js/ToolManager.js @@ -8,7 +8,7 @@ const ToolManager = (() => { tools["line"] = new LineTool("line", {type: 'html'}, switchTool); tools["fill"] = new FillTool("fill", {type: 'cursor', style: 'crosshair'}, switchTool); - tools["eyedropper"] = new EyedropperTool("eyedropper", {type: 'cursor', style: 'crosshair'}, switchTool); + tools["eyedropper"] = new EyeDropperTool("eyedropper", {type: 'cursor', style: 'crosshair'}, switchTool); tools["pan"] = new PanTool("pan", {type: 'custom'}, switchTool); tools["zoom"] = new ZoomTool("zoom", {type:'custom'}); diff --git a/js/pixel-editor.js b/js/pixel-editor.js index 29a8087..a560cbd 100644 --- a/js/pixel-editor.js +++ b/js/pixel-editor.js @@ -38,7 +38,7 @@ //=include tools/LineTool.js //=include tools/RectangleTool.js //=include tools/FillTool.js -//=include tools/EyedropperTool.js +//=include tools/EyeDropperTool.js //=include tools/PanTool.js //=include tools/ZoomTool.js //=include tools/RectangularSelectionTool.js diff --git a/js/tools/EyeDropperTool.js b/js/tools/EyeDropperTool.js index bacd62f..d28f829 100644 --- a/js/tools/EyeDropperTool.js +++ b/js/tools/EyeDropperTool.js @@ -1,4 +1,4 @@ -class EyedropperTool extends Tool { +class EyeDropperTool extends Tool { eyedropperPreview = document.getElementById("eyedropper-preview"); selectedColor = {r:0, g:0, b:0};