Commit 95fd4c45 authored by 单奇雲's avatar 单奇雲

冲突

parents 6c1be8a6 02e22f30
......@@ -483,7 +483,7 @@ class View3D extends Component {
onAllDone = objGroup => {
this.sceneFactory.level.change(objGroup);
this.cameraFactory.fitView(desigerHelperConfig.cameraEffect);
this.stagePilot.rendererFactory.setupUModelSahdow();//接受阴影
this.setState({
startAsyncLoad: true
});
......@@ -493,6 +493,8 @@ class View3D extends Component {
onAfterWorkerInit = workerObjGroup => {
// 处理跳跃
this.lensJumpFactory.process(workerObjGroup);
// 子线程模型加上阴影
workerObjGroup.toggleShadow(true);
};
onComplete = obj => {
......@@ -893,20 +895,14 @@ class View3D extends Component {
savePointData = () => {
let { markers, pointType, isPointSave} = this.state;
this.setState({isPointSave: true});
console.log(markers);
let paramsArr = [];
for ( let key in markers ){
let item = markers[key];
for (let i = 0; i < item.length; i++) {
if(item[i].isChange){
paramsArr.push({
pointId: item[i].id,
pointType: item[i].type,
position3d: `${item[i].position[0]},${item[i].position[1]},${item[i].position[2]}`
});
}
}
}
paramsArr = markers[pointType].filter(e=> e.isEdit).map(item=>{
return {
pointId: item.id,
pointType: item.type,
position3d: item.position.length > 1 ? `${item.position[0]},${item.position[1]},${item.position[2]}` : null
};
});
savePointListAction(paramsArr).then(
data => {
getPointTreeAction(pointType).then(
......@@ -1143,8 +1139,8 @@ class View3D extends Component {
title: dragItem.name,
label: dragItem.name,
level: dragItem.level,
levelStr: dragItem.levelStr,
isChange: true
isEdit: true,
levelStr: dragItem.levelStr
};
let selectPoints = {
......@@ -1538,35 +1534,30 @@ class View3D extends Component {
// 非法元素
return object;
}
addMarker=({extData,position})=>{
let {markers} =this.state;
for (let i = 0; i < markers[extData.type].length; i++) {
const marker = markers[extData.type][i];
if(marker.id === extData.id){
marker.position = position;
marker.isChange = true;
break;
}
};
// let paramsArr = [{
// pointId: extData.id,
// pointType: extData.type,
// position3d: `${position[0]},${position[1]},${position[2]}`
// }];
// console.log(paramsArr)
let selectPoints = {
id: extData.id,
type: extData.type,
position3d: position
}
this.setState({selectPoints,markers,showRightPanel:true });
// savePointListAction(paramsArr).then(data => {
// })
// this.setState({positionxyz: position})
addMarker=({ extData, position })=>{
const me = this;
const { markers } = me;
const isInside = me.polygonRegion && extData.parentId && me.polygonRegion[extData.parentId].pointInPolygon([position.x,position.y,position.z]);
if (isInside){
markers[extData.type].forEach(e => {
if (e.id === extData.id){
e.position = `${position[0]},${position[1]},${position[2]}`;
e.isEdit = true;
}
});
extData.position = position;
this.setState({
markers,
positionxyz: position,
showRightPanel: true,
selectPoints: extData
});
} else {
message.error('不能放置非所在区域');
}
}
render() {
const {
objs,
......
......@@ -80,7 +80,7 @@ export default function marker3DFactory(WrappedComponent = 'div', options){
componentWillReceiveProps = nextProps => {
if(nextProps.isEditMode){
this.markersCache.eachValue(obj=>{
// this.setTopCardConf(obj, obj.extData);
this.setTopCardConf(obj, obj.extData);
if(nextProps.selectPoints.type == obj.extData.type && nextProps.selectPoints.id ==obj.extData.id ){
this.setTwinkleConf(obj);
}
......
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