Skip to content

Commit 5f98bbb

Browse files
committed
cleanup
1 parent 4d6b831 commit 5f98bbb

File tree

2 files changed

+1
-25
lines changed

2 files changed

+1
-25
lines changed

lib/scenic/component/input/text_field.ex

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -56,28 +56,6 @@ defmodule Scenic.Component.Input.TextField do
5656

5757
def verify(_), do: :invalid_data
5858

59-
# #--------------------------------------------------------
60-
# defp verify_option( {:w, w} ) when is_number(w) and w > 0, do: true
61-
# defp verify_option( {:width, w} )when is_number(w) and w > 0, do: true
62-
# defp verify_option( {:hint, hint} ) when is_bitstring(hint), do: true
63-
# defp verify_option( {:theme, :light} ), do: true
64-
# defp verify_option( {:theme, :dark} ), do: true
65-
# defp verify_option( {:theme,
66-
# {text_color, hint_color, background_color, border_color, focused_color}} ) do
67-
# Color.verify( text_color ) &&
68-
# Color.verify( hint_color ) &&
69-
# Color.verify( background_color ) &&
70-
# Color.verify( border_color ) &&
71-
# Color.verify( focused_color )
72-
# end
73-
# defp verify_option( {:type, :text} ), do: true
74-
# defp verify_option( {:type, :password} ), do: true
75-
# defp verify_option( {:filter, :number} ), do: true
76-
# defp verify_option( {:filter, :integer} ), do: true
77-
# defp verify_option( {:filter, filter} ) when is_bitstring(filter), do: true
78-
# defp verify_option( {:filter, filter} ) when is_function(filter,1), do: true
79-
# defp verify_option( _ ), do: false
80-
8159
# --------------------------------------------------------
8260
def init(value, opts) do
8361
id = opts[:id]
@@ -603,7 +581,7 @@ defmodule Scenic.Component.Input.TextField do
603581
send_event({:value_changed, id, value})
604582

605583
# advance the index
606-
index = index + 1
584+
index = index + String.length(char)
607585

608586
# update the graph
609587
graph =

test/scenic/component/input/radio_group_test.exs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,8 @@ defmodule Scenic.Component.Input.RadioGroupTest do
6060
test "filter_event listens to clicks from buttons and handles value changes" do
6161
self = self()
6262
scene_ref = make_ref()
63-
6463
Process.put(:parent_pid, self)
6564
Process.put(:scene_ref, scene_ref)
66-
6765
{:ok, tables_pid} = Scenic.ViewPort.Tables.start_link(nil)
6866

6967
Tables.insert_graph({:graph, scene_ref, nil}, self(), Graph.build(), %{})

0 commit comments

Comments
 (0)