resolveArtboard method

bool resolveArtboard()
inherited

Find the artboard in the hierarchy.

Implementation

bool resolveArtboard() {
  int sanity = maxTreeDepth;
  for (Component? curr = this;
      curr != null && sanity > 0;
      curr = curr.parent, sanity--) {
    visitAncestor(curr);
    if (curr is Artboard) {
      if (artboard != curr) {
        changeArtboard(curr);
      }
      return true;
    }
  }
  changeArtboard(null);
  return false;
}