Annotations are simply marks and notes created on top of a document in order to give users the possibility to interact with the document while preserving the original document.
The annotation is implemented using the Flexpaper viewer with annotations plugin. The annotation plugin generates specifics events which can be captures using the javascript api provided by them.
onMarkCreated - This javascript function would get called when a new note is created.
onMarkChanged - This api would get called when a note's content gets changed. This event is used to add/update the node into the Database. a 5sec delay in calling this api (as per the desing of the api).
Table name - annotations
| Column_name | type | Description |
|---|---|---|
| id | integer | primary key |
| content | text | content in the annotation |
| owner_id | integer | who created this annotation |
| page_index | integer | document page no where the annotation is |
| position_x | inter | x cordinate value |
| postion_y | integer | y cordinate value |
| width | integer | width of the note |
| height | integer | height of the note |
| created_at | date_time | created date |
| updated_at | date_time | updated date |
| asset_id | integer | foreign key to the assets table. |