diff options
author | Pushkar Joshi | 2012-04-27 12:40:18 -0700 |
---|---|---|
committer | Pushkar Joshi | 2012-04-27 12:40:18 -0700 |
commit | 28d1594b868e3c08e5603adbd5b29df1e24d57e9 (patch) | |
tree | ee670e6fd80070ffa2caae0f0c025ea838d4a343 /js/tools | |
parent | ed7d22edf3cbca82ae43a4e3373a93a8666ba4a1 (diff) | |
download | ninja-28d1594b868e3c08e5603adbd5b29df1e24d57e9.tar.gz |
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
Diffstat (limited to 'js/tools')
-rwxr-xr-x | js/tools/PenTool.js | 10 |
1 files changed, 10 insertions, 0 deletions
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, { | |||
737 | this._isDrawing = false; | 737 | this._isDrawing = false; |
738 | this._editMode = this.EDIT_NONE; | 738 | this._editMode = this.EDIT_NONE; |
739 | 739 | ||
740 | //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 | ||
741 | if (this._selectedSubpath.getIsClosed() && this._entryEditMode !== this.ENTRY_SELECT_PATH){ | ||
742 | this._selectedSubpath = null; | ||
743 | } | ||
744 | |||
740 | if (this._selectedSubpath){ | 745 | if (this._selectedSubpath){ |
741 | this.DrawSubpathAnchors(this._selectedSubpath);//render the subpath anchors on canvas | 746 | this.DrawSubpathAnchors(this._selectedSubpath);//render the subpath anchors on canvas |
747 | }else{ | ||
748 | //clear the canvas | ||
749 | this.application.ninja.stage.clearDrawingCanvas(); | ||
742 | } | 750 | } |
743 | 751 | ||
744 | if (!this._trackMouseMoveWhenUp){ | 752 | if (!this._trackMouseMoveWhenUp){ |
745 | NJevent("disableStageMove"); | 753 | NJevent("disableStageMove"); |
746 | } | 754 | } |
747 | this._hoveredAnchorIndex = -1; | 755 | this._hoveredAnchorIndex = -1; |
756 | |||
757 | |||
748 | } | 758 | } |
749 | }, | 759 | }, |
750 | 760 | ||