::: details 目录 [[toc]] :::
::: details 示例代码
<<< @/docs/.vuepress/components/edit/items/editpolyline/editpolyline.vue
:::
::: details 查看代码
<<< @/docs/guides/edit/items/src/EditLineItem.ts
:::
``` js {4} // 编辑状态时的 LineItem this.polylineItem = new EditPolylineItem(null); this.polylineItem.status = SItemStatus.Create; this.scene.grabItem = this.polylineItem;
### 2 当 EditPolylineItem 为正常状态时,需要将 grabItem 置为 null
``` js {4}
// 正常状态时的 LineItem
this.polylineItem = new EditPolylineItem(null);
this.polylineItem.status = SItemStatus.Normal;
this.scene.grabItem = null;
``` js {3} // 编辑状态时的 LineItem this.polylineItem = new EditPolylineItem(null,); this.polylineItem.status = SItemStatus.Create; this.polylineItem.verAndLeve = true; this.scene.grabItem = this.polylineItem;
### 4 当 EditPolylineItem 修改属性但是画板尚未变化时需要刷新
``` js {4}
// 编辑状态时的 LineItem
this.polylineItem = new EditPolylineItem(null);
this.polylineItem.status = SItemStatus.Create;
this.view.update();
js {4}
// 编辑状态时的 LineItem
this.polylineItem = new EditPolylineItem(null);
this.polylineItem.status = SItemStatus.Create;
this.polylineItem.moveable = true;