Mirrors picasso's device-resize pattern. 10x10 handle at frame's
bottom-right; pointerdown→drag→PATCH width+height on release. Min
200x150. Doesn't interfere with frame-body drag or label-as-grip
selection.
m: 'We should also be able to resize frames, the same way we do with
devices.' Mirrors the device-resize pattern (89686d0).
- 10×10 SVG handle drawn at each frame's bottom-right corner with class
.frame-resize-handle + cursor: nwse-resize. Appended after the label
so it sits on top of the rect and wins the pointerdown.
- startFrameResize captures the pointer, stops propagation so the
rect's pointerdown (= startDrag 'frame') doesn't also fire, and
updates f.width / f.height on every pointermove using svgPoint
deltas — works at any zoom level via the same world-coord conversion
the rest of the canvas uses.
- Clamps to 200×150 minimum during the drag (frames need more room
than devices since they host devices + IO markers + clamps).
- On pointerup: PATCH /api/projects/:pid/frames/:id with the new width
+ height. Contained children stay at their absolute positions — the
frame body drag is what moves them; resize only changes the frame's
own bounds, so devices/IO markers/clamps inside don't shift.
Drop pointer-events:none on .frame-label and add a pointerdown that
fires startDrag(e,'frame',f.id) — gives m a deterministic select-and-
drag grip at the top-left of every frame where devices/cables can't
occlude it.
but uses the accent-on-frame palette so it reads as part of the frame
chrome rather than the device. */
.frame-resize-handle{
fill:rgba(0,0,0,0.15);
stroke:rgba(0,0,0,0.25);
stroke-width:1;
cursor:nwse-resize;
}
.frame-resize-handle:hover{
fill:rgba(0,0,0,0.3);
}
/* Stroke + fill come from the device's user-set colour, written as
inline style in renderCanvas — leaving them out of .device-rect so
the author CSS doesn't override the inline style. */
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.