Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/selectors/src/internal/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ export function isNodeVisible(node: SnapshotNode): boolean {
return node.rect.width > 0 && node.rect.height > 0;
}

/**
* False for a disabled node. Otherwise the node's published `editable` fact decides, and the
* platform type decides only when the snapshot carries no such fact.
*/
export function isNodeEditable(node: SnapshotNode, platform: Platform | PublicPlatform): boolean {
if (node.enabled === false) return false;
return node.editable ?? isFillableType(node.type ?? '', platform);
Expand Down
Loading