From 314904b1f48aaadf80f730a2bbbce37e7629e2cd Mon Sep 17 00:00:00 2001 From: bluetwelve <82043995+bluetwelve@users.noreply.github.com> Date: Fri, 3 Sep 2021 11:25:22 -0400 Subject: [PATCH 1/2] setPathContext function added --- src/svgcanvas/path-method.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/svgcanvas/path-method.js b/src/svgcanvas/path-method.js index 4a5c04ee..1c5c439c 100644 --- a/src/svgcanvas/path-method.js +++ b/src/svgcanvas/path-method.js @@ -629,6 +629,10 @@ export class Path { this.init(); } + setPathContext() { + pathMethodsContext_.setPathObj(this); + } + /** * Reset path data. * @returns {module:path.Path} From 2bdaab1d869d4e8047f273747bd19cb72e24eef8 Mon Sep 17 00:00:00 2001 From: bluetwelve <82043995+bluetwelve@users.noreply.github.com> Date: Fri, 3 Sep 2021 11:31:18 -0400 Subject: [PATCH 2/2] call setPathContext when path is selected... or enters edit mode --- src/svgcanvas/path-actions.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/svgcanvas/path-actions.js b/src/svgcanvas/path-actions.js index e91a0875..852c90bd 100644 --- a/src/svgcanvas/path-actions.js +++ b/src/svgcanvas/path-actions.js @@ -757,6 +757,7 @@ export const pathActionsMethod = (function () { path = pathActionsContext_.getPath_(element); editorContext_.setCurrentMode('pathedit'); editorContext_.clearSelection(); + path.setPathContext(); path.show(true).update(); path.oldbbox = utilsGetBBox(path.elem); subpath = false; @@ -770,6 +771,7 @@ export const pathActionsMethod = (function () { editorContext_ = pathActionsContext_.getEditorContext(); const selPath = (elem === path.elem); editorContext_.setCurrentMode('select'); + path.setPathContext(); path.show(false); currentPath = false; editorContext_.clearSelection();