Commit 02e22f30 authored by suhuiguang's avatar suhuiguang

1修改缺陷

parent 23356c33
...@@ -483,7 +483,7 @@ class View3D extends Component { ...@@ -483,7 +483,7 @@ class View3D extends Component {
onAllDone = objGroup => { onAllDone = objGroup => {
this.sceneFactory.level.change(objGroup); this.sceneFactory.level.change(objGroup);
this.cameraFactory.fitView(desigerHelperConfig.cameraEffect); this.stagePilot.rendererFactory.setupUModelSahdow();//接受阴影
this.setState({ this.setState({
startAsyncLoad: true startAsyncLoad: true
}); });
...@@ -493,6 +493,8 @@ class View3D extends Component { ...@@ -493,6 +493,8 @@ class View3D extends Component {
onAfterWorkerInit = workerObjGroup => { onAfterWorkerInit = workerObjGroup => {
// 处理跳跃 // 处理跳跃
this.lensJumpFactory.process(workerObjGroup); this.lensJumpFactory.process(workerObjGroup);
// 子线程模型加上阴影
workerObjGroup.toggleShadow(true);
}; };
onComplete = obj => { onComplete = obj => {
...@@ -1128,7 +1130,8 @@ class View3D extends Component { ...@@ -1128,7 +1130,8 @@ class View3D extends Component {
title: dragItem.name, title: dragItem.name,
label: dragItem.name, label: dragItem.name,
level: dragItem.level, level: dragItem.level,
levelStr: dragItem.levelStr, isEdit: true,
levelStr: dragItem.levelStr
}; };
markers[`${type}`].push(addPointParam); markers[`${type}`].push(addPointParam);
this.setState({ this.setState({
...@@ -1515,22 +1518,29 @@ class View3D extends Component { ...@@ -1515,22 +1518,29 @@ class View3D extends Component {
// 非法元素 // 非法元素
return object; return object;
} }
addMarker=({extData,position})=>{
const {markers} =this.state addMarker=({ extData, position })=>{
let paramsArr = [{ const me = this;
pointId: extData.id, const { markers } = me;
pointType: extData.type, const isInside = me.polygonRegion && extData.parentId && me.polygonRegion[extData.parentId].pointInPolygon([position.x,position.y,position.z]);
position3d: `${position[0]},${position[1]},${position[2]}` if (isInside){
}]; markers[extData.type].forEach(e => {
console.log(paramsArr) if (e.id === extData.id){
savePointListAction(paramsArr).then(data => { e.position = `${position[0]},${position[1]},${position[2]}`;
}) e.isEdit = true;
this.setState({ }
positionxyz: position, });
showRightPanel:true, this.setState({
selectPoints:extData markers,
}) positionxyz: position,
showRightPanel: true,
selectPoints: extData
});
} else {
message.error('不能放置非所在区域');
}
} }
render() { render() {
const { const {
objs, objs,
......
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