Commit 6a7c0f99 authored by joshua-gould's avatar joshua-gould

initial fit size

parent cccae6c8
This diff is collapsed.
...@@ -292,8 +292,8 @@ morpheus.HeatMap = function(options) { ...@@ -292,8 +292,8 @@ morpheus.HeatMap = function(options) {
'-o-user-drag' : 'none', '-o-user-drag' : 'none',
'-o-tap-highlight-color' : 'rgba(0, 0, 0, 0)', '-o-tap-highlight-color' : 'rgba(0, 0, 0, 0)',
'overflow-x' : 'auto', 'overflow-x' : 'visible',
'overflow-y' : 'hidden' 'overflow-y' : 'visible'
}); });
var tab = this.tabManager.add({ var tab = this.tabManager.add({
...@@ -1659,6 +1659,21 @@ morpheus.HeatMap.prototype = { ...@@ -1659,6 +1659,21 @@ morpheus.HeatMap.prototype = {
}); });
} }
if (this.options.rowSize != null && this.options.columnSize != null) { if (this.options.rowSize != null && this.options.columnSize != null) {
// note that we have to revalidate twice because column sizes are
// dependent on row sizes and vice versa
if (this.options.columnSize === 'fit') {
this.heatmap.getColumnPositions().setSize(
this.getFitColumnSize());
this.revalidate({
paint : false
});
}
if (this.options.rowSize === 'fit') {
this.heatmap.getRowPositions().setSize(this.getFitRowSize());
this.revalidate({
paint : false
});
}
this.paintAll({ this.paintAll({
paintRows : true, paintRows : true,
paintColumns : true, paintColumns : true,
...@@ -1987,7 +2002,7 @@ morpheus.HeatMap.prototype = { ...@@ -1987,7 +2002,7 @@ morpheus.HeatMap.prototype = {
this.project this.project
.getHoverColumnIndex()); .getHoverColumnIndex());
} }
_this.revalidate(reval); _this.revalidate(reval);
event.preventDefault(); event.preventDefault();
}); });
......
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