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

坐标绑定

parent ca45b7ac
...@@ -788,6 +788,7 @@ class View3D extends Component { ...@@ -788,6 +788,7 @@ class View3D extends Component {
selectArea:'', selectArea:'',
selectPoints, selectPoints,
showRightPanel: true, showRightPanel: true,
selectPoints
}); });
} }
...@@ -923,7 +924,8 @@ class View3D extends Component { ...@@ -923,7 +924,8 @@ class View3D extends Component {
// 删除点绑定 // 删除点绑定
deletePointBind = () => { deletePointBind = () => {
let { selectPoints ,pointTypeArr,pointType,markers} = this.state; let { selectPoints ,pointTypeArr,pointType,markers} = this.state;
if (selectPoints) { if (selectPoints && !selectPoints.isRegion) {
let pointParams = []; let pointParams = [];
pointParams.push({ pointParams.push({
pointId: selectPoints.id, pointId: selectPoints.id,
...@@ -1148,6 +1150,7 @@ class View3D extends Component { ...@@ -1148,6 +1150,7 @@ class View3D extends Component {
id: dragItem.id, id: dragItem.id,
type: dragItem.type type: dragItem.type
} }
markers[`${type}`] = markers[`${type}`].filter(e => e.id != dragItem.id );
markers[`${type}`].push(addPointParam); markers[`${type}`].push(addPointParam);
this.setState({ this.setState({
markers: deepCopy(markers), markers: deepCopy(markers),
...@@ -1543,7 +1546,7 @@ class View3D extends Component { ...@@ -1543,7 +1546,7 @@ class View3D extends Component {
// if (isInside){ // if (isInside){
markers[extData.type].forEach(e => { markers[extData.type].forEach(e => {
if (e.id === extData.id){ if (e.id === extData.id){
e.position = `${position[0]},${position[1]},${position[2]}`; e.position = position;
e.isEdit = true; e.isEdit = true;
} }
}); });
......
...@@ -49,8 +49,8 @@ class RightEditPointPanel extends Component { ...@@ -49,8 +49,8 @@ class RightEditPointPanel extends Component {
console.log('componentWillReceivePropscomponentWillReceiveProps'); console.log('componentWillReceivePropscomponentWillReceiveProps');
// positionxyz && this.setState({ positionxyz, positionX: positionxyz[0], positionY: positionxyz[1], positionZ: positionxyz[2] }); // positionxyz && this.setState({ positionxyz, positionX: positionxyz[0], positionY: positionxyz[1], positionZ: positionxyz[2] });
getPointTreeDetailAction(detailData.id,detailData.type).then(data => { getPointTreeDetailAction(detailData.id,detailData.type).then(data => {
if(detailData.position3d){ if(detailData.position){
data.position = detailData.position3d; data.position = detailData.position;
}else if(!data.position){ }else if(!data.position){
const curTypeMaker = markers[data.type]; const curTypeMaker = markers[data.type];
for (let i = 0; i < curTypeMaker.length; i++) { for (let i = 0; i < curTypeMaker.length; i++) {
......
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