@rogieking/figui3 6.8.4 → 6.8.6

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/fig.js CHANGED
@@ -62,7 +62,7 @@ function createFigOverflowButtons({
62
62
  className: ["fig-overflow-chevron", chevronClass].filter(Boolean).join(" "),
63
63
  }),
64
64
  );
65
- button.addEventListener("pointerdown", (event) => {
65
+ button.addEventListener("click", (event) => {
66
66
  event.preventDefault();
67
67
  event.stopPropagation();
68
68
  onPointerDown?.(event);
@@ -13963,6 +13963,7 @@ class FigInputJoystick extends HTMLElement {
13963
13963
  const y = this.coordinates === "math" ? 1 - yScreen : yScreen;
13964
13964
  this.position = { x, y };
13965
13965
  if (syncHandle) this.#syncHandlePosition();
13966
+ this.#syncFields();
13966
13967
  this.#syncValueAttribute();
13967
13968
  }
13968
13969
 
@@ -14019,7 +14020,11 @@ class FigInputJoystick extends HTMLElement {
14019
14020
  if (this.cursor) {
14020
14021
  this.cursor.value = `${this.position.x * 100}% ${displayY * 100}%`;
14021
14022
  }
14022
- // Also sync text inputs if they exist (convert to percentage 0-100)
14023
+ this.#syncFields();
14024
+ }
14025
+
14026
+ // Sync the X/Y number fields to the current position (percentage 0-100).
14027
+ #syncFields() {
14023
14028
  if (this.#fieldsEnabled && this.xInput && this.yInput) {
14024
14029
  this.xInput.setAttribute("value", Math.round(this.position.x * 100));
14025
14030
  this.yInput.setAttribute("value", Math.round(this.position.y * 100));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rogieking/figui3",
3
- "version": "6.8.4",
3
+ "version": "6.8.6",
4
4
  "description": "A lightweight web components library for building Figma plugin and widget UIs with native look and feel",
5
5
  "author": "Rogie King",
6
6
  "license": "MIT",