From c3d2eb1711f69adb870a06b2e710f286c680333d Mon Sep 17 00:00:00 2001 From: Mark MacKay Date: Thu, 15 Apr 2021 19:24:06 -0500 Subject: [PATCH] fixing paint switch --- src/js/PaintBox.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/PaintBox.js b/src/js/PaintBox.js index 56e8782..06a307d 100644 --- a/src/js/PaintBox.js +++ b/src/js/PaintBox.js @@ -223,8 +223,8 @@ MD.PaintBox = function(container, type){ if (isNaN(stroke_opacity)) {stroke_opacity = 100;} var fill_opacity = parseFloat(fill_rect.getAttribute("fill-opacity")); if (isNaN(fill_opacity)) {fill_opacity = 100;} - var stroke = _self.getPaint(stroke_color, stroke_opacity, "stroke"); - var fill = _self.getPaint(fill_color, fill_opacity, "fill"); + var stroke = editor.paintBox.stroke.getPaint(stroke_color, stroke_opacity, "stroke"); + var fill = editor.paintBox.fill.getPaint(fill_color, fill_opacity, "fill"); editor.paintBox.fill.setPaint(stroke, true); editor.paintBox.stroke.setPaint(fill, true); });