screengraft 0.63.9 → 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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/ui/index.html +6 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "screengraft",
3
- "version": "0.63.9",
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
@@ -3084,7 +3084,11 @@ function paintGizmo(){
3084
3084
  const show = dofOn && st.corners && st.shotSize && !im.hidden && im.naturalWidth && $('#liveWrap').hidden;
3085
3085
  gz.toggleAttribute('hidden', !show);
3086
3086
  if (!show) return;
3087
- const W = im.naturalWidth, Hh = im.naturalHeight;
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;
3088
3092
  gz.setAttribute('viewBox', `0 0 ${W} ${Hh}`);
3089
3093
  gz.style.left = im.offsetLeft + 'px'; gz.style.top = im.offsetTop + 'px';
3090
3094
  gz.style.width = im.clientWidth + 'px'; gz.style.height = im.clientHeight + 'px';
@@ -3146,7 +3150,7 @@ function moveFocus(f){
3146
3150
  // pointer position in SCREENSHOT pixels
3147
3151
  function gizmoPos(e, g){
3148
3152
  const rc = gz.getBoundingClientRect();
3149
- const W = $('#outImg').naturalWidth, Hh = $('#outImg').naturalHeight;
3153
+ const W = img.naturalWidth, Hh = img.naturalHeight; // photo pixels, as above
3150
3154
  const photo = [(e.clientX - rc.left) * W / rc.width, (e.clientY - rc.top) * Hh / rc.height];
3151
3155
  return applyH(g.Hi, photo);
3152
3156
  }