void IEventPortal.PortalMouseDown(UIMouseEventArgs e)
{
//find hit svg graphics....
SvgHitChain hitChain = GetFreeHitChain();
hitChain.SetRootGlobalPosition(e.X, e.Y);
//1. hit test
HitTestCore(this.SvgRoot.SvgSpec, hitChain, e.X, e.Y);
SetEventOrigin(e, hitChain);
//2. propagate event portal
ForEachOnlyEventPortalBubbleUp(e, hitChain, (portal) =>
{
portal.PortalMouseDown(e);
return(true);
});
if (!e.CancelBubbling)
{
//2. propagate events
ForEachSvgElementBubbleUp(e, hitChain, () =>
{
//-------
//temp test only
//-------
var svgElement = e.ExactHitObject as SvgElement;
if (svgElement is SvgRect)
{
((SvgRect)svgElement).FillColor = Color.White;
}
return(true);
});
}
e.CancelBubbling = true;
ReleaseHitChain(hitChain);
}