Skip to content

Commit acf419c

Browse files
committed
Show grids when holding shift while hovering paint events.
1 parent e71bd0e commit acf419c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/profiler/profiler_view.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,12 +436,20 @@ var ProfilerView = function(id, name, container_class, html, default_handler)
436436
if (timeline_event.type === TYPE_PAINT)
437437
{
438438
var area = timeline_event.paint.area;
439-
var config = {x: area.x, y: area.y, w: area.w, h: area.h};
439+
var config = {
440+
x: area.x,
441+
y: area.y,
442+
w: area.w,
443+
h: area.h,
444+
grid_color: event.shiftKey ? [255, 0, 0, 255] : null
445+
};
446+
440447
if (window.services["profiler"].satisfies_version(1, 1))
441448
{
442449
config.x += area.ox;
443450
config.y += area.oy;
444451
}
452+
445453
this._overlay.create_overlay(null, config);
446454
}
447455
}

0 commit comments

Comments
 (0)