Class: Ruflet::UI::Controls::RufletComponents::PolylineMarkerControl
- Inherits:
-
Control
- Object
- Control
- Ruflet::UI::Controls::RufletComponents::PolylineMarkerControl
- Includes:
- MapValueNormalizer
- Defined in:
- lib/ruflet_ui/ruflet/ui/controls/materials/map_controls.rb
Constant Summary collapse
- TYPE =
"polylinemarker".freeze
- WIRE =
"PolylineMarker".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, color: nil, stroke_width: nil, border_color: nil, border_stroke_width: nil, gradient_colors: nil, stroke_cap: nil, stroke_join: nil) ⇒ PolylineMarkerControl
constructor
A new instance of PolylineMarkerControl.
Methods inherited from Control
#emit, generate_id, #has_handler?, #on, #to_patch
Constructor Details
#initialize(id: nil, coordinates: nil, color: nil, stroke_width: nil, border_color: nil, border_stroke_width: nil, gradient_colors: nil, stroke_cap: nil, stroke_join: nil) ⇒ PolylineMarkerControl
Returns a new instance of PolylineMarkerControl.
249 250 251 252 253 254 255 256 257 258 259 260 |
# File 'lib/ruflet_ui/ruflet/ui/controls/materials/map_controls.rb', line 249 def initialize(id: nil, coordinates: nil, color: nil, stroke_width: nil, border_color: nil, border_stroke_width: nil, gradient_colors: nil, stroke_cap: nil, stroke_join: nil) props = {} props[:coordinates] = normalize_map_coordinate(coordinates) unless coordinates.nil? props[:color] = color unless color.nil? props[:stroke_width] = stroke_width unless stroke_width.nil? props[:border_color] = border_color unless border_color.nil? props[:border_stroke_width] = border_stroke_width unless border_stroke_width.nil? props[:gradient_colors] = gradient_colors unless gradient_colors.nil? props[:stroke_cap] = stroke_cap unless stroke_cap.nil? props[:stroke_join] = stroke_join unless stroke_join.nil? super(type: TYPE, id: id, **props) end |