GuidedTourController

Class: GuidedTourController Description : The GuidedTourController is an object handling the view, interracting with the server to get information and data (guided tours) It handles the display of guided tours in the guided tour window, and all the functionalities related to the guided tour (start, exit, next, previous...) GuidedTours are made of steps with properties : index, document, text1 and text2.

Constructor

new GuidedTourController(documentModule, requestService, configServer)

Constructor for GuidedTourController The controller reads data from a database to build one or more guided tours Each guided tour is a succession of "steps" Each step has a document + tour text + doc text (steps are instances of the TourStep class) Multiple guided tours are supported (only one tour is finished for the demo) For the demo : options.preventUserFromChangingTour allows to hide the buttons for changing tour

Parameters:
NameTypeDescription
documentModuleDocumentModule

The document module.

requestServiceRequestService

The request service

configServerobject

The server configuration.

Properties
NameTypeDescription
urlstring

The base URL of the server.

guidedTourstring

The route for guided tours.

Classes

GuidedTourController

Methods

getCurrentStep() → {*}

Returns the current tour step

Returns:

Current step

Type: 
*

getCurrentTour() → {GuidedTour}

Returns the current guided tour if there are any

Returns:

Current guided tour

Type: 
GuidedTour

getGuidedTours()

Get all guided tour from a database

getNextStep() → {*}

Sets the current step to the next step and returns it.

Returns:

Next step

Type: 
*

getNextTour() → {GuidedTour}

Sets the current guided tour to the next guided tour and returns it.

Returns:

Next guided tour

Type: 
GuidedTour

getPreviousStep() → {*}

Sets the current step to the previous step and returns it.

Returns:

Previous step

Type: 
*

getPreviousTour() → {GuidedTour}

Sets the current guided tour to the previous guided tour and returns it.

Returns:

Previous guided tour

Type: 
GuidedTour

reset()

Reset browser at the begining of the guided tours