Class: Ruflet::UI::Controls::RufletComponents::PointsControl

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

Constant Summary collapse

TYPE =
"points".freeze
WIRE =
"Points".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, data: nil, key: nil, paint: nil, point_mode: nil, points: nil) ⇒ PointsControl

Returns a new instance of PointsControl.



11
12
13
14
15
16
17
18
19
# File 'lib/ruflet_ui/ruflet/ui/controls/shared/points_control.rb', line 11

def initialize(id: nil, data: nil, key: nil, paint: nil, point_mode: nil, points: nil)
  props = {}
  props[:data] = data unless data.nil?
  props[:key] = key unless key.nil?
  props[:paint] = paint unless paint.nil?
  props[:point_mode] = point_mode unless point_mode.nil?
  props[:points] = points unless points.nil?
  super(type: TYPE, id: id, **props)
end