Repository: incubator-htrace
Updated Branches:
  refs/heads/master 2566b34ab -> fdbdf9cca


HTRACE-335. htrace-web: Adjust size of span widget (iwasakims)


Project: http://git-wip-us.apache.org/repos/asf/incubator-htrace/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-htrace/commit/fdbdf9cc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-htrace/tree/fdbdf9cc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-htrace/diff/fdbdf9cc

Branch: refs/heads/master
Commit: fdbdf9ccaa84aad711fe8d3caa47affac4b251e8
Parents: 2566b34
Author: Masatake Iwasaki <[email protected]>
Authored: Mon Jan 11 03:17:23 2016 +0900
Committer: Masatake Iwasaki <[email protected]>
Committed: Mon Jan 11 03:17:23 2016 +0900

----------------------------------------------------------------------
 htrace-webapp/src/main/webapp/app/search_results_view.js | 2 +-
 htrace-webapp/src/main/webapp/app/span_widget.js         | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/fdbdf9cc/htrace-webapp/src/main/webapp/app/search_results_view.js
----------------------------------------------------------------------
diff --git a/htrace-webapp/src/main/webapp/app/search_results_view.js 
b/htrace-webapp/src/main/webapp/app/search_results_view.js
index b2fffbd..3cecf48 100644
--- a/htrace-webapp/src/main/webapp/app/search_results_view.js
+++ b/htrace-webapp/src/main/webapp/app/search_results_view.js
@@ -174,7 +174,7 @@ htrace.SearchResultsView = Backbone.View.extend({
     var partitionWidgetWidth = Math.max(5, Math.floor(this.viewX / 300));
 
     // Create a SpanWidget for each span we know about
-    var spanWidgetHeight = Math.min(25, Math.floor(this.viewY / 32));
+    var spanWidgetHeight = 16;
     var numResults = this.searchResults.size();
     var groupY = 0;
     for (var i = 0; i < numResults; i++) {

http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/fdbdf9cc/htrace-webapp/src/main/webapp/app/span_widget.js
----------------------------------------------------------------------
diff --git a/htrace-webapp/src/main/webapp/app/span_widget.js 
b/htrace-webapp/src/main/webapp/app/span_widget.js
index f7c447a..ba70577 100644
--- a/htrace-webapp/src/main/webapp/app/span_widget.js
+++ b/htrace-webapp/src/main/webapp/app/span_widget.js
@@ -126,7 +126,7 @@ htrace.SpanWidget = function(params) {
   this.drawTracerId = function() {
     this.ctx.save();
     this.ctx.fillStyle="#000000";
-    this.ctx.font = (this.ySize - 2) + "px sans-serif";
+    this.ctx.font = "14px sans-serif";
     this.ctx.beginPath();
     this.ctx.rect(this.x0, this.y0, this.xB - this.x0, this.ySize);
     this.ctx.clip();
@@ -158,7 +158,7 @@ htrace.SpanWidget = function(params) {
       endX = this.xF;
     }
 
-    var gapY = 2;
+    var gapY = 1;
     var epsilon = Math.max(2, Math.floor(this.xSize / 1000));
     if (endX - beginX < epsilon) {
       // The time interval is too narrow to see.  Draw a diamond on the point 
instead.
@@ -192,7 +192,7 @@ htrace.SpanWidget = function(params) {
 
     // Draw description text
     this.ctx.fillStyle="#000000";
-    this.ctx.font = (this.ySize - gapY) + "px sans-serif";
+    this.ctx.font = "14px sans-serif";
     this.ctx.fillText(this.span.get('description'),
         this.xD + this.xT,
         this.yF - gapY - 2);

Reply via email to