Author: tim.bunce
Date: Wed Jul 1 04:47:09 2009
New Revision: 788
Modified:
trunk/lib/Devel/NYTProf/js/jit/jit.js
Log:
Fix to minimize jagged gaps (submitted to JIT author)
Modified: trunk/lib/Devel/NYTProf/js/jit/jit.js
==============================================================================
--- trunk/lib/Devel/NYTProf/js/jit/jit.js (original)
+++ trunk/lib/Devel/NYTProf/js/jit/jit.js Wed Jul 1 04:47:09 2009
@@ -8564,9 +8564,9 @@
layoutV: function(ch, w, coord) {
var totalArea = 0;
$each(ch, function(elem) { totalArea += elem._area; });
- var width = totalArea / w, top = 0;
+ var width = Math.round(totalArea / w), top = 0;
for(var i=0; i<ch.length; i++) {
- var h = ch[i]._area / width;
+ var h = Math.round(ch[i]._area / width);
ch[i].coord = {
'height': h,
'width': width,
@@ -8590,14 +8590,14 @@
layoutH: function(ch, w, coord) {
var totalArea = 0;
$each(ch, function(elem) { totalArea += elem._area; });
- var height = totalArea / w,
+ var height = Math.round(totalArea / w),
top = coord.height - height,
left = 0;
for(var i=0; i<ch.length; i++) {
ch[i].coord = {
'height': height,
- 'width': ch[i]._area / height,
+ 'width': Math.round(ch[i]._area / height),
'top': top,
'left': coord.left + left
};
@@ -8838,4 +8838,4 @@
- })();
\ No newline at end of file
+ })();
--~--~---------~--~----~------------~-------~--~----~
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.
Group hosted at: http://groups.google.com/group/develnytprof-dev
Project hosted at: http://perl-devel-nytprof.googlecode.com
CPAN distribution: http://search.cpan.org/dist/Devel-NYTProf
To post, email: [email protected]
To unsubscribe, email: [email protected]
-~----------~----~----~----~------~----~------~--~---