Skip to content

Commit 8631545

Browse files
committed
Fixed some issues from the review.
1 parent 2bcf7e7 commit 8631545

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

src/profiler/profiler_templates.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ var ProfilerTemplates = function()
8686
var profiler_event_small_decl = style_sheets.getDeclaration(".profiler-event-small");
8787
var profiler_timeline_row_decl = style_sheets.getDeclaration(".profiler-timeline-row");
8888
var EVENT_MIN_WIDTH = profiler_event_decl ? parseInt(profiler_event_decl.minWidth) : 1;
89-
var EVENT_SMALL_MIN_WIDTH = profiler_event_decl ? parseInt(profiler_event_small_decl.minWidth) : 1;
89+
var EVENT_SMALL_MIN_WIDTH = profiler_event_small_decl ? parseInt(profiler_event_small_decl.minWidth) : 1;
9090
var EVENT_HEIGHT = profiler_timeline_row_decl
91-
? (parseInt(style_sheets.getDeclaration(".profiler-timeline-row").height) +
92-
parseInt(style_sheets.getDeclaration(".profiler-timeline-row").paddingTop) +
93-
parseInt(style_sheets.getDeclaration(".profiler-timeline-row").paddingBottom))
91+
? (parseInt(profiler_timeline_row_decl.height) +
92+
parseInt(profiler_timeline_row_decl.paddingTop) +
93+
parseInt(profiler_timeline_row_decl.paddingBottom))
9494
: 1;
95-
var EVENT_SMALL_HEIGHT = profiler_event_decl ? parseInt(profiler_event_small_decl.height) : 1;
95+
var EVENT_SMALL_HEIGHT = profiler_event_small_decl ? parseInt(profiler_event_small_decl.height) : 1;
9696

9797
var MIN_DURATION = ProfilerView.MIN_DURATION;
9898

@@ -335,7 +335,7 @@ var ProfilerTemplates = function()
335335
"class", "profiler-event-tooltip-label"
336336
],
337337
this.format_time(event.interval.start) +
338-
" (rel: " + this.format_time(event.interval.start - range_start) + ")"
338+
" (Δ: " + this.format_time(event.interval.start - range_start) + ")"
339339
],
340340
["li",
341341
["span",

src/profiler/profiler_view.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,6 @@ var ProfilerView = function(id, name, container_class, html, default_handler)
315315
if (item.type == type)
316316
{
317317
item.time += event.time;
318-
continue;
319318
}
320319
}
321320
});
@@ -378,7 +377,7 @@ var ProfilerView = function(id, name, container_class, html, default_handler)
378377
{
379378
if (!this._has_overlay_service)
380379
return;
381-
var id = Number(target.get_ancestor_attr("data-event-id"));
380+
var id = Number(event.target.get_ancestor_attr("data-event-id"));
382381
var timeline_event = this._timeline_list.get_event_by_id(id);
383382
if (timeline_event)
384383
{
@@ -408,7 +407,7 @@ var ProfilerView = function(id, name, container_class, html, default_handler)
408407
{
409408
if (!this._has_overlay_service)
410409
return;
411-
var id = Number(target.get_attr("parent-node-chain", "data-event-id"));
410+
var id = Number(event.target.get_attr("parent-node-chain", "data-event-id"));
412411
var timeline_event = this._timeline_list.get_event_by_id(id);
413412
if (timeline_event)
414413
{

src/ui-scripts/zoomer/zoomer.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,8 @@ var ZoomerPrototype = function()
476476
*/
477477
this.set_zoomer_element = function(ele)
478478
{
479+
if (!ele)
480+
throw "The first argument to set_zoom_element has to be an element.";
479481
this._zoomer_ele = ele;
480482
this._set_up_zoomer_ele();
481483
this._set_up_overlay_ele();

0 commit comments

Comments
 (0)