screengraft 0.63.4 → 0.63.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/ui/index.html +21 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "screengraft",
|
|
3
|
-
"version": "0.63.
|
|
3
|
+
"version": "0.63.5",
|
|
4
4
|
"description": "Put a UI screenshot or screen recording onto a photographed device screen with the perspective exactly right \u2014 a homography you confirm by hand, not a generative guess.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mockup",
|
package/ui/index.html
CHANGED
|
@@ -558,6 +558,11 @@
|
|
|
558
558
|
.pane{min-width:0;min-height:0;display:grid;grid-template-rows:minmax(0,1fr);
|
|
559
559
|
grid-template-columns:minmax(0,1fr);
|
|
560
560
|
position:relative; /* the frame the rails are anchored to */
|
|
561
|
+
/* An isolated group: the blend rings on the rails and pills composite
|
|
562
|
+
against THIS pane's content -- the well, the canvas, the result
|
|
563
|
+
image -- as one unit, rather than against whatever layer the
|
|
564
|
+
compositor happened to have on hand at first paint. */
|
|
565
|
+
isolation:isolate;
|
|
561
566
|
border-right:1px solid var(--line)}
|
|
562
567
|
.panehead{display:flex;align-items:center;gap:var(--s2);padding:var(--s2) var(--s4);background:var(--card);
|
|
563
568
|
box-shadow:inset 0 -1px 0 var(--line);font-size:12px;flex-wrap:wrap;min-height:48px}
|
|
@@ -2121,6 +2126,7 @@ async function maybeStart(){
|
|
|
2121
2126
|
const ready = !!st.shot; // the screenshot gates the fit, not the photo
|
|
2122
2127
|
img.onload = () => {
|
|
2123
2128
|
computeFit(); setCanvasZoom(fitScale);
|
|
2129
|
+
refreshRings();
|
|
2124
2130
|
if (!ready){
|
|
2125
2131
|
// Photo only: show it immediately so choosing one visibly does
|
|
2126
2132
|
// something. No quad yet — there is nothing to fit into it.
|
|
@@ -2502,6 +2508,20 @@ $('#resetquad').onclick = () => {
|
|
|
2502
2508
|
draw(); drawStrip(); autoPreview();
|
|
2503
2509
|
};
|
|
2504
2510
|
|
|
2511
|
+
// The blend rings on the rails and pills are painted against what is under
|
|
2512
|
+
// them at the time; when a NEW picture lands in the canvas or the result pane
|
|
2513
|
+
// they can keep a result blended against the empty well until something else
|
|
2514
|
+
// invalidates them (reported 14 Sep 2026: the stroke appeared only after the
|
|
2515
|
+
// picture was moved). Toggling display forces a fresh paint of each ring.
|
|
2516
|
+
function refreshRings(){
|
|
2517
|
+
document.querySelectorAll('.bgroup > .ring, .pillwrap > .ring').forEach(r => {
|
|
2518
|
+
r.style.display = 'none'; void r.offsetHeight; r.style.display = '';
|
|
2519
|
+
});
|
|
2520
|
+
// ::before / ::after rings ride on the group; nudge the group itself.
|
|
2521
|
+
document.querySelectorAll('.bgroup').forEach(g => {
|
|
2522
|
+
g.style.willChange = 'transform'; void g.offsetHeight; g.style.willChange = '';
|
|
2523
|
+
});
|
|
2524
|
+
}
|
|
2505
2525
|
function syncCornerRail(){
|
|
2506
2526
|
const i = pick && pick.kind === 'corner' ? pick.i : -1;
|
|
2507
2527
|
document.querySelectorAll('#lrail [data-jump]').forEach(b => {
|
|
@@ -3598,6 +3618,7 @@ async function renderPreview(){
|
|
|
3598
3618
|
const im = $('#outImg');
|
|
3599
3619
|
im.onload = () => {
|
|
3600
3620
|
outNat = im.naturalWidth;
|
|
3621
|
+
refreshRings();
|
|
3601
3622
|
// autoPreview runs on every drag, and it must not yank the pane away from
|
|
3602
3623
|
// a clip that is playing. The still is still rendered and waiting behind.
|
|
3603
3624
|
if ($('#liveWrap').hidden) showResult('still');
|