Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

experiment looking at returning parent history #2599

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion apollo
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ function check_configs(){

check_node
check_java
check_grails
}

function copy_configs(){
Expand Down
33 changes: 33 additions & 0 deletions client/apollo/js/View/Track/AnnotTrack.js
Original file line number Diff line number Diff line change
Expand Up @@ -5458,6 +5458,27 @@ define([
this.executeUpdateOperation(postData);
},

getParentHistory: function () {
var selected = this.selectionManager.getSelection();
console.log('get select');
// console.log(JSON.stringify(selected));
console.log(selected);
console.log('parent');
console.log(selected[0].feature.data.parent_id);
if(selected[0].feature.data.parent_id){
// selected[0].feature = { uniquename : selected[0].feature.data.parent_id }
selected[0].feature.data.uniquename = selected[0].feature.data.parent_id
selected[0].feature.afeature.uniquename = selected[0].feature.data.parent_id
selected[0].feature._uniqueID = selected[0].feature.data.parent_id
// selected[0].feature.afeature.uniquename = selected[0].feature.data.parent_id
// selected[0].feature.uniquename = selected[0].feature.data.parent_id
console.log('replaced feature with parent')
}
console.log('final feature ',selected)
this.selectionManager.clearSelection();
this.getHistoryForSelectedFeatures(selected);
},

getHistory: function () {
var selected = this.selectionManager.getSelection();
this.selectionManager.clearSelection();
Expand Down Expand Up @@ -5682,8 +5703,13 @@ define([
var features = '"features": [';
for (var i in selected) {
var record = selected[i];
console.log('record feature id',record.feature.id());
console.log('record feature',record.feature);
// console.log('parent feature',record.feature.parent());
var annot = AnnotTrack.getTopLevelAnnotation(record.feature);
console.log('top level feature',annot)
var uniqueName = annot.id();
console.log('actual id',uniqueName)
// just checking to ensure that all features in selection are
// from this track
if (record.track === track) {
Expand Down Expand Up @@ -7048,6 +7074,13 @@ define([
}
}));
contextMenuItems["history"] = index++;
annot_context_menu.addChild(new dijit.MenuItem({
label: "Show Gene History",
onClick: function (event) {
thisB.getParentHistory();
}
}));
contextMenuItems["parent_history"] = index++;
}

annot_context_menu.onOpen = function (event) {
Expand Down