A mixin object containing custom methods for the table component.
Methods
(computed) hasFeatureStatsButton() → {boolean}
Checks should we display feature stats button
Returns:
True if the feature has a history button, false otherwise.
- Type
- boolean
(computed) hasHistoryButton() → {boolean}
Checks should we display feature history button
Returns:
True if the feature has a history button, false otherwise.
- Type
- boolean
(computed) imageChanged()
(computed) uploadURL()
(function) data()
(method) customUploadFactory()
(method) selectedTypeChanged()
(function) mounted()
(function) unmounted()
(watcher) activeTab()
(function) handler()
(watcher) o()
(function) handler()
(method) addFileFeature()
(method) addImage()
(method) cancel()
Cancels changes.
(method) cancelImage()
Cancels editing the properties of an image.
(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. |
Returns:
- Type
- void
(method) customUpload()
(method) defaultDate() → {string}
Formats the today's date.
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. |
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. |
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. |
(method) filesAdded(files) → {Promise}
Event handler for the files added.
Parameters:
Name | Type | Description |
---|---|---|
files |
Array | The files added. |
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. |
(method) filesUploaded(response)
Event handler for the file upload success.
Parameters:
Name | Type | Description |
---|---|---|
response |
Object | The response object. |
(method) filesUrls() → {array}
Returns URLs of the files for download from server.
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. |
Returns:
- Type
- void
(method) formFields(files) → {Array}
Creates object with additional form fields.
Parameters:
Name | Type | Description |
---|---|---|
files |
Array | The files to be uploaded. |
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. |
Returns:
The compass value.
- Type
- Compass
(method) getGPSPosition() → {object}
Gets the GPS position.
Returns:
The GPS position as an object with latitude and longitude.
- Type
- object
(method) getLocationPosition()
Gets the position of selected feature.
(method) save()
Saves changes.
(method) saveImage()
Save modified properties of an image.
(method) setGPSPosition()
Sets the coordinates of a file to GPS position.
(method) setLocationPosition()
Sets the coordinates of a file to feature position.
(method) showImage(index)
Opens ImageViewer at a given index.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | The index of the image to show. |
(method) tabName(id) → {string}
Gets the name of the tab.
Parameters:
Name | Type | Description |
---|---|---|
id |
number | The id of the tab. |
Returns:
The name of the tab.
- Type
- string