Commit cf02086a authored by 单奇雲's avatar 单奇雲

bug

parent 5f476986
...@@ -187,6 +187,7 @@ class View3D extends Component { ...@@ -187,6 +187,7 @@ class View3D extends Component {
this._marker = []; this._marker = [];
this._cacheObj = {};//3维模型对象缓存 this._cacheObj = {};//3维模型对象缓存
this.processorLevel = {};//3维模型对应关系缓存 this.processorLevel = {};//3维模型对应关系缓存
this._penCache = [];//编辑的路径
} }
componentDidMount() { componentDidMount() {
...@@ -811,6 +812,7 @@ class View3D extends Component { ...@@ -811,6 +812,7 @@ class View3D extends Component {
// 鼠标右键 绘制完毕,需要同步处理 reference 数据 // 鼠标右键 绘制完毕,需要同步处理 reference 数据
if (event.button === 2) { if (event.button === 2) {
const pen = this.a3dRef.currentPen; const pen = this.a3dRef.currentPen;
this._penCache.push(pen); //添加当前编辑的区域
if (pen._drawing){ if (pen._drawing){
this.a3dRef.changeDrawState(PEN_STATE.FINISHED); this.a3dRef.changeDrawState(PEN_STATE.FINISHED);
this.setState({ this.setState({
...@@ -941,6 +943,8 @@ class View3D extends Component { ...@@ -941,6 +943,8 @@ class View3D extends Component {
const { routePathData } = this.state; const { routePathData } = this.state;
saveAreaDataAction(routePathData).then(d => { saveAreaDataAction(routePathData).then(d => {
this.a3dRef.changeDrawState(PEN_STATE.CLEARED);//清除当前路径 this.a3dRef.changeDrawState(PEN_STATE.CLEARED);//清除当前路径
this._penCache.forEach(pen => pen.clear() );//清楚编辑的所有路径
this._penCache = [];
this.setState({ isAreaSave: false, drawing: false,treeData: [] },()=>{ this.setState({ isAreaSave: false, drawing: false,treeData: [] },()=>{
message.success('保存成功!'); message.success('保存成功!');
this.getAreaTree(); this.getAreaTree();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment