You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a fantastic library. Thank you for contributing it!
Describe the bug
I am attempting to register mouse events on individual SVG elements in order to create click-and-drag function. Mouse events "clickEvent" and "doubleClickEvent" are registering on svg-container but not on individual SVG elements, such as svg-circle.
To Reproduce
Create an svg-circle HTML tag with mouse event listeners, such as the following: <svg-circle diameter=25 color="#FF0000" x=450 y=50 [classes]="classesCir" (clickEvent)="setToken($event)" (doubleClickEvent)="pickupToken($event)" ></svg-circle>
Create event listeners, such as the following" setToken(evt) { const fid = id + "setToken(): "; console.log(fid); } pickupToken(evt) { const fid = id + "pickupToken(): " + JSON.stringify(evt); console.log(fid); }
Execute the code and click on the SVG Circle. Note there is no output in the console.
I expect this may be a documentation error. For svg-circle, the demo and documentation at: https://vvaldersteins.github.io/ngx-svg/home
indicate that clickEvent and doubleClickEvent are parameters of svg-circle.
Expected behavior
Registered mouse events occurring on the individual SVG elements should be handled.
Additional context
From other bug reports, it appears that SVG.js events can be referenced in ngx-sgv, such as these: https://svgjs.com/docs/3.1/events/
Are these passed through ngx-svg?
Best,
Mark
The text was updated successfully, but these errors were encountered:
I was unable to register an event listener for objects outside the svg-container, but failed to trigger any events on objects inside the svg-container using this method.
This is a fantastic library. Thank you for contributing it!
Describe the bug
I am attempting to register mouse events on individual SVG elements in order to create click-and-drag function. Mouse events "clickEvent" and "doubleClickEvent" are registering on svg-container but not on individual SVG elements, such as svg-circle.
To Reproduce
<svg-circle diameter=25 color="#FF0000" x=450 y=50 [classes]="classesCir"
(clickEvent)="setToken($event)"
(doubleClickEvent)="pickupToken($event)"
></svg-circle>
setToken(evt) {
const fid = id + "setToken(): ";
console.log(fid);
}
pickupToken(evt) {
const fid = id + "pickupToken(): " + JSON.stringify(evt);
console.log(fid);
}
I expect this may be a documentation error. For svg-circle, the demo and documentation at:
https://vvaldersteins.github.io/ngx-svg/home
indicate that clickEvent and doubleClickEvent are parameters of svg-circle.
But the GitHub documentation at:
https://github.com/vvaldersteins/ngx-svg#circle
does not indicate that clickEvent and doubleClickEvent are parameters of svg-circle.
Expected behavior
Registered mouse events occurring on the individual SVG elements should be handled.
Additional context
From other bug reports, it appears that SVG.js events can be referenced in ngx-sgv, such as these:
https://svgjs.com/docs/3.1/events/
Are these passed through ngx-svg?
Best,
Mark
The text was updated successfully, but these errors were encountered: