Class: InputEvent

InputEvent

Inputタグの共有イベントクラス、マウスでの数値変動やフォーカスの状態管理
Shared event class for Input tag, numerical value change with mouse and focus state management

new event.InputEvent ()

Methods

changeFunction (name, value)*

Elementのid名をキャメルケースに変換して関数を実行
例) font-select => changeFontSelectがコールされる
valueはstringで渡すので、コール先の関数内で変換とバリデーションを行う必要がある

         Convert Element's id name to CamelCase and execute function
         e.g.) font-select => changeFontSelect is called
         Since value is passed as a string, conversion and validation must be performed in the calling function
NameTypeDescription
namestring
valuestring | number | Event
Returns:
TypeDescription
*

finishInput (event)void

Inputタグでの編集終了関数
End-of-edit function on Input tag

NameTypeDescription
eventEvent | KeyboardEvent
Returns:
TypeDescription
void

focusIn ()void

Inputにフォーカスされた時に変数を初期化する
Initialize variables when Input is focused

Returns:
TypeDescription
void

focusOut ()void

Inputにフォーカス終了した時にロックを解放する
Release lock when focus ends on Input

Returns:
TypeDescription
void

mouseDown (event)void

数値のInputElementの場合はマウスで値を変更可能
状態に合わせてカーソルや変数を初期化する
For numeric InputElement, values can be changed with the mouse
Initialize cursors and variables according to state

NameTypeDescription
eventMouseEvent
Returns:
TypeDescription
void

mouseMove (event)void

マウスで数値の加算減算を行う
Add and subtract numbers with the mouse

NameTypeDescription
eventMouseEvent
Returns:
TypeDescription
void

mouseOut (event)void

Inputが数値の場合マウス動作終了関数
Mouse operation end function if Input is numeric

NameTypeDescription
eventMouseEvent
Returns:
TypeDescription
void

mouseOver (event)void

Inputが数値の場合マウス動作で加算減算できればカーソルを変化させる
If Input is a number, the cursor is changed if it can be added and subtracted by mouse movement.

NameTypeDescription
eventMouseEvent
Returns:
TypeDescription
void

mouseUp ()void

マウスアップで登録されたイベントを解除する
Unregister a registered event with mouse up.

Returns:
TypeDescription
void

reloadScreen ()void

スクリーンエリアで変更があったElementを再描画
Redraw Element with changes in screen area

Returns:
TypeDescription
void

save ()void

undo用にデータを内部保管する
Internal storage of data for undo

Returns:
TypeDescription
void

setInputEvent (element)void

Input Elementにイベント登録
Event registration to Input Element

NameTypeDescription
elementHTMLDivElement
Returns:
TypeDescription
void