figfoundry 0.3.0__tar.gz → 0.3.1__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: figfoundry
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: WYSIWYG matplotlib figure composer: load data (.npz/.pkl), drag signals onto a canvas to build plots, and export clean reproducible code.
5
5
  Project-URL: Homepage, https://github.com/ductai199x/figfoundry
6
6
  Project-URL: Repository, https://github.com/ductai199x/figfoundry
@@ -252,11 +252,14 @@ function addRotHandle(movDiv, id) {
252
252
  const startAng = Math.atan2(e.clientY - cy0, e.clientX - cx0);
253
253
  const tgt = rotTarget(id); const rot0 = tgt.get();
254
254
  if (state.sliderSnapshot === null) state.sliderSnapshot = clone(state.spec);
255
+ // CSS rotate() is clockwise-positive (screen), matplotlib rotation is
256
+ // counterclockwise-positive, so the box preview is rotate(-spec).
257
+ movDiv.style.transform = `rotate(${-rot0}deg)`;
255
258
  const onMove = (ev) => {
256
- let d = (Math.atan2(ev.clientY - cy0, ev.clientX - cx0) - startAng) * 180 / Math.PI;
259
+ let d = (Math.atan2(ev.clientY - cy0, ev.clientX - cx0) - startAng) * 180 / Math.PI; // CW-positive on screen
257
260
  if (ev.shiftKey) d = Math.round(d / 15) * 15;
258
- let r = Math.round(rot0 + d); r = ((r % 360) + 360) % 360; if (r > 180) r -= 360;
259
- tgt.set(r); movDiv.style.transform = `rotate(${r}deg)`; scheduleDraft();
261
+ let S = Math.round(rot0 - d); S = ((S % 360) + 360) % 360; if (S > 180) S -= 360; // spec (CCW+), normalized
262
+ tgt.set(S); movDiv.style.transform = `rotate(${-S}deg)`; scheduleDraft();
260
263
  };
261
264
  const onUp = (ev) => { try { h.releasePointerCapture(ev.pointerId); } catch (_) {} document.removeEventListener("pointermove", onMove); document.removeEventListener("pointerup", onUp); movDiv.style.transform = ""; commitSnapshot(); commit(); };
262
265
  document.addEventListener("pointermove", onMove); document.addEventListener("pointerup", onUp);
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "figfoundry"
3
- version = "0.3.0"
3
+ version = "0.3.1"
4
4
  description = "WYSIWYG matplotlib figure composer: load data (.npz/.pkl), drag signals onto a canvas to build plots, and export clean reproducible code."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes