Permalink
Browse files

added right-click menu items using menuTemplate

  • Loading branch information...
aniarya82 committed Aug 21, 2017
1 parent 189e7a2 commit 8255bddec40879a26fb8866e9d11c1938f7df4c0
Showing with 69 additions and 0 deletions.
  1. +69 −0 plugins/AnnotationEditor/js/View/Track/EditTrack.js
@@ -68,6 +68,75 @@ var EditTrack = declare(DraggableFeatureTrack,
_defaultConfig: function () {
var thisConfig = this.inherited(arguments);
+ var thisB = this;
+ thisConfig.menuTemplate = [
+ {
+ label: 'Get sequence',
+ action: function() {
+ thisB.showSequenceDialog();
+ }
+ },
+ {
+ label: 'Send to GeneValidator',
+ action: function() {
+ thisB.sendToGeneValidator();
+ }
+ },
+ {
+ label: 'Delete',
+ action: function() {
+ thisB.deleteSelectedFeatures();
+ }
+ },
+ {
+ label: 'Merge',
+ action: function() {
+ thisB.mergeSelectedFeatures();
+ }
+ },
+ {
+ label: 'Make Intron',
+ action: function() {
+ thisB.makeIntronInSelectedExon();
+ }
+ },
+ {
+ label: 'Split Transcript',
+ action: function() {
+ thisB.splitSelectedTranscript();
+ }
+ },
+ {
+ label: 'Duplicate',
+ action: function() {
+ thisB.duplicateSelectedFeatures();
+ }
+ },
+ {
+ label: 'Flip Strand',
+ action: function() {
+ thisB.flipStrandForSelectedFeatures();
+ }
+ },
+ {
+ label: 'Use Longest ORF',
+ action: function() {
+ thisB.setLongestORFForImpliedTranscript();
+ }
+ },
+ {
+ label: 'Set Translation Start',
+ action: function() {
+ thisB.setTranslationStartForImpliedTranscript();
+ }
+ },
+ {
+ label: 'Set Translation Stop',
+ action: function() {
+ thisB.setTranslationStopForImpliedTranscript();
+ }
+ }
+ ]
thisConfig.noExport = true; // turn off default "Save track data" "
thisConfig.style.centerChildrenVertically = false;
return thisConfig;

0 comments on commit 8255bdd

Please sign in to comment.