Commit 416e3238 authored by 张博's avatar 张博

1

parent ec57623b
......@@ -590,9 +590,8 @@ class View3D extends Component {
});
});
}
focusObject = (object,errorAreaId)=> {
focusObject = (object)=> {
const me = this;
me.getErrorAreaPoint(errorAreaId);
if (!me.state.alarmStarted && object) {
this.cameraFactory.flyTo({
target: object,
......@@ -1896,7 +1895,7 @@ class View3D extends Component {
{isEditMode && this.renderAreas()}
{this.renderPolygonRegion(exceptionAreas)}
{errorAreaId && this.selectPolygonRegion(exceptionAreas,errorAreaId)}
{isOutterView && startLoadExceptionArea && <ExceptionArea markers={exceptionMarkers} handleExceptModel={this.handleExceptModel} focusObject={this.focusObject} />}
{isOutterView && startLoadExceptionArea && <ExceptionArea markers={exceptionMarkers} handleExceptModel={this.handleExceptModel} focusObject={this.focusObject} getErrorAreaPoint={this.getErrorAreaPoint} />}
</A3DDesigner>
</div>
{ isEditMode &&
......
......@@ -46,7 +46,8 @@ class ExceptionArea extends Component {
onMarkerClick = (marker) => {
const { extData, node } = marker;
this.props.handleExceptModel && this.props.handleExceptModel('into_except_model',extData.id);
this.props.focusObject && this.props.focusObject(node,extData.id);
this.props.focusObject && this.props.focusObject(node);
this.props.getErrorAreaPoint && this.props.getErrorAreaPoint(extData.id);
}
......@@ -72,17 +73,6 @@ class ExceptionArea extends Component {
};
obj.baseObjHelper.title = String(safetyIndex);
}
toCameraPosition = (item) => {
if (item && item.x){
return { x: item.x , y: item.y + 200 , z: item.z + 200 };
} else if (item && item[0]){
return { x: item[0] , y: item[1] + 200 , z: item[2] + 200 };
} else {
return;
}
}
markerCreated = ({ markersCache }) => {
this.markersCache = markersCache;
markersCache.eachValue(item=>{
......
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