Commit 23a53f05 authored by Tebjan Halm's avatar Tebjan Halm
Browse files

improved event publishing

parent 0fdceefc
......@@ -414,7 +414,9 @@ namespace Svg
}
}
//events
if(AutoPublishEvents)
foreach (var attr in _svgEventAttributes)
{
var evt = attr.Event.GetValue(this);
......@@ -432,6 +434,8 @@ namespace Svg
}
}
public bool AutoPublishEvents = true;
private bool TryResolveParentAttributeValue(string attributeKey, out object parentAttributeValue)
{
parentAttributeValue = null;
......@@ -685,11 +689,16 @@ namespace Svg
}
protected void OnMouseDown(float x, float y, int button, int clickCount)
{
RaiseMouseDown(this, new MouseArg { x = x, y = y, Button = button, ClickCount = clickCount});
}
protected void RaiseMouseDown(object sender, MouseArg e)
{
var handler = MouseDown;
if (handler != null)
{
handler(this, new MouseArg { x = x, y = y, Button = button, ClickCount = clickCount});
handler(sender, e);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment