Angular controller

controller source

Description

Main controller of composition module

Methods

add

Load new composition (with service_parser Load function) and merge it with old composition

confirmDelete (composition, ev)

Display delete dialog of composition

Parameters

NameTypeDescription
composition object

Composition selected for deletion

ev object

delete (composition)

Delete selected composition from project (including deletion from composition server, useful for user created compositions)

Parameters

NameTypeDescription
composition object

Composition selected for deletion

detailComposition (record)

Load info about composition through service and display composition info dialog

Parameters

NameTypeDescription
record object

Composition to show details

filterChanged

Reloads compositions from start, used as callback when filters are changed in view

getNextCompositions

Load next list of compositions to display on pager (number per page set by hs.compositions.controller#page_size hs.compositions.controller#page_size)

getPreviousCompositions

Load previous list of compositions to display on pager (number per page set by hs.compositions.controller#page_size hs.compositions.controller#page_size)

highlightComposition (composition, state)

Highlight (or dim) composition, toogle visual state of composition extent on map

Parameters

NameTypeDescription
composition Object

Composition to highlight

state Boolean

Target state of composition ( True - highlighted, False - normal)

loadComposition (record)

Load selected composition in map, if current composition was edited display Ovewrite dialog

Parameters

NameTypeDescription
record object

Composition to be loaded

loadCompositions

Load list of compositions according to current filter values and pager position (filter, keywords, current extent, start composition, compositions number per page). Display compositions extent in map

overwrite

Load new composition without saving old composition

save

Open Status creator panel for saving old composition

setSortAttribute (attribute)

Set sort attribute for sorting composition list and reload compositions

Parameters

NameTypeDescription
attribute String

Attribute by which compositions should be sorted (expected values: bbox, title, date)

shareComposition (record)

Prepare share object on server and display share dialog to share composition

Parameters

NameTypeDescription
record object

Composition to share

toggleKeywords

Toogle keywords panel on compositions panel