Exemple #1
0
void AngelWidgetTarget::onAttatchedImpl()
{
	Handler<World> world = this->world();
	if( unlikely(!world) ) {
		return;
	}
	Handler<WidgetElement> const element = world->findWidgetById(id_);
	if( unlikely(!element) ) {
		return;
	}
	geom::Area area(element->widget()->findTargetInElement(guide_));
	geom::Point center( area.center() );
	if( !area.empty() && !element->lastInnerDrawnAreaInRoot().contain(center+element->lastPositionInRoot()) ) {
		element->showPoint(center);
	}
}