@rogieking/figui3 6.8.5 → 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/components.css +4 -1
- package/dist/components.css +1 -1
- package/dist/fig.css +1 -1
- package/dist/fig.js +14 -14
- package/fig.js +6 -1
- package/package.json +1 -1
package/fig.js
CHANGED
|
@@ -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
|
-
|
|
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