Class: TouchBot

Apps.TouchBot

Working in Progress

new Apps.TouchBot()

TouchBot

Version:
  • 0.10.5
Author:
TODO
  • 아이템 다중 선택(TBD)
  • 쉬운 녹화 모드 추가(TBD)
  • 드래그앤 드롭 .bot 파일 업로드(TBD)
  • cloud 연결 기능 추가(TBD)
  • 스케일을 1로 마이그레이션 하는 기능 추가(TBD)
  • feature idea - 지정 영역만 비교
  • feature idea - 폰에서 사용하는 것도 감시
  • 원하는 화면이 나올때 까지 시도 구현(retry)
  • fullscreen 기능 구현(비교용 이미지는 작게 축소해서 보관)
  • scale이 1로 시작된 데이터가 레티나에서 켑쳐시 2로 저장됨(문제될 것 있는지 검토)

Extends

Members

static Apps.TouchBot.Requires array.<filePath>

Async static files loading:

  • Support file formats is css, js and html.
  • The path name must be in all lowercase letters.
  • Available paths of html files are located:

    win, body, header, contents, modules, menu, toolbar, apps, device, notify

See:

inherited $action jQueryObject

Action Menu

inherited $app jQueryObject

$console jQueryObject

$detail jQueryObject

$parent jQueryObject

$pointer jQueryObject

$preview jQueryObject

$remote jQueryObject

$rswp jQueryObject

$screen jQueryObject

inherited $share jQueryObject

A action of content share

inherited $sidebar jQueryObject

$subside jQueryObject

inherited $tools jQueryObject

inherited AUTHOR string

constant CHANGES array.<{type: string, ver: string, msg: string}>

CHANGELOG

inherited name string

inherited NOTE string

inherited opened boolean

root string

tabs array.<tabName>

A class name of selected the default tab

constant VERSION string

inner keyboardMap array

Names of known key codes (0-255)

Type Definitions

Application DB controller

Properties:
Name Type Description
data Mobizen.Apps.DB.Models.<modelName>

Connected to data channel database

local Mobizen.Apps.DB.Models.<modelName>

Connected to local channel database

loaded boolean

true if initialized DB

accept boolean

true if this app has the DB

reset function

Drop database table and then call this.db.setup automatically.

setup function

Create new database table with extend additional methods for db query and then excute callback function.

Instance of Service

Properties:
Name Type Description
apps Mobizen.Apps

Accessible Mobizen/Apps API

device Mobizen.Device

Accessible Mobizen/Device API

socket Mobizen.Socket

Accessible Mobizen/Socket API

tools Mobizen.Tools

Accessible Mobizen/Tools API

Application tab interface

Methods

Name Type Description
data object
TODO
  • 마우스 휠 데이터도 다룰수 있는지 검토
Name Type Description
event DOMEvent

attach(){boolean}

Returns:
Type Description
boolean false if failed attach

Disable all action during the progressing

capture(force)

toggle capture

Name Type Description
force boolean| DOMEvent optional

compare(image, done, idx)

Name Type Description
image string

base64 image uri

done function optional

callback

idx number optional

index

console(type, data)

Console Log.

Name Type Description
type string
data object
Name Type Description
event DOMEvent

inherited data($el){object}

Get data from dom-storage.

Name Type Description
$el jQueryObject

selected item

Returns:
Type Description
object dom storage data

detach(){boolean}

Returns:
Type Description
boolean false if failed detach

inherited disable(state, type){boolean}

Name Type Description
state boolean optional
type string optional
Returns:
Type Description
boolean state of disabled

Enabling drag and drop if you need

Name Type Description
$el jQueryObject

draggable item

edit(event, data, index)

Edit The Event Sequence.

Name Type Description
event DOMEvent
data object
index number
TODO
  • 프리뷰에서 포인터를 클릭하면 좌표 갱신 안됨

inherited emit(type){boolean}

Execute each of the listeners in order with the supplied arguments.

Name Type Description
type string

type of event

Returns:
Type Description
boolean true if event had listeners, false otherwise.
Name Type Description
event DOMEvent

inherited listeners(type){array}

Name Type Description
type string

type of event

Returns:
Type Description
array array of listeners for the specified event.
Name Type Description
done function

load($el, changed)

Name Type Description
$el jQueryObject

selected item in sidebar

changed boolean

if false is same tab selected

Listens to Events:

log(data){boolean}

Name Type Description
data object
Returns:
Type Description
boolean true if accepted

loop(records, ignore){boolean}

Loop Event Sequence.

Name Type Description
records array
ignore boolean optional
Returns:
Type Description
boolean false if skip or escaped loop

Check Data Modified.

Name Type Description
event DOMEvent

inherited off(type, listener){Mobizen.Event}

Remove a listener from the listener array for the specified event. Caution: changes array indices in the listener array behind the listener.

Calling .off() with no arguments removes all handlers attached to the elements. if use one argument those of the specified event. It's not a good idea to remove listeners that were added elsewhere in the code, especially when it's on an emitter that you didn't create (e.g. sockets or file streams).

Name Type Description
type string optional

type of event

listener function optional

callback

Throws:
Will throw an error if the listener argument is not a function.
Returns:
Type Description
Mobizen.Event emitter, so calls can be chained.

inherited on(type, listener){Mobizen.Event}

Adds a listener to the end of the listeners array for the specified event. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of event and listener will result in the listener being added multiple times.

Name Type Description
type string

type of event

listener function

callback

Throws:
Will throw an error if the listener argument is not a function.
Returns:
Type Description
Mobizen.Event emitter, so calls can be chained.

inherited once(type, listener){Mobizen.Event}

Adds a one time listener for the event. This listener is invoked only the next time the event is fired, after which it is removed.

Name Type Description
type string

type of event

listener function

callback

Throws:
Will throw an error if the listener argument is not a function.
Returns:
Type Description
Mobizen.Event emitter, so calls can be chained.
Listens to Events:
Name Type Description
focus boolean optional
Listens to Events:
Listens to Events:
Name Type Description
event DOMEvent

inherited pipe(dest, always){Mobizen.Event}

This method pulls all the data out of a readable stream, and writes it to the supplied destination, automatically managing the flow so that the destination is not overwhelmed by a fast readable stream.

Name Type Description
dest Mobizen.Event

destination

always boolean optional
Returns:
Type Description
Mobizen.Event dest emitter, so calls can be chained.
Example
A.pipe(B).pipe(C);

Toggle State Of Play.

Name Type Description
force boolean| DOMEvent optional
TODO
  • relay모드일때 screen 채널만 끊어지는 경우 발생(reconnect도 안되고... 뭔가 처리가 필요함);

Drawing Preview Images.

Name Type Description
data object

proc(events, next, data, ignore){boolean}

Execute A Event.

Name Type Description
events array
next function
data object
ignore boolean optional
TODO
  • 브라우저 탭이 활성화되지 않은 경우의 상황 대응
Returns:
Type Description
boolean false if escaped loop

remove(event)

Name Type Description
event DOMEvent

rotate(degree){boolean}

A Event Listener Of Screen Rotate.

Name Type Description
degree number
Returns:
Type Description
boolean false if failed rotate
TODO
  • 프로그래스에서 업로드 중 켄슬 누르면 모든 작동이 막혀 버리게 됨
Name Type Description
$el jQueryObject
TODO
  • match percentage는 슬라이더 UI로
  • 변경할 수 없는 정보는 내용만 출력
Listens to Events:

inherited self(){boolean}

Get activate state of app.

Returns:
Type Description
boolean current app name matched
TODO
  • 값이 true/false는 라디오 타입으로
  • 폼 검사

inherited sitting($el){number}

Get position by viewport element.

Name Type Description
$el jQueryObject
Returns:
Type Description
number position offset -1 or 0 or 1

slide(event){boolean}

Slide The Preview Image or Event Sequence.

Name Type Description
event DOMEvent
Returns:
Type Description
boolean true if slided

inherited storage(key, val){object}

Store and Read data of local storage.

Name Type Description
key string
val *
Returns:
Type Description
object excuted result

take(){string}

TODO
  • 스크린이 연결된 직후 바로 캡쳐를 하면 이미지를 반환하지 못함
Returns:
Type Description
string base64 data uri from canvas.

template(type, data){string|jQueryObject}

Simple HTML Template.

Name Type Description
type string
data object
Returns:
Type Description
string | jQueryObject parsed html.

inherited transfer(action, files)

Transfer data each channels.

Name Type Description
action string

type of action

files array.<files>

inherited unique($focused){object}

An filter for unique item.

Name Type Description
$focused jQueryObject

selected item

Returns:
Type Description
object unique dom storage datas

inherited virtual unpipe(dest){Mobizen.Event}

This method will remove the hooks set up for a previous pipe() call. If the destination is not specified, then all pipes are removed. If the destination is specified, but no pipe is set up for it, then this is a no-op.

Name Type Description
dest Mobizen.Event

destination

Returns:
Type Description
Mobizen.Event dest emitter, so calls can be chained.

unselect($el)

Name Type Description
$el jQueryObject optional

update(event){boolean}

Name Type Description
event DOMEvent
Returns:
Type Description
boolean true if success updated

wait(done, id){boolean}

Check For The Wait Screen.

Name Type Description
done function
id number optional
TODO
  • 정지 화면으로 판단된 경우 skip으로 설정된 이미지들을 검사
Returns:
Type Description
boolean false if stoped

inner capitalize(str){string}

Name Type Description
str string
Returns:
Type Description
string capitalized

inner clone(source){object}

Name Type Description
source object
Returns:
Type Description
object cloned struct

inner compress(file, done, fail, progress)

Name Type Description
file Blob
done function
fail function
progress function

inner diff(tar, src){boolean}

Simple Deep Diff

The ORDER of the properties IS IMPORTANT, so this method will return false for following objects:

x = {a: 1, b: 2};
y = {b: 2, a: 1};
Name Type Description
tar object
src object
Returns:
Type Description
boolean true if data modified

inner extract(file, done, fail, progress)

Name Type Description
file Blob
done function
fail function
progress function

inner isCharacterKey(keyCode){boolean}

Returns true if the key produces a character.

Name Type Description
keyCode number

A key code.

Returns:
Type Description
boolean Whether it's a character key.

inner isDeviceKey(keyCode){boolean}

Returns true if the key of device.

Name Type Description
keyCode number

A key code.

Returns:
Type Description
boolean Whether it's a device key.

inner keycode2char(keycodes)

Name Type Description
keycodes array optional

inner loseCode(str){number}

Name Type Description
str string
Returns:
Type Description
number hash code

inner ondatafiledelete(data)

Name Type Description
data object
Listens to Events:

inner ondatafiledelete2(data)

Name Type Description
data object
Listens to Events:

inner ondatafiles(data)

Name Type Description
data object
Listens to Events:

inner onselectaction(action, $el, event)

Name Type Description
action string

type of action

$el jQueryObject optional

action item

event event

dom event

Listens to Events:

inner parsePath(fullpath){object}

Name Type Description
fullpath string
Returns:
Type Description
object parsed path

inner pop(arr, i){array}

Name Type Description
arr array

array

i number

number of index

Returns:
Type Description
array poped array

inner positionXY(e, offset)

Name Type Description
e DOMEvent
offset object

inner rescaleImage(src, width, height, done)

Name Type Description
src string
width number
height number
done function

inner resizeImage(src, width, height, done)

Name Type Description
src string
width number
height number
done function

inner rotateImage(src, deg, done)

Calculate rotatation

Name Type Description
src string
deg number
done function

inner rotateXY(pos, data)

Name Type Description
pos object
data object

inner serialize(data)

Name Type Description
data object

Events

inherited before-select․sidebar

do on sidebar or subsidebar click process before

Type:
Name Type Description
isSubSidebar boolean

if true is subsidbar clicked

do on app close

Type:

inherited close․action

Type:

inherited close․sub․action

on action menu close

Type:
Type:
Name Type Description
event DOMEvent
data object

Focus item if you need call manually

Type:
Type:
Type:

on action menu open

Type:
Type:
Type:

Updating grid if you need call manually

Type:

Updating table header if you need call manually

Type:

Updating scrollsize if you need call manually

Type:
Type:

inherited scroll․content

Type:
Name Type Description
event DOMEvent

inherited scroll․sidebar

Type:
Name Type Description
event DOMEvent

inherited scroll․sub․sidebar

Type:
Name Type Description
event DOMEvent

inherited select․action

do on select of action menu

Type:
Name Type Description
action string
$el jQueryObject
event DOMEvent

inherited select․sidebar

do on sidebar click

Type:
Name Type Description
$el jQueryObject

selected item in sidebar

changed boolean

if false is same tab selected

inherited select․sub․sidebar

do on subsidebar click

Type:
Name Type Description
$el jQueryObject

A event for the scheduled job tasks

Type:

on toggle dropbox panel

Type:
Name Type Description
isOpen boolean

true if open the panel otherwise close...

do on empty space

Type:
Name Type Description
$el jQueryObject
event DOMEvent
comments powered by Disqus