lib/scarpe/wv/edit_line.rb in scarpe-0.3.0 vs lib/scarpe/wv/edit_line.rb in scarpe-0.4.0

- old
+ new

@@ -1,19 +1,22 @@ # frozen_string_literal: true module Scarpe::Webview class EditLine < Drawable - attr_reader :text, :width + attr_reader :text, :width, :stroke, :font, :tooltip def initialize(properties) super # The JS handler sends a "change" event, which we forward to the Shoes drawable tree bind("change") do |new_text| send_self_event(new_text, event_name: "change") end + bind("hover") do |new_text| + send_self_event(new_text, event_name: "hover") + end end - + def properties_changed(changes) t = changes.delete("text") if t html_element.value = t end