Skip to content

Commit bd53b08

Browse files
authored
Merge pull request #35 from trtshen/copilot/fix-27
Add center marker/crosshair overlay for display alignment testing
2 parents b96351c + 4a2acdb commit bd53b08

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

app.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,10 @@ class ScreenTester extends React.Component {
246246
case "G":
247247
document.body.classList.toggle("show-grid");
248248
break;
249+
case "c":
250+
case "C":
251+
document.body.classList.toggle("show-crosshair");
252+
break;
249253
case "Escape":
250254
if (document.fullscreenElement) document.exitFullscreen();
251255
break;

index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,21 @@
9898
pointer-events: none;
9999
z-index: 1000;
100100
}
101+
102+
.show-crosshair::before {
103+
content: '';
104+
position: fixed;
105+
top: 50%;
106+
left: 50%;
107+
width: 100%;
108+
height: 100%;
109+
background-image:
110+
linear-gradient(0deg, transparent calc(50% - 1px), white calc(50% - 1px), white calc(50% + 1px), transparent calc(50% + 1px)),
111+
linear-gradient(90deg, transparent calc(50% - 1px), white calc(50% - 1px), white calc(50% + 1px), transparent calc(50% + 1px));
112+
transform: translate(-50%, -50%);
113+
pointer-events: none;
114+
z-index: 1001;
115+
}
101116
</style>
102117
</head>
103118
<body>

0 commit comments

Comments
 (0)