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

坐标绑定

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