Skip to content
This repository has been archived by the owner on Jul 27, 2018. It is now read-only.

goBack / goForward navigation #1285

Open
Gozala opened this issue Apr 7, 2017 · 1 comment
Open

goBack / goForward navigation #1285

Gozala opened this issue Apr 7, 2017 · 1 comment
Assignees
Milestone

Comments

@Gozala
Copy link
Contributor

Gozala commented Apr 7, 2017

Scrolling past the content (in zoomed-in view) unfolds the trail. Once user releases fingers we goBack / goForward to a history entry that's in the middle.

@Gozala Gozala modified the milestones: Trails, Spacial Model Apr 7, 2017
@Gozala
Copy link
Contributor Author

Gozala commented Apr 10, 2017

This can be implemented same as modal UI described here #1289 (comment) quoting solution below for convenience:

I did the preliminary investigation, and this seems implementable in Electron. Here is how:

  1. you can listen to a 'wheel' events on webview tags, if they are prevented scroll never occurs in the webview content.
    • Therefor if toolbar is in viewport, we can prevent wheel events with positive deltaY and slide toolbar+webview up until toolbar is off viewport. Once it is just stop preventing events so that scroll will occur as expected in web content.
    • If toolbar isn't in the viewport, we can prevent wheel events with negative deltayY to prevent scroll in the web content and slide toolbar+webview down until toolbar is in the veiweport. Once it is, just stop preventing events so that scroll will occur as expected in web content.
  2. You can sendInputEvent in particular mouseWheel events to the webview to scroll it's content. This allows us:
    • Once mouse hovers the the top third of the page we can slide toolbar+webview down and also send corresponding wheel events to the webview to scroll content up theoretically preserving vertical spacing of the content, so it will appears just as if toolbar overplayed the content, but user still can scroll down to reveal the content that was overlayed.

Primary difference is going to be that we'd have to listen to scrolling events in the webview preload scripts and message parent when content reached / left right / left edge of the page so that wheel events can be used for performing for animating trail entries.

@patrykadas patrykadas self-assigned this Apr 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants