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

1

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