From 28d1594b868e3c08e5603adbd5b29df1e24d57e9 Mon Sep 17 00:00:00 2001 From: Pushkar Joshi Date: Fri, 27 Apr 2012 12:40:18 -0700 Subject: Fix for 1524 Pen: Unable to add anchor to a closed path ---behavior is unchanged, but the realtime feedback for the tool (i.e. mouse cursor) will correctly reflect that a click after closing a path will start a new path, not add to that path --- js/tools/PenTool.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'js/tools') diff --git a/js/tools/PenTool.js b/js/tools/PenTool.js index 016d6ded..d18f371a 100755 --- a/js/tools/PenTool.js +++ b/js/tools/PenTool.js @@ -737,14 +737,24 @@ exports.PenTool = Montage.create(ShapeTool, { this._isDrawing = false; this._editMode = this.EDIT_NONE; + //if we're not in edit_path mode and we closed the selected subpath, then we are going to start a new subpath, so we nullify the selected subpath + if (this._selectedSubpath.getIsClosed() && this._entryEditMode !== this.ENTRY_SELECT_PATH){ + this._selectedSubpath = null; + } + if (this._selectedSubpath){ this.DrawSubpathAnchors(this._selectedSubpath);//render the subpath anchors on canvas + }else{ + //clear the canvas + this.application.ninja.stage.clearDrawingCanvas(); } if (!this._trackMouseMoveWhenUp){ NJevent("disableStageMove"); } this._hoveredAnchorIndex = -1; + + } }, -- cgit v1.2.3