Class BaseDialogMover

This class store the dialog position and expose methods to move the dialog

Source : file dialogs/baseDialog/BaseDialogMover.js at line 36

Constructor

new BaseDialogMover ( )

The constructor

Source : file dialogs/baseDialog/BaseDialogMover.js at line 115

Public properties

dialogHTMLElement : HTMLElement

The container element of the dialog

Source : file dialogs/baseDialog/BaseDialogMover.js at line 102

topBarHTMLElement : HTMLElement

The top bar element of the dialog

Source : file dialogs/baseDialog/BaseDialogMover.js at line 109

Public getters and setters

readonly get objId : Number

A unique identifier given to the mover for drag and drop operations

Source : file dialogs/baseDialog/BaseDialogMover.js at line 136

readonly get onTop : Boolean

A flag to detect if the dialog is on top of the screen

Source : file dialogs/baseDialog/BaseDialogMover.js at line 129

Public methods

centerDialog ( )

Center the dialog o the screen

Source : file dialogs/baseDialog/BaseDialogMover.js at line 142

moveDialog ( dragEventOrTouch, eventType )

Move the dialog to a drag event point and set the drag start values to this point

Source : file dialogs/baseDialog/BaseDialogMover.js at line 164

Parameters

Name Type Description
dragEventOrTouch Event or Touch

The drag event or Touch with the drag start values

eventType null or String

The type of the event that have triggered the call to the method

moveDialogTo ( newDialogX, newDialogY )

Move the dialog on the screen

Source : file dialogs/baseDialog/BaseDialogMover.js at line 177

Parameters

Name Type Description
newDialogX Number

The new X position of the dialog in pixels

newDialogY Number

The new Y position of the dialog in pixels

moveDialogToLastPosition ( )

Move the dialog to it's last position after a hide followed by a show

Source : file dialogs/baseDialog/BaseDialogMover.js at line 186

moveDialogToTopLeft ( )

Move the dialog to the top left corner of the screen

Source : file dialogs/baseDialog/BaseDialogMover.js at line 194

setDragStartPoint ( dragEventOrTouch )

Set the drag start values

Source : file dialogs/baseDialog/BaseDialogMover.js at line 205

Parameters

Name Type Description
dragEventOrTouch Event or Touch

The drag event or Touch with the drag start values

Private properties

#dialogX : Number

The X screen coordinate of the upper left corner of the dialog

Source : file dialogs/baseDialog/BaseDialogMover.js at line 63

#dialogY : Number

The Y screen coordinate of the upper left corner of the dialog

Source : file dialogs/baseDialog/BaseDialogMover.js at line 70

#dragStartX : Number

The start drag X screen coordinate of the mouse

Source : file dialogs/baseDialog/BaseDialogMover.js at line 50

#dragStartY : Number

The start drag Y screen coordinate of the mouse

Source : file dialogs/baseDialog/BaseDialogMover.js at line 56

#objId : Number

A unique identifier given to the mover for drag and drop operations

Source : file dialogs/baseDialog/BaseDialogMover.js at line 43

Private methods

#computePosition ( newDialogX, newDialogY )

Compute the new position of the dialog on the screen

Source : file dialogs/baseDialog/BaseDialogMover.js at line 78

Parameters

Name Type Description
newDialogX Number

The new X position of the dialog in pixels

newDialogY Number

The new Y position of the dialog in pixels

#endMoveDialog ( )

Finish the move dialog. Adapt the style of the dialog

Source : file dialogs/baseDialog/BaseDialogMover.js at line 92