Class: Ruflet::UI::Controls::RufletComponents::MarkerControl
- Includes:
- MapValueNormalizer
- Defined in:
- lib/ruflet_ui/ruflet/ui/controls/materials/map_controls.rb
Constant Summary collapse
- TYPE =
"marker".freeze
- WIRE =
"Marker".freeze
Constants inherited from Control
Instance Attribute Summary
Attributes inherited from Control
#children, #id, #props, #runtime_page, #type, #wire_id
Instance Method Summary collapse
-
#initialize(id: nil, coordinates: nil, content: nil, height: nil, rotate: nil, width: nil, alignment: nil) ⇒ MarkerControl
constructor
A new instance of MarkerControl.
Methods inherited from Control
#emit, generate_id, #has_handler?, #on, #to_patch
Constructor Details
#initialize(id: nil, coordinates: nil, content: nil, height: nil, rotate: nil, width: nil, alignment: nil) ⇒ MarkerControl
Returns a new instance of MarkerControl.
189 190 191 192 193 194 195 196 197 198 |
# File 'lib/ruflet_ui/ruflet/ui/controls/materials/map_controls.rb', line 189 def initialize(id: nil, coordinates: nil, content: nil, height: nil, rotate: nil, width: nil, alignment: nil) props = {} props[:coordinates] = normalize_map_coordinate(coordinates) unless coordinates.nil? props[:content] = content unless content.nil? props[:height] = height unless height.nil? props[:rotate] = rotate unless rotate.nil? props[:width] = width unless width.nil? props[:alignment] = alignment unless alignment.nil? super(type: TYPE, id: id, **props) end |