Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ImportedProjects
SVG
Commits
f7c71a5c
Commit
f7c71a5c
authored
Oct 14, 2013
by
joreg
Browse files
added mousescroll event
parent
6a17e694
Changes
1
Hide whitespace changes
Inline
Side-by-side
Source/SvgElement.cs
View file @
f7c71a5c
...
...
@@ -709,6 +709,7 @@ namespace Svg
caller
.
RegisterAction
<
float
,
float
,
int
,
int
>(
rpcID
+
"onmousedown"
,
OnMouseDown
);
caller
.
RegisterAction
<
float
,
float
,
int
>(
rpcID
+
"onmouseup"
,
OnMouseUp
);
caller
.
RegisterAction
<
float
,
float
>(
rpcID
+
"onmousemove"
,
OnMouseMove
);
caller
.
RegisterAction
<
float
>(
rpcID
+
"onmousescroll"
,
OnMouseScroll
);
caller
.
RegisterAction
(
rpcID
+
"onmouseover"
,
OnMouseOver
);
caller
.
RegisterAction
(
rpcID
+
"onmouseout"
,
OnMouseOut
);
}
...
...
@@ -728,6 +729,7 @@ namespace Svg
caller
.
UnregisterAction
(
rpcID
+
"onmousedown"
);
caller
.
UnregisterAction
(
rpcID
+
"onmouseup"
);
caller
.
UnregisterAction
(
rpcID
+
"onmousemove"
);
caller
.
UnregisterAction
(
rpcID
+
"onmousescroll"
);
caller
.
UnregisterAction
(
rpcID
+
"onmouseover"
);
caller
.
UnregisterAction
(
rpcID
+
"onmouseout"
);
}
...
...
@@ -745,6 +747,9 @@ namespace Svg
[
SvgAttribute
(
"onmousemove"
)]
public
event
EventHandler
<
PointArg
>
MouseMove
;
[
SvgAttribute
(
"onmousescroll"
)]
public
event
EventHandler
<
PointArg
>
MouseScroll
;
[
SvgAttribute
(
"onmouseover"
)]
public
event
EventHandler
MouseOver
;
...
...
@@ -810,6 +815,21 @@ namespace Svg
handler
(
sender
,
e
);
}
}
//scroll
protected
void
OnMouseScroll
(
float
y
)
{
RaiseMouseScroll
(
this
,
new
PointArg
{
x
=
0
,
y
=
y
});
}
protected
void
RaiseMouseScroll
(
object
sender
,
PointArg
e
)
{
var
handler
=
MouseScroll
;
if
(
handler
!=
null
)
{
handler
(
sender
,
e
);
}
}
//over
protected
void
OnMouseOver
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment