-
Notifications
You must be signed in to change notification settings - Fork 5
pdf‐frame Hooks and Events
Narayana Swamy edited this page May 4, 2024
·
1 revision
Hooks are the events that are emitted by the PDF-Frame on certain event occurrences. Hooks are defined on the PdfFrame tag as shown below:
<pdfFrame type="pdf" :width=595 :height=841 @on-ready="callbackMethod" @on-update="callbackMethod" @on-resize="callbackMethod" >
<\pdfFrame>
Below are the hooks which are supported.
Hooks | Description |
---|---|
on-ready | On-ready event is emitted when rendering instance is created |
on-update | On every update of the rendering instance, on-update event will be emitted |
on-resize | This event will be emitted on container resize. This is useful for handling chart resize |
pdfFrame supports a wide range of events on element tags. Events can be attached to the element via vuejs directives '@','v-on'. These events apply to the Canvas context alone, not to the PDF context.
<i-rect
@click="clickHndlr"
@mousemove="mousemoveHndlr">
</i-rect>
<i-rect
v-on:click="clickHndlr"
v-on:mousemove="mousemoveHndlr">
</i-rect>
Events supported:
- click
- dbclick
- mousemove
- mouseup
- mousedown
- mouseleave
- contextmenu
- touchstart
- touchend
- touchmove
- touchcancel