OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
360 * @param {number} barWidth | 360 * @param {number} barWidth |
361 * @param {number} barHeight | 361 * @param {number} barHeight |
362 * @param {function(number):number} offsetToPosition | 362 * @param {function(number):number} offsetToPosition |
363 * @return {boolean} | 363 * @return {boolean} |
364 */ | 364 */ |
365 decorateEntry: function(entryIndex, context, text, barX, barY, barWidth, bar Height, offsetToPosition) | 365 decorateEntry: function(entryIndex, context, text, barX, barY, barWidth, bar Height, offsetToPosition) |
366 { | 366 { |
367 var frame = this._entryIndexToFrame[entryIndex]; | 367 var frame = this._entryIndexToFrame[entryIndex]; |
368 if (frame) { | 368 if (frame) { |
369 context.save(); | 369 context.save(); |
370 | |
yurys
2014/08/08 12:40:43
Remove empty line.
| |
370 context.translate(0.5, 0.5); | 371 context.translate(0.5, 0.5); |
371 | 372 |
372 context.beginPath(); | 373 context.beginPath(); |
373 context.moveTo(barX, barY); | 374 context.moveTo(barX, barY); |
374 context.lineTo(barX, context.canvas.height); | 375 context.lineTo(barX, context.canvas.height); |
375 context.strokeStyle = "rgba(100, 100, 100, 0.6)"; | 376 context.strokeStyle = "rgba(100, 100, 100, 0.4)"; |
377 context.setLineDash([5]); | |
376 context.stroke(); | 378 context.stroke(); |
379 context.setLineDash([]); | |
380 | |
yurys
2014/08/08 12:40:43
Remove empty line.
| |
377 | 381 |
378 var padding = 4 * window.devicePixelRatio; | 382 var padding = 4 * window.devicePixelRatio; |
379 barX += padding; | 383 barX += padding; |
380 barWidth -= 2 * padding; | 384 barWidth -= 2 * padding; |
381 barY += padding; | 385 barY += padding; |
382 barHeight -= 2 * padding; | 386 barHeight -= 2 * padding; |
383 | 387 |
384 var cornerRadis = 3; | 388 var cornerRadis = 3; |
385 var radiusY = cornerRadis; | 389 var radiusY = cornerRadis; |
386 var radiusX = Math.min(cornerRadis, barWidth / 2); | 390 var radiusX = Math.min(cornerRadis, barWidth / 2); |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
755 /** | 759 /** |
756 * @constructor | 760 * @constructor |
757 * @param {!WebInspector.TimelineSelection} selection | 761 * @param {!WebInspector.TimelineSelection} selection |
758 * @param {number} entryIndex | 762 * @param {number} entryIndex |
759 */ | 763 */ |
760 WebInspector.TimelineFlameChart.Selection = function(selection, entryIndex) | 764 WebInspector.TimelineFlameChart.Selection = function(selection, entryIndex) |
761 { | 765 { |
762 this.timelineSelection = selection; | 766 this.timelineSelection = selection; |
763 this.entryIndex = entryIndex; | 767 this.entryIndex = entryIndex; |
764 } | 768 } |
OLD | NEW |