|
@@ -264,7 +264,7 @@ export class SPolylineItem extends SGraphItem {
|
|
|
this.status = SItemStatus.Normal;
|
|
|
this.releaseItem();
|
|
|
} else if (this.status == SItemStatus.Create) {
|
|
|
- if (this.pointList.length > 2) {
|
|
|
+ if (this.pointList.length > 1) {
|
|
|
this.status = SItemStatus.Normal;
|
|
|
this.releaseItem();
|
|
|
this.$emit("finishCreated");
|
|
@@ -281,7 +281,7 @@ export class SPolylineItem extends SGraphItem {
|
|
|
*/
|
|
|
onKeyUp(event: KeyboardEvent): void {
|
|
|
if (event.keyCode == SKeyCode.Enter) {
|
|
|
- if (this.pointList.length > 2) {
|
|
|
+ if (this.pointList.length > 1) {
|
|
|
if (this.status == SItemStatus.Create) {
|
|
|
this.$emit("finishCreated");
|
|
|
}
|