|
@@ -58,20 +58,20 @@ export class AssemblyView extends AbstractView<AssemblyViewInterface & AbstractV
|
|
const x = e.begin;
|
|
const x = e.begin;
|
|
const y = e.end ?? e.begin;
|
|
const y = e.end ?? e.begin;
|
|
if(e.isEmpty){
|
|
if(e.isEmpty){
|
|
|
|
+ this.props.plugin.focusPositions(this.currentModelId, this.currentLabelAsymId, [x,y]);
|
|
const componentId: string = this.currentLabelAsymId +":"+ ((x === y) ? x.toString() : x.toString()+","+y.toString());
|
|
const componentId: string = this.currentLabelAsymId +":"+ ((x === y) ? x.toString() : x.toString()+","+y.toString());
|
|
this.props.plugin.createComponentFromSet(
|
|
this.props.plugin.createComponentFromSet(
|
|
componentId,
|
|
componentId,
|
|
this.currentModelId,
|
|
this.currentModelId,
|
|
[{asymId: this.currentLabelAsymId, position: x}, {asymId: this.currentLabelAsymId, position: y}],
|
|
[{asymId: this.currentLabelAsymId, position: x}, {asymId: this.currentLabelAsymId, position: y}],
|
|
'ball-and-stick'
|
|
'ball-and-stick'
|
|
- )
|
|
|
|
- this.props.plugin.focusPositions(this.currentModelId, this.currentLabelAsymId, [x,y]);
|
|
|
|
|
|
+ );
|
|
}else{
|
|
}else{
|
|
- const componentId: string = this.currentLabelAsymId +":"+ (x === y ? x.toString() : x.toString()+"-"+y.toString());
|
|
|
|
|
|
+ this.props.plugin.focusRange(this.currentModelId, this.currentLabelAsymId, x, y);
|
|
if((y-x)<this.createComponentThreshold){
|
|
if((y-x)<this.createComponentThreshold){
|
|
- this.props.plugin.createComponentFromRange(componentId, this.currentModelId, this.currentLabelAsymId, x, y, 'ball-and-stick')
|
|
|
|
|
|
+ const componentId: string = this.currentLabelAsymId +":"+ (x === y ? x.toString() : x.toString()+"-"+y.toString());
|
|
|
|
+ this.props.plugin.createComponentFromRange(componentId, this.currentModelId, this.currentLabelAsymId, x, y, 'ball-and-stick');
|
|
}
|
|
}
|
|
- this.props.plugin.focusRange(this.currentModelId, this.currentLabelAsymId, x, y);
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
selectionChangeCallBack:(selection: Array<SelectionInterface>)=>{
|
|
selectionChangeCallBack:(selection: Array<SelectionInterface>)=>{
|