Class: Ruflet::UI::Controls::RufletComponents::PolygonLayerControl

Inherits:
Control
  • Object
show all
Defined in:
lib/ruflet_ui/ruflet/ui/controls/materials/map_controls.rb

Constant Summary collapse

TYPE =
"polygonlayer".freeze
WIRE =
"PolygonLayer".freeze

Constants inherited from Control

Control::HOST_EXPANDED_TYPES

Instance Attribute Summary

Attributes inherited from Control

#children, #id, #props, #runtime_page, #type, #wire_id

Instance Method Summary collapse

Methods inherited from Control

#emit, generate_id, #has_handler?, #on, #to_patch

Constructor Details

#initialize(id: nil, polygons: nil, visible: nil) ⇒ PolygonLayerControl

Returns a new instance of PolygonLayerControl.



198
199
200
201
202
203
# File 'lib/ruflet_ui/ruflet/ui/controls/materials/map_controls.rb', line 198

def initialize(id: nil, polygons: nil, visible: nil)
  props = {}
  props[:polygons] = polygons unless polygons.nil?
  props[:visible] = visible unless visible.nil?
  super(type: TYPE, id: id, **props)
end