resolveWithElement static method
Implementation
static void resolveWithElement(Object o, PCanvasElement element) {
if (o is WithElement) {
o.element ??= element;
}
if (o is WithParentElement &&
o.parent == null &&
element is PCanvasElement2D) {
var p = element.parent;
if (p is PCanvasElement) {
o.parent = p as PCanvasElement;
}
}
}