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

How to add html elements outside the infinite canvas? #144

Open
danielvianna opened this issue Apr 28, 2021 · 2 comments
Open

How to add html elements outside the infinite canvas? #144

danielvianna opened this issue Apr 28, 2021 · 2 comments
Milestone

Comments

@danielvianna
Copy link

I'm trying to build a menu (left), submenu (top in between) and inspector (right), so something similar to Figma.
The only way I've done was with absolute positioning, is there a way to wrap the canvas so I don't need to break the browser's flow? basically a div instead of full screen

@axelpale
Copy link
Contributor

Currently the absolute positioning is the way to go if you like to keep the SpaceView as large as possible, kind of a map browser.

On the other hand, the SpaceView is rendered in plain HTML element and therefore it can be only a small portion of the host page. You can do this by styling the space container element (the one mounted to SpaceView, usually with id space in examples) something else than width: 100%; height: 100%. Also relax html and body element styles: remove height: 100%. What should happen after that is that the page scrolls as a normal web page, yet on the space container the scroll, mouse, and touch events are captured by Tapspace instead.

Unfortunately we do not have a good example app to properly show this behavior. Any feedback on what you would like to see example-wise are welcome. Also if I misunderstood your question, please feel free to elaborate :)

@axelpale
Copy link
Contributor

axelpale commented Sep 2, 2022

Update: tapspace v2 will introduce viewport controls and provide API to add custom controls layered on top of the viewport. Expect v2 alpha release in Sep-Oct 2022.

@axelpale axelpale added this to the v2.0.0 milestone Sep 2, 2022
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

2 participants