Class TravelEditor

This class contains methods fot Travel creation or modifications See theTravelEditor for the one and only one instance of this class

Source : file core/TravelEditor.js at line 47

Constructor

new TravelEditor ( )

The constructor

Source : file core/TravelEditor.js at line 106

Public methods

newTravel ( )

This method clear the current travel and start a new travel

Source : file core/TravelEditor.js at line 192

routeDropped ( draggedRouteObjId, targetRouteObjId, draggedBefore )

This method is called when a route is dropped in the TravelUI and then routes reordered.

Source : file core/TravelEditor.js at line 118

Parameters

Name Type Description
draggedRouteObjId Number

The objId of the dragged route

targetRouteObjId Number

The objId of the route on witch the drop was executed

draggedBefore Boolean

When true the dragged route is moved before the target route when false after

saveAsTravel ( )

This method save the current travel to a file. The user can choose to save the notes and the maneuvers

Source : file core/TravelEditor.js at line 143

saveTravel ( )

This method save the current travel to a file

Source : file core/TravelEditor.js at line 170

Private methods

#saveAsTravel ( saveAsDialogData )

This method save the travel to a file, removing notes and maneuvers, depending of the user choice.

Source : file core/TravelEditor.js at line 54

Parameters

Name Type Description
saveAsDialogData SaveAsDialogData

An object describing witch data must be saved

#verifyTravelName ( )

Verify that the travel have a name. Show an error and the TravelPropertiesDialog if no name

Source : file core/TravelEditor.js at line 93

Returns

True when the travel is named
Type : Boolean