Class NoteHTMLViewsFactory

This class creates HTMLElements for notes

Source : file viewsFactories/NoteHTMLViewsFactory.js at line 40

Constructor

new NoteHTMLViewsFactory ( )

The constructor

Source : file viewsFactories/NoteHTMLViewsFactory.js at line 62

Public methods

getNoteTextAndIconHTML ( classPrefix, noteAndRoute )

Gives an HTMLElement with the note icon and sames values than the this.getNoteTextHTML method

Source : file viewsFactories/NoteHTMLViewsFactory.js at line 73

Parameters

Name Type Description
classPrefix String

A string that will be added to all the className of the created HTMLElement

noteAndRoute NoteAndRoute

A NoteAndRoute object with the note and the route to witch the note is attached

Returns

An HTMLElement with the icon and texts for a Note
Type : HTMLElement

getNoteTextHTML ( classPrefix, noteAndRoute )

Gives an HTMLElement with the tooltipContent (if any), popupContent (if any) address (if any), phone (if any), url (if any), latitude, longitude, distance since the start of the travel (if the note is attached to a chained node), distance since the start of the route (if the note is a route note) and distance till the next note(if the note is a route note)

Source : file viewsFactories/NoteHTMLViewsFactory.js at line 131

Parameters

Name Type Description
classPrefix String

A string that will be added to all the className of the created HTMLElements

noteAndRoute NoteAndRoute

A NoteAndRoute object with the note and the route to witch the note is attached

Returns

An HTMLElement
Type : HTMLElement

getTravelNotesHTML ( classPrefix )

Gives an HTMLElement with all the travel notes

Source : file viewsFactories/NoteHTMLViewsFactory.js at line 284

Parameters

Name Type Description
classPrefix String

A string that will be added to all the className of the created HTMLElements

Returns

An HTMLElement with all the travel notes
Type : HTMLElement

Private getters and setters

readonly static get #LINKS_MAX_LENGTH : Number

The max length for displayed links

Source : file viewsFactories/NoteHTMLViewsFactory.js at line 48

readonly static get #MIN_NOTES_DISTANCE : Number

// The minimal distance between note to display the 'Next note after' value

Source : file viewsFactories/NoteHTMLViewsFactory.js at line 56