Make history.go work
This commit is contained in:
parent
2bb7497312
commit
e817192df3
4 changed files with 14 additions and 2 deletions
|
@ -94,7 +94,12 @@ class NavigationController
|
|||
|
||||
goToOffset: (offset) ->
|
||||
return unless @canGoToOffset offset
|
||||
@goToIndex @currentIndex + offset
|
||||
pendingIndex = @currentIndex + offset
|
||||
if @inPageIndex > -1 and pendingIndex >= @inPageIndex
|
||||
@pendingIndex = pendingIndex
|
||||
@webContents._goToOffset offset
|
||||
else
|
||||
@goToIndex pendingIndex
|
||||
|
||||
getActiveIndex: ->
|
||||
if @pendingIndex is -1 then @currentIndex else @pendingIndex
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue