Module: annotation

The directive handles the logic behind a single annotation. The annotation must be implemented to the element as a directive declaration, because IE does not support custom elements reliably. In example, use: <span annotation="">...</span> instead of <annotation>...</annotation>.

Author:
  • Joonas Lattu
  • Petteri Palojärvi
  • Seppo Tarvainen
Source:

Methods

(inner) changePoints()

Changes points of the selected annotation. Qeries parent scope and changes the points of the corresponding annotation.

Source:

(inner) checkIfChanged() → {boolean}

Checks if the annotation is changed compared to its last saved state.

Source:
Returns:

Whether any modifications were made or not

Type
boolean

(inner) checkRights() → {boolean}

Checks if the user has rights to edit the annotation.

Source:
Returns:

Whether the user has rights or not

Type
boolean

(inner) deleteAnnotation()

Deletes the selected annotation. Queries parent scope and deletes the corresponding annotation from there.

Source:

(inner) focusTextarea()

Focuses on the comment field of the annotation.

Source:

(inner) keyDownFunc(event)

Detects the Ctrl + S and Ctrl+Enter key strokes on the text area.

Parameters:
Name Type Description
event

Current event

Source:

(inner) keyUpFunc(event)

Detects if Ctrl-key is released.

Parameters:
Name Type Description
event

Current event

Source:

(inner) saveChanges()

Saves the changes made to the annotation. Queries parent scope and updates the changes of the corresponding annotation.

Source:

(inner) showAnnotation()

Shows the annotation.

Source:

(inner) toggleAnnotation()

Toggles the visibility of the annotation.

Source:

(inner) updateAnnotation()

Updates the annotation and toggles its visibility in the margin.

Source:

(inner) updateVelpZIndex()

Updates the z-index attribute of the annotation.

Source: