Module: ODDB::View::Snapback

Included in:
PrivateTemplate
Defined in:
src/view/pointersteps.rb

Constant Summary

SNAPBACK_EVENT =
nil

Instance Method Summary (collapse)

Instance Method Details

- (Object) snapback



98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'src/view/pointersteps.rb', line 98

def snapback
  state = @session.state
  event = state.direct_event
  ignore = nil
  path = {}
  while((event.nil? || event == ignore) \
        && (prev = state.previous) && prev != state)
    state = prev
    ignore ||= @session.state.snapback_event
    event = state.snapback_event
    path = state.direct_request_path
  end
  [event || self.class::SNAPBACK_EVENT, path]
end