Class: Ruflet::UI::Controls::RufletComponents::ArcControl

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

Constant Summary collapse

TYPE =
"arc".freeze
WIRE =
"Arc".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, height: nil, key: nil, paint: nil, start_angle: nil, sweep_angle: nil, use_center: nil, width: nil, x: nil, y: nil) ⇒ ArcControl

Returns a new instance of ArcControl.



11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/ruflet_ui/ruflet/ui/controls/shared/arc_control.rb', line 11

def initialize(id: nil, data: nil, height: nil, key: nil, paint: nil, start_angle: nil, sweep_angle: nil, use_center: nil, width: nil, x: nil, y: nil)
  props = {}
  props[:data] = data unless data.nil?
  props[:height] = height unless height.nil?
  props[:key] = key unless key.nil?
  props[:paint] = paint unless paint.nil?
  props[:start_angle] = start_angle unless start_angle.nil?
  props[:sweep_angle] = sweep_angle unless sweep_angle.nil?
  props[:use_center] = use_center unless use_center.nil?
  props[:width] = width unless width.nil?
  props[:x] = x unless x.nil?
  props[:y] = y unless y.nil?
  super(type: TYPE, id: id, **props)
end