Commit cccae6c8 authored by joshua-gould's avatar joshua-gould

initial fit

parent 43ecce2a
This diff is collapsed.
...@@ -292,7 +292,8 @@ morpheus.HeatMap = function(options) { ...@@ -292,7 +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' : 'auto' 'overflow-x' : 'auto',
'overflow-y' : 'hidden'
}); });
var tab = this.tabManager.add({ var tab = this.tabManager.add({
...@@ -1640,6 +1641,9 @@ morpheus.HeatMap.prototype = { ...@@ -1640,6 +1641,9 @@ morpheus.HeatMap.prototype = {
} else { } else {
this.heatmap.getRowPositions().setSize(this.options.rowSize); this.heatmap.getRowPositions().setSize(this.options.rowSize);
} }
this.revalidate({
paint : false
});
} }
if (this.options.columnSize != null) { if (this.options.columnSize != null) {
...@@ -1650,9 +1654,17 @@ morpheus.HeatMap.prototype = { ...@@ -1650,9 +1654,17 @@ morpheus.HeatMap.prototype = {
this.heatmap.getColumnPositions().setSize( this.heatmap.getColumnPositions().setSize(
this.options.columnSize); this.options.columnSize);
} }
this.revalidate({
paint : false
});
} }
if (this.options.rowSize != null || this.options.columnSize != null) { if (this.options.rowSize != null && this.options.columnSize != null) {
this.revalidate(); this.paintAll({
paintRows : true,
paintColumns : true,
invalidateRows : true,
invalidateColumns : true
});
} }
this.options.parent = null; this.options.parent = null;
...@@ -1975,6 +1987,7 @@ morpheus.HeatMap.prototype = { ...@@ -1975,6 +1987,7 @@ morpheus.HeatMap.prototype = {
this.project this.project
.getHoverColumnIndex()); .getHoverColumnIndex());
} }
_this.revalidate(reval); _this.revalidate(reval);
event.preventDefault(); event.preventDefault();
}); });
...@@ -2950,6 +2963,7 @@ morpheus.HeatMap.prototype = { ...@@ -2950,6 +2963,7 @@ morpheus.HeatMap.prototype = {
} }
availablePixels -= trackPixels; availablePixels -= trackPixels;
var positions = heatmap.getColumnPositions(); var positions = heatmap.getColumnPositions();
var totalCurrent = positions.getItemSize(positions.getLength() - 1) var totalCurrent = positions.getItemSize(positions.getLength() - 1)
+ positions.getPosition(positions.getLength() - 1); + positions.getPosition(positions.getLength() - 1);
...@@ -3020,7 +3034,9 @@ morpheus.HeatMap.prototype = { ...@@ -3020,7 +3034,9 @@ morpheus.HeatMap.prototype = {
* Layout all the components * Layout all the components
*/ */
revalidate : function(options) { revalidate : function(options) {
options = options || {}; options = $.extend({}, {
paint : true
}, options);
this.updatingScroll = true; this.updatingScroll = true;
var availableHeight = this.getAvailableHeight(); var availableHeight = this.getAvailableHeight();
var availableWidth = this.getAvailableWidth(); var availableWidth = this.getAvailableWidth();
...@@ -3244,12 +3260,14 @@ morpheus.HeatMap.prototype = { ...@@ -3244,12 +3260,14 @@ morpheus.HeatMap.prototype = {
ypos += this.hscroll.getUnscaledHeight() + 2; ypos += this.hscroll.getUnscaledHeight() + 2;
} }
var totalHeight = 2 + ypos + heatMapHeight; var totalHeight = 2 + ypos + heatMapHeight;
this.paintAll({ if (options.paint) {
paintRows : true, this.paintAll({
paintColumns : true, paintRows : true,
invalidateRows : true, paintColumns : true,
invalidateColumns : true invalidateRows : true,
}); invalidateColumns : true
});
}
this.$parent.css({ this.$parent.css({
height : Math.ceil(totalHeight) + 'px' height : Math.ceil(totalHeight) + 'px'
}); });
......
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