screengraft 0.63.8 → 0.63.10
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 +17 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "screengraft",
|
|
3
|
-
"version": "0.63.
|
|
3
|
+
"version": "0.63.10",
|
|
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
|
@@ -792,6 +792,17 @@
|
|
|
792
792
|
button.switch:focus-visible .sw-track{box-shadow:0 0 0 3px var(--acc-soft);border-color:var(--acc)}
|
|
793
793
|
|
|
794
794
|
#outPane{display:grid}
|
|
795
|
+
/* No native scrollbars on either well (14 Sep 2026). With a mouse attached
|
|
796
|
+
macOS draws CLASSIC scrollbars, always visible, and each well then gives
|
|
797
|
+
up 17px at the bottom and the right to the track; in Safari's dark theme
|
|
798
|
+
the horizontal track is a black band with the photo stopping above it --
|
|
799
|
+
"the photo is cropped a bit at the bottom", both panes, every zoom route.
|
|
800
|
+
Measured in that Safari: offsetHeight 824, clientHeight 807, scrollHeight
|
|
801
|
+
nine more than the canvas; with the bars hidden all three agree. The
|
|
802
|
+
design's well has no scrollbar; panning is the wheel, cmd+wheel and
|
|
803
|
+
space-drag, and the result pane mirrors this one. */
|
|
804
|
+
#scroller,#outWrap{scrollbar-width:none}
|
|
805
|
+
#scroller::-webkit-scrollbar,#outWrap::-webkit-scrollbar{display:none}
|
|
795
806
|
#outWrap{overflow:auto;overscroll-behavior:none;background:var(--well);display:grid;box-shadow:inset 0 1px 3px rgba(0,0,0,.5)}
|
|
796
807
|
/* The depth-of-field gizmo: an SVG laid exactly over the composite, drawn
|
|
797
808
|
in PHOTO pixels (its viewBox is the photo) so every coordinate is the
|
|
@@ -3073,7 +3084,11 @@ function paintGizmo(){
|
|
|
3073
3084
|
const show = dofOn && st.corners && st.shotSize && !im.hidden && im.naturalWidth && $('#liveWrap').hidden;
|
|
3074
3085
|
gz.toggleAttribute('hidden', !show);
|
|
3075
3086
|
if (!show) return;
|
|
3076
|
-
|
|
3087
|
+
// PHOTO pixels, not the preview's: the corners and every gizmo coordinate
|
|
3088
|
+
// are in the photograph's own pixels, and the preview is a resample of the
|
|
3089
|
+
// whole photograph at <=1600px wide. Sizing the viewBox to the preview put
|
|
3090
|
+
// the lines off the picture on any photo wider than 1600px (14 Sep 2026).
|
|
3091
|
+
const W = img.naturalWidth, Hh = img.naturalHeight;
|
|
3077
3092
|
gz.setAttribute('viewBox', `0 0 ${W} ${Hh}`);
|
|
3078
3093
|
gz.style.left = im.offsetLeft + 'px'; gz.style.top = im.offsetTop + 'px';
|
|
3079
3094
|
gz.style.width = im.clientWidth + 'px'; gz.style.height = im.clientHeight + 'px';
|
|
@@ -3135,7 +3150,7 @@ function moveFocus(f){
|
|
|
3135
3150
|
// pointer position in SCREENSHOT pixels
|
|
3136
3151
|
function gizmoPos(e, g){
|
|
3137
3152
|
const rc = gz.getBoundingClientRect();
|
|
3138
|
-
const W =
|
|
3153
|
+
const W = img.naturalWidth, Hh = img.naturalHeight; // photo pixels, as above
|
|
3139
3154
|
const photo = [(e.clientX - rc.left) * W / rc.width, (e.clientY - rc.top) * Hh / rc.height];
|
|
3140
3155
|
return applyH(g.Hi, photo);
|
|
3141
3156
|
}
|