Selection Area¶
Allows to draw a selection area on the map and provides the necessary triggers to manage the nodes inside this area.
- Plugin name:
"selection_area" - Plugin namespace:
"selection_area"
Loading the plugin¶
If this plugin is loaded, the module will have the following additional features:
If you press ctrl and drag with the mouse, a selection area will be created. The following new events will
be triggered:
start_selection_area: triggered the first time a selection area is created.update_selection_area: triggered every time a selection area changes its size.end_selection_area: triggered when the selection area is removed (when the mouse is released).
Each of these triggers will have an event object with an additional property, selection_area, with the
following propierties:
current: List of nodes inside the selection area.previous: List of nodes that were inside the selection area in the previous event.added: List of nodes that have been added fromprevioustocurrent.subtracted: List of nodes that have been subtracted fromprevioustocurrent.
Properties¶
enable¶
Enables/disables the selection area. Enabled by default.
mouse_options¶
Allows to change the behavior of the mouse with the following properties:
button: allows to change the valid button of the mouse to create and maintain the selection area. Same values as button property of a mouse event.altKey:trueif alt key is required to be pressed to create the selection area. Same values as altKey property of a mouse event.ctrlKey:trueif ctrl key is required to be pressed to create the selection area. Same values as ctrlKey property of a mouse event.metaKey:trueif meta key is required to be pressed to create the selection area. Same values as metaKey property of a mouse event.shiftKey:trueif shift key is required to be pressed to create the selection area. Same values as shiftKey property of a mouse event.
Info
Modifier keys are required to start the selection area. Once created you can release the modifier keys. Only the mouse ends the selection area.
mouse_options¶
Allows to change the styles of the selection area. The selection area is composed by 2 borders.
border_color1: Border color 1. Accepts a css color as string."darkgray"by default.border_color2: Border color 1. Accepts a css color as string."white"by default.border_width1: Border 1 width. Must be greater than 0.2by default.border_width2: Border 2 width. Must be greater than 0.3by default.fill_color: fill color of the selection area."rgba(255, 255, 255, 0.3)"by default.
Example¶
- Zoom until you can see the seats.
- Press
ctrland drag with the left mouse click. - Press
ctrl + shiftand drag with the left mouse click to maintain previous selection.