flatworld.extensions.baseEventlisteners Class
Core plugin. Houses the default eventlisteners used in the map. When plugins are added to the map this class can be used for the eventlistener management. Creates window.flatworld.setFullScreen function to be used when switching to fullscreen.
Item Index
Methods
Attributes
Methods
_resizeCanvas
()
private
Resizes the canvas to the current most wide and high element status. Basically canvas size === window size.
_setFullScreen
()
private
Activate the browsers fullScreen mode and expand the canvas to fullsize
init
()
Initialize plugin
toggleDrag
-
cb
DragListener (normally used for moving the map)
Parameters:
-
cb
FunctionCallback that fires when this event activates
Returns:
Return the state of this event
toggleFullscreen
-
cb
Sets the browser in fullscreen mode.
Parameters:
-
cb
FunctionCallback that fires when this event activates
Returns:
Return the state of this event
toggleFullSize
()
Sets the canvas to fullsize as in the same size of the window / content area. But not fullscreen. Note that
toggleMouseTextSelection
()
Deactivate the selection of text, by dragging
toggleOrder
-
cb
Selecting something from the map. With mouse you can use the default right click and in touch devices you can use continuous press event (keeping the finger pressed on the screen for a preset time).
Parameters:
-
cb
FunctionCallback that fires when this event activates
Returns:
Return the state of this event
Attributes
pluginName
String
Plugins name
Fires event pluginNameChange
Fires when the value for the configuration attribute pluginName
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added: