Module: simple-observation

A mixin object containing custom methods for the table component.

Source:

Methods

(computed) hasFeatureStatsButton() → {boolean}

Checks should we display feature stats button

Source:
Returns:

True if the feature has a history button, false otherwise.

Type
boolean

(computed) hasHistoryButton() → {boolean}

Checks should we display feature history button

Source:
Returns:

True if the feature has a history button, false otherwise.

Type
boolean

(computed) imageChanged()

Method imageChanged
Source:

(computed) uploadURL()

Method uploadURL
Source:

(function) data()

Method data
Source:

(method) customUploadFactory()

Method customUploadFactory
Source:

(method) selectedTypeChanged()

Method selectedTypeChanged
Source:

(function) mounted()

Method mounted
Source:

(function) unmounted()

Method unmounted
Source:

(watcher) activeTab()

Method activeTab
Source:

(function) handler()

Method handler
Source:

(watcher) o()

Method o
Source:

(function) handler()

Method handler
Source:

(method) addFileFeature()

Method addFileFeature
Source:

(method) addImage()

Method addImage
Source:

(method) cancel()

Cancels changes.

Source:

(method) cancelImage()

Cancels editing the properties of an image.

Source:

(method) compassChanged(compass, id) → {void}

Handles compassChanged event from ImageViewer.

Parameters:
Name Type Description
compass number

The new compass value.

id number

The id of the image.

Source:
Returns:
Type
void

(method) customUpload()

Method customUpload
Source:

(method) defaultDate() → {string}

Formats the today's date.

Source:
Returns:

The formatted date.

Type
string

(method) deleteImage(file) → {Promise}

Deletes a single attached file asynchronously.

Parameters:
Name Type Description
file Object

The file to be deleted.

Source:
Returns:

A promise that resolves when the file is successfully deleted.

Type
Promise

(method) deleteObservation(id) → {Promise}

Deletes a single observation asynchronously.

Parameters:
Name Type Description
id number

The id of the observation to be deleted.

Source:
Returns:

A promise that resolves when the observation is successfully deleted.

Type
Promise

(method) editImage(index)

Starts editing the properties of an image.

Parameters:
Name Type Description
index object

Image to edit.

Source:

(method) filesAdded(files) → {Promise}

Event handler for the files added.

Parameters:
Name Type Description
files Array

The files added.

Source:
Returns:

A promise that resolves when the files are successfully added.

Type
Promise

(method) filesFailed(response)

Event handler for the file upload failure.

Parameters:
Name Type Description
response Object

The response object.

Source:

(method) filesUploaded(response)

Event handler for the file upload success.

Parameters:
Name Type Description
response Object

The response object.

Source:

(method) filesUrls() → {array}

Returns URLs of the files for download from server.

Source:
Returns:

URLs of the files.

Type
array

(method) finishImage(editedImage) → {void}

Finishes editing an image. Repositions the image on the map if it was moved or rotated

Parameters:
Name Type Description
editedImage object

The edited image.

Source:
Returns:
Type
void

(method) formFields(files) → {Array}

Creates object with additional form fields.

Parameters:
Name Type Description
files Array

The files to be uploaded.

Source:
Returns:

The array of additional form fields.

Type
Array

(method) getCompass(event) → {Compass}

Retrieves the compass value

Parameters:
Name Type Description
event Event

The event object.

Source:
Returns:

The compass value.

Type
Compass

(method) getGPSPosition() → {object}

Gets the GPS position.

Source:
Returns:

The GPS position as an object with latitude and longitude.

Type
object

(method) getLocationPosition()

Gets the position of selected feature.

Source:

(method) save()

Saves changes.

Source:

(method) saveImage()

Save modified properties of an image.

Source:

(method) setGPSPosition()

Sets the coordinates of a file to GPS position.

Source:

(method) setLocationPosition()

Sets the coordinates of a file to feature position.

Source:

(method) showImage(index)

Opens ImageViewer at a given index.

Parameters:
Name Type Description
index number

The index of the image to show.

Source:

(method) tabName(id) → {string}

Gets the name of the tab.

Parameters:
Name Type Description
id number

The id of the tab.

Source:
Returns:

The name of the tab.

Type
string

(method) validate()

Method validate
Source: