Skip to content

Commit

Permalink
Merge 3d97d85 into 3e11432
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandunn committed Mar 9, 2020
2 parents 3e11432 + 3d97d85 commit ffd8d60
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
4 changes: 2 additions & 2 deletions client/apollo/js/View/Track/AnnotTrack.js
Original file line number Diff line number Diff line change
Expand Up @@ -2363,12 +2363,12 @@ define([
var selectedFeatureDetails = selectedFeature.afeature;
while(selectedFeature ){
if(topTypes.indexOf(selectedFeatureDetails.type.name)>=0){
this.getApollo().viewInAnnotationPanel(selectedFeatureDetails.uniquename);
this.getApollo().viewInAnnotationPanel(selectedFeatureDetails.uniquename,null);
return ;
}
else
if(topTypes.indexOf(selectedFeatureDetails.parent_type.name)>=0){
this.getApollo().viewInAnnotationPanel(selectedFeatureDetails.parent_id);
this.getApollo().viewInAnnotationPanel(selectedFeatureDetails.parent_id,selectedFeatureDetails.uniquename);
return ;
}
selectedFeature = selectedFeature._parent ;
Expand Down
6 changes: 6 additions & 0 deletions src/gwt/org/bbop/apollo/gwt/client/AnnotatorPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,12 @@ public void searchName(KeyUpEvent keyUpEvent) {

@UiHandler("showCurrentView")
public void setShowCurrentView(ClickEvent clickEvent) {
nameSearchBox.setText("");
sequenceList.setText("");
userField.setSelectedIndex(0);
typeList.setSelectedIndex(0);
uniqueNameCheckBox.setValue(false);
goOnlyCheckBox.setValue(false);
queryViewInRangeOnly = true;
reload();
}
Expand Down
12 changes: 8 additions & 4 deletions src/gwt/org/bbop/apollo/gwt/client/MainPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,7 @@ public static boolean isOfficialTrack(String trackName){

/**
*/
public static Boolean viewInAnnotationPanel(String parentName) {
public static Boolean viewInAnnotationPanel(String parentName,String childName) {
try {
// ids are registered with clone for some reason in JSONUtils.js for RR and TE . . not sure if it will break other things, so correcting here
if(parentName.endsWith("-clone")){
Expand All @@ -1121,7 +1121,8 @@ public static Boolean viewInAnnotationPanel(String parentName) {
detailTabs.selectTab(TabPanelIndex.ANNOTATIONS.getIndex());
MainPanel.getInstance().openPanel();
MainPanel.getInstance().addOpenTranscript(parentName);
MainPanel.getInstance().selectOpenTranscript(parentName);
GWT.log("viewing: ["+parentName+"] child: ["+childName+"]");
MainPanel.getInstance().selectOpenTranscript(childName);
return true ;
} catch (Exception e) {
Bootbox.alert("Problem viewing annotation");
Expand All @@ -1130,9 +1131,12 @@ public static Boolean viewInAnnotationPanel(String parentName) {
}
}

private void selectOpenTranscript(String parentName) {
private void selectOpenTranscript(String childName) {
annotatorPanel.selectTranscriptPanel();
detailTabs.selectTab(TabPanelIndex.ANNOTATIONS.getIndex());
// if(childName!=null){
// annotatorPanel.enableGoto(0,childName);
// }
}


Expand Down Expand Up @@ -1211,7 +1215,7 @@ public static native void exportStaticMethod() /*-{
$wnd.getCurrentOrganism = $entry(@org.bbop.apollo.gwt.client.MainPanel::getCurrentOrganismAsJson());
$wnd.getCurrentUser = $entry(@org.bbop.apollo.gwt.client.MainPanel::getCurrentUserAsJson());
$wnd.getCurrentSequence = $entry(@org.bbop.apollo.gwt.client.MainPanel::getCurrentSequenceAsJson());
$wnd.viewInAnnotationPanel = $entry(@org.bbop.apollo.gwt.client.MainPanel::viewInAnnotationPanel(Ljava/lang/String;));
$wnd.viewInAnnotationPanel = $entry(@org.bbop.apollo.gwt.client.MainPanel::viewInAnnotationPanel(Ljava/lang/String;Ljava/lang/String;));
$wnd.isOfficialTrack = $entry(@org.bbop.apollo.gwt.client.MainPanel::isOfficialTrack(Ljava/lang/String;));
$wnd.closeAnnotatorPanel = $entry(@org.bbop.apollo.gwt.client.MainPanel::closePanel());
$wnd.viewGoPanel = $entry(@org.bbop.apollo.gwt.client.MainPanel::viewGoPanel(Ljava/lang/String;));
Expand Down
2 changes: 1 addition & 1 deletion src/gwt/org/bbop/apollo/gwt/client/SearchPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public void onResponseReceived(Request request, Response response) {
@Override
public void callback(boolean result) {
if(result){
MainPanel.viewInAnnotationPanel(parentName);
MainPanel.viewInAnnotationPanel(parentName,null);
}
}
});
Expand Down

0 comments on commit ffd8d60

Please sign in to comment.