lib/scarpe/wv/arc.rb in scarpe-0.2.1 vs lib/scarpe/wv/arc.rb in scarpe-0.2.2

- old
+ new

@@ -1,12 +1,9 @@ # frozen_string_literal: true -require_relative "shape_helper" - class Scarpe class WebviewArc < Scarpe::WebviewWidget - include ShapeHelper def initialize(properties) super(properties) end def element(&block) @@ -18,19 +15,21 @@ block.call(h) if block_given? end end end - private + protected def style - { + super.merge({ left: "#{@left}px", top: "#{@top}px", width: "#{@width}px", height: "#{@height}px", - } + }) end + + private def arc_path center_x = @width / 2 center_y = @height / 2 radius_x = @width / 2