プロジェクト

全般

プロフィール

機能 #597 » wrap-around.patch

Kohei Suzuki, 2013-07-09 02:15

差分を表示:

core/plugin/command/command.rb
type_strict widget => Plugin::GUI::HierarchyChild
children = widget.parent.children.select{ |w| w.is_a? widget.class }
index = children.index(widget)
if distance > 0 ? (children.size <= (index+distance)) : (0 > (index+distance))
notice "terminate #{widget}"
yield(widget, distance) if block_given?
else
term = children[index + distance]
term = term.active_chain.last if term.respond_to? :active_chain
term.active! if term
notice "activate #{term} #{widget.class} #{term.class}"
src_tl = widget.active_chain.last
if widget.is_a?(Plugin::GUI::Pane) and src_tl.is_a?(Plugin::GUI::Timeline) and term.is_a?(Plugin::GUI::Timeline)
slide_timeline_focus(src_tl, term) end end end
term = children[(index + distance) % children.size]
term = term.active_chain.last if term.respond_to? :active_chain
term.active! if term
notice "activate #{term} #{widget.class} #{term.class}"
src_tl = widget.active_chain.last
if widget.is_a?(Plugin::GUI::Pane) and src_tl.is_a?(Plugin::GUI::Timeline) and term.is_a?(Plugin::GUI::Timeline)
slide_timeline_focus(src_tl, term) end end
# タイムライン _src_ で選択されているディスプレイ上のy座標が同じ _dest_ のツイートに
# フォーカスを移動する
    (1-1/1)