Commit 235d5d8c authored by joshua-gould's avatar joshua-gould

renamed heatmap.$el

parent 0b887b66
This diff is collapsed.
...@@ -270,8 +270,8 @@ morpheus.HeatMap = function(options) { ...@@ -270,8 +270,8 @@ morpheus.HeatMap = function(options) {
} }
this.tabManager = this.options.parent.tabManager; this.tabManager = this.options.parent.tabManager;
} }
this.$el = $('<div></div>'); this.$content = $('<div></div>');
this.$el.css({ this.$content.css({
'width' : '100%', 'width' : '100%',
'user-select' : 'none', 'user-select' : 'none',
...@@ -297,7 +297,7 @@ morpheus.HeatMap = function(options) { ...@@ -297,7 +297,7 @@ morpheus.HeatMap = function(options) {
}); });
var tab = this.tabManager.add({ var tab = this.tabManager.add({
$el : this.$el, $el : this.$content,
closeable : true, closeable : true,
rename : true, rename : true,
title : this.options.name, title : this.options.name,
...@@ -305,7 +305,7 @@ morpheus.HeatMap = function(options) { ...@@ -305,7 +305,7 @@ morpheus.HeatMap = function(options) {
focus : true focus : true
}); });
if (options.$loadingImage) { if (options.$loadingImage) {
options.$loadingImage.appendTo(this.$el); options.$loadingImage.appendTo(this.$content);
} }
this.tabId = tab.id; this.tabId = tab.id;
...@@ -314,7 +314,6 @@ morpheus.HeatMap = function(options) { ...@@ -314,7 +314,6 @@ morpheus.HeatMap = function(options) {
: (options.dataset.file ? options.dataset.file : options.dataset); : (options.dataset.file ? options.dataset.file : options.dataset);
this._togglingInfoWindow = false; this._togglingInfoWindow = false;
this.tooltipMode = 0; // 0=docked, 1=dialog, 2=follow this.tooltipMode = 0; // 0=docked, 1=dialog, 2=follow
this.el = this.$el[0];
var promises = []; var promises = [];
if (options.promises) { if (options.promises) {
...@@ -373,7 +372,7 @@ morpheus.HeatMap = function(options) { ...@@ -373,7 +372,7 @@ morpheus.HeatMap = function(options) {
}; };
$(window).on('orientationchange resize', resize); $(window).on('orientationchange resize', resize);
_this.$el.on('remove', function() { _this.$content.on('remove', function() {
$(window).off('orientationchange resize', resize); $(window).off('orientationchange resize', resize);
}); });
} }
...@@ -1097,7 +1096,7 @@ morpheus.HeatMap.prototype = { ...@@ -1097,7 +1096,7 @@ morpheus.HeatMap.prototype = {
this.whenLoaded = null; this.whenLoaded = null;
this.$parent = $('<div></div>').css('position', 'relative'); this.$parent = $('<div></div>').css('position', 'relative');
this.$parent.appendTo(this.$el); this.$parent.appendTo(this.$content);
this.toolbar = new morpheus.HeatMapToolBar(this); this.toolbar = new morpheus.HeatMapToolBar(this);
if (this.options.customUrls) { if (this.options.customUrls) {
this.setCustomUrls(this.options.customUrls); this.setCustomUrls(this.options.customUrls);
......
...@@ -134,7 +134,7 @@ morpheus.HeatMapKeyListener = function(controller) { ...@@ -134,7 +134,7 @@ morpheus.HeatMapKeyListener = function(controller) {
return false; return false;
} }
}; };
var $keyelement = controller.$el; var $keyelement = controller.$content;
$keyelement.on('keydown', keydown); $keyelement.on('keydown', keydown);
$keyelement.on('dragover.morpheus dragenter.morpheus', function(e) { $keyelement.on('dragover.morpheus dragenter.morpheus', function(e) {
e.preventDefault(); e.preventDefault();
......
...@@ -271,7 +271,7 @@ morpheus.HeatMapToolBar = function(controller) { ...@@ -271,7 +271,7 @@ morpheus.HeatMapToolBar = function(controller) {
$search.appendTo($el.find('[name=toolbarSearch]')); $search.appendTo($el.find('[name=toolbarSearch]'));
$(toolbarHtml.join('')).appendTo($toolbarForm); $(toolbarHtml.join('')).appendTo($toolbarForm);
$toolbarForm.appendTo($el.find('[name=toolbarButtons]')); $toolbarForm.appendTo($el.find('[name=toolbarButtons]'));
$el.prependTo(controller.$el); $el.prependTo(controller.$content);
// gapi.hangout.render('hangout-div', { // gapi.hangout.render('hangout-div', {
// 'widget_size' : '72', // 'widget_size' : '72',
// 'render' : 'createhangout' // 'render' : 'createhangout'
......
...@@ -352,9 +352,9 @@ morpheus.VectorTrack.prototype = { ...@@ -352,9 +352,9 @@ morpheus.VectorTrack.prototype = {
.isRenderAs(morpheus.VectorTrack.RENDER.BAR))) { .isRenderAs(morpheus.VectorTrack.RENDER.BAR))) {
if (this.getFullVector().getProperties().has( if (this.getFullVector().getProperties().has(
morpheus.VectorKeys.FIELDS) morpheus.VectorKeys.FIELDS)
|| _.isNumber(morpheus.VectorUtil.getFirstNonNull(this || morpheus.VectorUtil.getDataType(this.getFullVector()) === 'number') {
.getFullVector()))) {
this.settings.discrete = false; this.settings.discrete = false;
this.settings.highlightMatchingValues = false;
} }
this.settings.discreteAutoDetermined = true; this.settings.discreteAutoDetermined = true;
} }
...@@ -398,24 +398,24 @@ morpheus.VectorTrack.prototype = { ...@@ -398,24 +398,24 @@ morpheus.VectorTrack.prototype = {
var doRequest = function(smile) { var doRequest = function(smile) {
$ $
.ajax( .ajax(
{ {
contentType : 'text/plain', contentType : 'text/plain',
context : { context : {
smile : smile smile : smile
}, },
data : { data : {
'string' : smile, 'string' : smile,
'representation' : 'sdf' 'representation' : 'sdf'
}, },
url : 'http://cactus.nci.nih.gov/chemical/structure', url : 'http://cactus.nci.nih.gov/chemical/structure',
}).done(function(text) { }).done(function(text) {
_this.moleculeCache[this.smile] = text; _this.moleculeCache[this.smile] = text;
if (values.length > 0) { if (values.length > 0) {
doRequest(values.pop()); doRequest(values.pop());
} }
_this.invalid = true; _this.invalid = true;
_this.repaint(); _this.repaint();
}); });
}; };
for (var i = 0; i < 6; i++) { for (var i = 0; i < 6; i++) {
doRequest(values.pop()); doRequest(values.pop());
...@@ -1075,10 +1075,10 @@ morpheus.VectorTrack.prototype = { ...@@ -1075,10 +1075,10 @@ morpheus.VectorTrack.prototype = {
morpheus.Popup morpheus.Popup
.showPopup( .showPopup(
items, items,
{ {
x : e.pageX, x : e.pageX,
y : e.pageY y : e.pageY
}, },
e.target, e.target,
function(event, item) { function(event, item) {
var customItem; var customItem;
...@@ -1278,12 +1278,12 @@ morpheus.VectorTrack.prototype = { ...@@ -1278,12 +1278,12 @@ morpheus.VectorTrack.prototype = {
project project
.trigger( .trigger(
'trackChanged', 'trackChanged',
{ {
vectors : [ v ], vectors : [ v ],
render : existingVector != null ? [] render : existingVector != null ? []
: [ morpheus.VectorTrack.RENDER.TEXT ], : [ morpheus.VectorTrack.RENDER.TEXT ],
columns : isColumns columns : isColumns
}); });
} }
}); });
} else if (item === DELETE) { } else if (item === DELETE) {
...@@ -1358,18 +1358,18 @@ morpheus.VectorTrack.prototype = { ...@@ -1358,18 +1358,18 @@ morpheus.VectorTrack.prototype = {
project project
.trigger( .trigger(
'rowTrackRemoved', 'rowTrackRemoved',
{ {
vector : _this vector : _this
.getFullVector() .getFullVector()
}); });
} else { } else {
project project
.trigger( .trigger(
'columnTrackRemoved', 'columnTrackRemoved',
{ {
vector : _this vector : _this
.getFullVector() .getFullVector()
}); });
} }
} }
}); });
...@@ -1589,13 +1589,13 @@ morpheus.VectorTrack.prototype = { ...@@ -1589,13 +1589,13 @@ morpheus.VectorTrack.prototype = {
.getRowColorModel(); .getRowColorModel();
if (_this.settings.discrete) { if (_this.settings.discrete) {
colorSchemeChooser = new morpheus.DiscreteColorSchemeChooser( colorSchemeChooser = new morpheus.DiscreteColorSchemeChooser(
{ {
colorScheme : { colorScheme : {
scale : colorModel scale : colorModel
.getDiscreteColorScheme(_this .getDiscreteColorScheme(_this
.getFullVector()) .getFullVector())
} }
}); });
colorSchemeChooser.on('change', function( colorSchemeChooser.on('change', function(
event) { event) {
colorModel.setMappedValue(_this colorModel.setMappedValue(_this
...@@ -1606,9 +1606,9 @@ morpheus.VectorTrack.prototype = { ...@@ -1606,9 +1606,9 @@ morpheus.VectorTrack.prototype = {
}); });
} else { } else {
colorSchemeChooser = new morpheus.HeatMapColorSchemeChooser( colorSchemeChooser = new morpheus.HeatMapColorSchemeChooser(
{ {
showRelative : false, showRelative : false,
}); });
colorSchemeChooser colorSchemeChooser
.setColorScheme(colorModel .setColorScheme(colorModel
.getContinuousColorScheme(_this .getContinuousColorScheme(_this
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment