Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

draggable 機能を実装する #71

Open
phi-jp opened this issue Sep 3, 2013 · 0 comments
Open

draggable 機能を実装する #71

phi-jp opened this issue Sep 3, 2013 · 0 comments

Comments

@phi-jp
Copy link
Owner

phi-jp commented Sep 3, 2013

tm.app.Object2ddraggable 機能を持たせる.

setDraggable(flag) でドラッグ有効/無効を切り替える

Event

dispach event list

Name Description
dragstart ドラッグ開始時
drag ドラッグしている間
dragend ドラッグ終了時

Memo

  • setDraggable(true) すると内部で setInteractive(true) も呼ぶ
  • タッチの差分(tm.input.Touch.deltaPosition)の値をキャッシュしてタッチ終了後はその平均値で慣性っぽく止まるようにする
  • flick~ or drag~ ってプロパティで速度やらなんやら調整できるようにする

Feature

  • 親子関係考慮すると死ねるのでとりあえず見送る
  • 特定の要素上に来たら drop イベントとか発行させられるようにすると良いかも. (setDroppable(true))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant