@umicat/phaser-sdk 1.0.4 → 1.0.5
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.
|
@@ -305,9 +305,17 @@ export declare class EditorOverlayScene extends Phaser.Scene {
|
|
|
305
305
|
*/
|
|
306
306
|
private commitEntityResize;
|
|
307
307
|
/**
|
|
308
|
-
* Render the
|
|
308
|
+
* Render the CORNER resize handles around the selected rect entity —
|
|
309
|
+
* Figma convention (2026-06-11): no edge-midpoint squares. On a small
|
|
310
|
+
* entity 8 handles visually swallowed the rect (a 3×3 grid of squares
|
|
311
|
+
* with the entity peeking through the middle). Edges stay fully
|
|
312
|
+
* resizable — the entire selection edge is a hit target and the cursor
|
|
313
|
+
* flips to ns/ew-resize on hover, which is affordance enough. No bounds
|
|
309
314
|
* outline (the blue selection rect already draws it) and no ghost rect
|
|
310
315
|
* (the live GO resizes in place during the drag).
|
|
316
|
+
*
|
|
317
|
+
* Visual is 10px; the hit target stays 14px (see hitTestResizeHandlesAt)
|
|
318
|
+
* — bigger-than-visible click zones are standard.
|
|
311
319
|
*/
|
|
312
320
|
private drawEntityResizeOverlay;
|
|
313
321
|
update(): void;
|
|
@@ -1692,9 +1692,17 @@ export class EditorOverlayScene extends Phaser.Scene {
|
|
|
1692
1692
|
postSelectionRect(this.game);
|
|
1693
1693
|
}
|
|
1694
1694
|
/**
|
|
1695
|
-
* Render the
|
|
1695
|
+
* Render the CORNER resize handles around the selected rect entity —
|
|
1696
|
+
* Figma convention (2026-06-11): no edge-midpoint squares. On a small
|
|
1697
|
+
* entity 8 handles visually swallowed the rect (a 3×3 grid of squares
|
|
1698
|
+
* with the entity peeking through the middle). Edges stay fully
|
|
1699
|
+
* resizable — the entire selection edge is a hit target and the cursor
|
|
1700
|
+
* flips to ns/ew-resize on hover, which is affordance enough. No bounds
|
|
1696
1701
|
* outline (the blue selection rect already draws it) and no ghost rect
|
|
1697
1702
|
* (the live GO resizes in place during the drag).
|
|
1703
|
+
*
|
|
1704
|
+
* Visual is 10px; the hit target stays 14px (see hitTestResizeHandlesAt)
|
|
1705
|
+
* — bigger-than-visible click zones are standard.
|
|
1698
1706
|
*/
|
|
1699
1707
|
drawEntityResizeOverlay() {
|
|
1700
1708
|
const info = this.entityResizeHandlePositions();
|
|
@@ -1702,9 +1710,11 @@ export class EditorOverlayScene extends Phaser.Scene {
|
|
|
1702
1710
|
return;
|
|
1703
1711
|
const cam = this.findActiveEditorCamera();
|
|
1704
1712
|
const zoom = cam?.zoom ?? 1;
|
|
1705
|
-
const handleSize =
|
|
1713
|
+
const handleSize = 10 / zoom; // 10px on screen regardless of zoom
|
|
1706
1714
|
const half = handleSize / 2;
|
|
1707
1715
|
for (const h of info.handles) {
|
|
1716
|
+
if (h.id !== 'nw' && h.id !== 'ne' && h.id !== 'sw' && h.id !== 'se')
|
|
1717
|
+
continue;
|
|
1708
1718
|
this.graphics.fillStyle(0xffffff, 1);
|
|
1709
1719
|
this.graphics.fillRect(h.x - half, h.y - half, handleSize, handleSize);
|
|
1710
1720
|
this.graphics.fillStyle(SELECTION_COLOR, 1);
|