Commit d103218e authored by Joshua Gould's avatar Joshua Gould

https urls and profile chart points

parent eb2cc358
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -11,7 +11,7 @@ morpheus.LandingPage = function (pageOptions) { ...@@ -11,7 +11,7 @@ morpheus.LandingPage = function (pageOptions) {
html.push('<div name="help" class="pull-right"></div>'); html.push('<div name="help" class="pull-right"></div>');
html html
.push('<div style="margin-bottom:10px;"><img src="//www.broadinstitute.org/cancer/software/morpheus/images/icon.svg" alt="logo" /> <span style="font-size:16px;font-family:Roboto,sans-serif;">Morpheus</span></div>'); .push('<div style="margin-bottom:10px;"><img src="https://www.broadinstitute.org/cancer/software/morpheus/images/icon.svg" alt="logo" /> <span style="font-size:16px;font-family:Roboto,sans-serif;">Morpheus</span></div>');
html.push('<h4>Open your own file</h4>'); html.push('<h4>Open your own file</h4>');
html.push('<div name="formRow" class="center-block"></div>'); html.push('<div name="formRow" class="center-block"></div>');
......
...@@ -534,18 +534,20 @@ morpheus.ChartTool2.prototype = { ...@@ -534,18 +534,20 @@ morpheus.ChartTool2.prototype = {
text.push(obj); text.push(obj);
} }
var trace = { var trace = {
x: x, x: x,
y: y, y: y,
name: colorByVector ? colorByVector.getValue(i) : '', name: colorByVector ? colorByVector.getValue(i) : '',
tickmode: 'array', tickmode: 'array',
marker: { marker: {
size: size, size: size,
symbol: 'circle' symbol: 'circle'
}, },
text: text, text: text,
mode: 'markers+lines', mode: 'lines' + (options.showPoints ? '+markers' : ''
type: 'scatter' // scattergl ),
}; type: 'scatter' // scattergl
}
;
traces.push(trace); traces.push(trace);
} }
...@@ -755,7 +757,7 @@ morpheus.ChartTool2.prototype = { ...@@ -755,7 +757,7 @@ morpheus.ChartTool2.prototype = {
var config = plotlyDefaults.config; var config = plotlyDefaults.config;
var chartWidth = 400; var chartWidth = 400;
var chartHeight = 400; var chartHeight = 400;
var points = this.formBuilder.getValue('show_points'); var showPoints = this.formBuilder.getValue('show_points');
var groupColumnsBy = this.formBuilder.getValue('group_columns_by'); var groupColumnsBy = this.formBuilder.getValue('group_columns_by');
var axisLabel = this.formBuilder.getValue('axis_label'); var axisLabel = this.formBuilder.getValue('axis_label');
...@@ -774,7 +776,7 @@ morpheus.ChartTool2.prototype = { ...@@ -774,7 +776,7 @@ morpheus.ChartTool2.prototype = {
return; return;
} }
if ((dataset.getRowCount() * dataset.getColumnCount()) > 100000) { if ((dataset.getRowCount() * dataset.getColumnCount()) > 100000) {
points = false; showPoints = false;
} }
var grid = []; var grid = [];
...@@ -810,6 +812,7 @@ morpheus.ChartTool2.prototype = { ...@@ -810,6 +812,7 @@ morpheus.ChartTool2.prototype = {
} }
this this
._createProfile({ ._createProfile({
showPoints: showPoints,
isColumnChart: chartType === 'column profile', isColumnChart: chartType === 'column profile',
axisLabelVector: axisLabelVector, axisLabelVector: axisLabelVector,
colorByVector: colorByVector, colorByVector: colorByVector,
...@@ -877,7 +880,7 @@ morpheus.ChartTool2.prototype = { ...@@ -877,7 +880,7 @@ morpheus.ChartTool2.prototype = {
this this
._createBoxPlot({ ._createBoxPlot({
array: array, array: array,
points: points, points: showPoints,
colorByVector: colorByVector, colorByVector: colorByVector,
colorModel: colorModel, colorModel: colorModel,
colorByGetter: function (item) { colorByGetter: function (item) {
...@@ -1127,7 +1130,7 @@ morpheus.ChartTool2.prototype = { ...@@ -1127,7 +1130,7 @@ morpheus.ChartTool2.prototype = {
} }
}), }),
array: array, array: array,
points: points, points: showPoints,
sizeByGetter: sizeByGetter, sizeByGetter: sizeByGetter,
sizeFunction: sizeByScale, sizeFunction: sizeByScale,
colorModel: colorModel, colorModel: colorModel,
......
...@@ -2,17 +2,6 @@ morpheus.CanvasUtil = function() { ...@@ -2,17 +2,6 @@ morpheus.CanvasUtil = function() {
}; };
morpheus.CanvasUtil.dragging = false; morpheus.CanvasUtil.dragging = false;
morpheus.CanvasUtil.measureScrollbar = function() {
var $c = $(
'<div style=\'position:absolute; top:-10000px; left:-10000px; width:100px; height:100px; overflow:scroll;\'></div>')
.appendTo('body');
var dim = {
width : $c.width() - $c[0].clientWidth,
height : $c.height() - $c[0].clientHeight
};
$c.remove();
return dim;
};
morpheus.CanvasUtil.FONT_NAME = '"Helvetica Neue",Helvetica,Arial,sans-serif'; morpheus.CanvasUtil.FONT_NAME = '"Helvetica Neue",Helvetica,Arial,sans-serif';
morpheus.CanvasUtil.FONT_COLOR = 'rgb(34, 34, 34)'; morpheus.CanvasUtil.FONT_COLOR = 'rgb(34, 34, 34)';
morpheus.CanvasUtil.getPreferredSize = function(c) { morpheus.CanvasUtil.getPreferredSize = function(c) {
......
...@@ -52,6 +52,17 @@ morpheus.Util.loadTrackingCode = function () { ...@@ -52,6 +52,17 @@ morpheus.Util.loadTrackingCode = function () {
} }
}; };
morpheus.Util.measureScrollbar = function () {
var $c = $(
'<div style=\'position:absolute; top:-10000px; left:-10000px; width:100px; height:100px; overflow:scroll;\'></div>')
.appendTo('body');
var dim = {
width: Math.max(0, $c.width() - $c[0].clientWidth),
height: $c.height() - $c[0].clientHeight
};
$c.remove();
return dim;
};
morpheus.Util.trackEvent = function (options) { morpheus.Util.trackEvent = function (options) {
if (typeof window !== 'undefined') { if (typeof window !== 'undefined') {
if (!morpheus.Util.TRACKING_CODE_LOADED) { if (!morpheus.Util.TRACKING_CODE_LOADED) {
......
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