This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
render() { | |
return ( | |
<panel> | |
<div id="name-height"> | |
<input | |
id="icon-search-input" | |
autoFocus | |
placeholder="icon name" | |
uxp-quiet="true" | |
type="search" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Artboard, Group } from 'scenegraph' | |
// Strictly speaking, promoteArtboards means follow the spec. | |
// For some usage, we don't want that behavior. | |
function computeEditContextRoot(selection, promoteArtboards = true) { | |
// Number of nodes above the given node in the artwork tree. | |
function computeDepthToRoot(node) { | |
let depth = 0 | |
while (node.parent != null) { | |
node = node.parent |