Skip to content

Events

Methods can be used to respond to events, both triggered by user interaction and from grapper-view in its life cycle.

User events

You can capture all SVG events as click or mouseover with the g-on: directive and execute an associated method.

init event

The init event is fired for grapper-view when the component and each element are loaded, and before the template has been processed.

render event

The 'render' event is fired when the template has been processed; therefore, you can change the render process result.

Intersection

When the intersection-ratio attribute is set between 0 and 1:

  • the intersection.enter event is emitted when that proportion of the element is visible in the viewport.
  • the intersection.exit event is emitted when that proportion of the element is no longer visible in the viewport.

Released under the MIT License.