Skip to content

Commit

Permalink
Turning off diagnostic output.
Browse files Browse the repository at this point in the history
  • Loading branch information
GreggHelt2 committed Dec 20, 2012
1 parent 871ffed commit 7d75d9c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 42 deletions.
12 changes: 2 additions & 10 deletions plugins/WebApollo/js/SequenceSearch.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
console.log("at top of SequenceSearch.js (outside of define)");

define( [
'dojo/_base/declare',
'jquery',
],
function( declare, $ ) {

console.log("in SequenceSearch returned function");

function SequenceSearch(contextPath) {
this.contextPath = contextPath;
Expand Down Expand Up @@ -188,13 +185,8 @@ SequenceSearch.prototype.searchSequence = function(trackName, refSeqName, starts
return content;
};

/* console.log("at end of SequenceSearch returned function");
console.log(window);
console.log(SequenceSearch);
console.log(new SequenceSearch("."));
window.SequenceSearch = SequenceSearch;
*/
// window.SequenceSearch = SequenceSearch;

return SequenceSearch;
} );

console.log("at end of SequenceSearch.js (outside of define)");
21 changes: 9 additions & 12 deletions plugins/WebApollo/js/View/Track/AnnotTrack.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,14 @@ var AnnotTrack = declare( DraggableFeatureTrack,
this.verbose_create = false;
this.verbose_add = false;
this.verbose_delete = false;
this.verbose_drop = true;
this.verbose_drop = false;
this.verbose_click = false;
this.verbose_resize = false;
this.verbose_mousedown = false;
this.verbose_mouseenter = false;
this.verbose_mouseleave = false;
this.verbose_render = false;
this.verbose_server_notification = false;

var track = this;

Expand Down Expand Up @@ -201,9 +202,8 @@ var AnnotTrack = declare( DraggableFeatureTrack,
// track.hideAll(); shouldn't need to call hideAll() before changed() anymore
track.changed();
track.createAnnotationChangeListener();

// console.log("AnnotTrack get_features XHR returned, trying to find sequence track: ", strack);
var strack = track.getSequenceTrack();
console.log("AnnotTrack get_features XHR returned, trying to find sequence track: ", strack);
// setAnnotTrack() triggers loading of sequence alterations
if (strack && (! strack.annotTrack)) { strack.setAnnotTrack(track); }
},
Expand Down Expand Up @@ -260,10 +260,13 @@ var AnnotTrack = declare( DraggableFeatureTrack,
// }
else {
for (var i in response) {

var changeData = response[i];
if (track.verbose_server_notification) {
console.log(changeData.operation + " command from server: ");
console.log(changeData);
}
if (changeData.operation == "ADD") {
console.log("ADD command from server: ");
console.log(changeData);
if (changeData.sequenceAlterationEvent) {
track.getSequenceTrack().annotationsAddedNotification(changeData.features);
}
Expand All @@ -272,8 +275,6 @@ var AnnotTrack = declare( DraggableFeatureTrack,
}
}
else if (changeData.operation == "DELETE") {
console.log("DELETE command from server: ");
console.log(changeData);
if (changeData.sequenceAlterationEvent) {
track.getSequenceTrack().annotationsDeletedNotification(changeData.features);
}
Expand All @@ -282,8 +283,6 @@ var AnnotTrack = declare( DraggableFeatureTrack,
}
}
else if (changeData.operation == "UPDATE") {
console.log("UPDATE command from server: ");
console.log(changeData);
if (changeData.sequenceAlterationEvent) {
track.getSequenceTrack().annotationsUpdatedNotification(changeData.features);
// track.getSequenceTrack().annotationsDeletedNotification(changeData.features);
Expand All @@ -296,8 +295,7 @@ var AnnotTrack = declare( DraggableFeatureTrack,
}
}
else {
console.log("UNKNOWN command from server: ");
console.log(response);
// unknown command from server, null-op?
}
}
// track.hideAll(); shouldn't need to call hideAll() before changed() anymore
Expand Down Expand Up @@ -871,7 +869,6 @@ var AnnotTrack = declare( DraggableFeatureTrack,
* (contrasted with DraggableFeatureTracks, which all share the same selection and selection manager
*/
deleteSelectedFeatures: function() {
console.log("attempting to delete selected features");
var selected = this.selectionManager.getSelection();
this.selectionManager.clearSelection();
this.deleteAnnotations(selected);
Expand Down
9 changes: 4 additions & 5 deletions plugins/WebApollo/js/View/Track/DraggableHTMLFeatures.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@ var draggableTrack = declare( HTMLFeatureTrack,
},

constructor: function( args ) {

console.log("DragableFeatureTrack constructor called");

this.gview = this.browser.view;
// get a handle to on the main WA object
this.browser.getPlugin( 'WebApollo', dojo.hitch( this, function(p) {
Expand Down Expand Up @@ -765,8 +762,10 @@ var draggableTrack = declare( HTMLFeatureTrack,
*/
onFeatureMouseDown: function(event) {
// event.stopPropagation();
if( this.verbose_selection || this.verbose_drag ) { console.log("DFT.onFeatureMouseDown called"); }
console.log("genome coord: " + this.gview.absXtoBp(event.pageX));
if( this.verbose_selection || this.verbose_drag ) {
console.log("DFT.onFeatureMouseDown called");
console.log("genome coord: " + this.gview.absXtoBp(event.pageX));
}

// drag_create conditional needed in older strategy using trigger(event) for feature drag bootstrapping with JQuery 1.5,
// but not with with JQuery 1.7+ strategy using _mouseDown(event), since _mouseDown call doesn't lead to onFeatureMouseDown() call
Expand Down
20 changes: 5 additions & 15 deletions plugins/WebApollo/js/View/Track/SequenceTrack.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ function( declare, StaticChunked, DraggableFeatureTrack, JSONUtils, Permission,
this.show_reverse_strand = true;
this.show_protein_translation = true;
this.context_path = "..";
this.verbose_server_notification = false;

this.residues_context_menu = new dijit.Menu({}); // placeholder till setAnnotTrack() triggers real menu init
this.annot_context_menu = new dijit.Menu({}); // placeholder till setAnnotTrack() triggers real menu init
Expand Down Expand Up @@ -64,9 +65,7 @@ function( declare, StaticChunked, DraggableFeatureTrack, JSONUtils, Permission,
// this.initContextMenu();

var atrack = this.getAnnotTrack();
console.log("in SequenceTrack constructor, annotation track = ", atrack);
if (atrack) {
console.log("in SequenceTrack constructor, found AnnotTrack: ", atrack);
this.setAnnotTrack(atrack);
}
},
Expand Down Expand Up @@ -110,8 +109,6 @@ function( declare, StaticChunked, DraggableFeatureTrack, JSONUtils, Permission,
timeout: 5 * 1000, // Time in milliseconds
// The LOAD function will be called on a successful response.
load: function(response, ioArgs) { //
console.log("SequenceTrack get_sequence_alterations response: ");
console.log(response);
var responseFeatures = response.features;
for (var i = 0; i < responseFeatures.length; i++) {
var jfeat = JSONUtils.createJBrowseSequenceAlteration(responseFeatures[i]);
Expand Down Expand Up @@ -750,7 +747,6 @@ function( declare, StaticChunked, DraggableFeatureTrack, JSONUtils, Permission,

createGenomicInsertion: function() {
var gcoord = this.getGenomeCoord(this.residues_context_mousedown);
console.log("SequenceTrack.createGenomicInsertion() called at genome position: " + gcoord);

var content = this.createAddSequenceAlterationPanel("insertion", gcoord);
this.annotTrack.openDialog("Add Insertion", content);
Expand All @@ -777,7 +773,6 @@ function( declare, StaticChunked, DraggableFeatureTrack, JSONUtils, Permission,

createGenomicDeletion: function() {
var gcoord = this.getGenomeCoord(this.residues_context_mousedown);
console.log("SequenceTrack.createGenomicDeletion() called at genome position: " + gcoord);

var content = this.createAddSequenceAlterationPanel("deletion", gcoord);
this.annotTrack.openDialog("Add Deletion", content);
Expand All @@ -786,21 +781,17 @@ function( declare, StaticChunked, DraggableFeatureTrack, JSONUtils, Permission,

createGenomicSubstitution: function() {
var gcoord = this.getGenomeCoord(this.residues_context_mousedown);
console.log("SequenceTrack.createGenomicSubstitution() called at genome position: " + gcoord);
var content = this.createAddSequenceAlterationPanel("substitution", gcoord);
this.annotTrack.openDialog("Add Substitution", content);
},

deleteSelectedFeatures: function() {
console.log("SequenceTrack.deleteSelectedFeatures() called");
var selected = this.selectionManager.getSelection();
this.selectionManager.clearSelection();
this.requestDeletion(selected);
},

requestDeletion: function(selected) {
console.log("SequenceTrack.requestDeletion called");
console.log(selected);
var track = this;
var features = "[ ";
for (var i = 0; i < selected.length; ++i) {
Expand All @@ -816,15 +807,15 @@ function( declare, StaticChunked, DraggableFeatureTrack, JSONUtils, Permission,
},

getInformation: function() {
console.log("SequenceTrack.getInformation() called");

},

/**
* sequence alteration annotation ADD command received by a ChangeNotificationListener,
* so telling SequenceTrack to add to it's SeqFeatureStore
*/
annotationsAddedNotification: function(responseFeatures) {
console.log("SequenceTrack.annotationsAddedNotification() called");
if (this.verbose_server_notification) { console.log("SequenceTrack.annotationsAddedNotification() called"); }
var track = this;
// add to store
for (var i = 0; i < responseFeatures.length; ++i) {
Expand All @@ -850,7 +841,7 @@ function( declare, StaticChunked, DraggableFeatureTrack, JSONUtils, Permission,
* so telling SequenceTrack to remove from it's SeqFeatureStore
*/
annotationsDeletedNotification: function(annots) {
console.log("SequenceTrack.removeSequenceAlterations() called");
if (this.verbose_server_notification) { console.log("SequenceTrack.removeSequenceAlterations() called"); }
var track = this;
// remove from SeqFeatureStore
for (var i = 0; i < annots.length; ++i) {
Expand Down Expand Up @@ -984,7 +975,7 @@ function( declare, StaticChunked, DraggableFeatureTrack, JSONUtils, Permission,
},

setAnnotTrack: function(annotTrack) {
if (this.annotTrack) { console.log("WARNING: SequenceTrack.setAnnotTrack called but annoTrack already set"); }
// if (this.annotTrack) { console.log("WARNING: SequenceTrack.setAnnotTrack called but annoTrack already set"); }
this.annotTrack = annotTrack;
this.initContextMenu();
this.loadSequenceAlterations();
Expand Down Expand Up @@ -1053,7 +1044,6 @@ function( declare, StaticChunked, DraggableFeatureTrack, JSONUtils, Permission,
// should be doing instanceof here, but class setup is not being cooperative
if (tracks[i].isWebApolloAnnotTrack) {
this.annotTrack = tracks[i];
console.log("In SequenceTrack, found WebApollo annotation track: ", this.annotTrack);
this.annotTrack.seqTrack = this;
break;
}
Expand Down

0 comments on commit 7d75d9c

Please sign in to comment.