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

Add editor.goFullscreen() #156

Closed
narfdotpl opened this issue Jul 19, 2012 · 5 comments
Closed

Add editor.goFullscreen() #156

narfdotpl opened this issue Jul 19, 2012 · 5 comments

Comments

@narfdotpl
Copy link

I'd like the editor to go into the fullscreen mode immediately after editor.load(). Is that possible? If not, it would be great, if you could add a public goFullscreen() method.

@OscarGodson
Copy link
Owner

Working on it from #146. Question: would you like fullscreen() to toggle opening and closing (like it does internally), or would you rather have an explicit exitFullscreen()?

@narfdotpl
Copy link
Author

Working on it from #146.

Great!

I'm OK with fullscreen() that toggles, but I think it should be accompanied by a isFullscreen attribute/method.

@OscarGodson
Copy link
Owner

There's two other things I'm working on that will take care of the isFullscreen. First is a public method on our eeState object which holds the state of EpicEditor. You'd be able to do .is('fullscreen') (ticket #88, working on it). Also, as with as many events as we can, there's a fullscreen and fullscreenexit event that gets fired as well.

This code is actually finished but I'm writing tests and docs on it. I'll let you know when it's done. Hopefully today or tomorrow.

Note about the fullscreen method tho, you wont be able to programmatically call native fullscreen. If your browser supports native fullscreen and you call fullscreen() it wont fire the native one. Instead it'll use the same faux one used in unsupported browsers. This is a "security" thing in browsers I can't get around. You can only trigger native fullscreen with a UI interaction (key event like a shortcut, mouse event like click, etc).

Also, I'm adding a boolean useNativeFullscreen option as well to override it if you wanted for UI interactions.

OscarGodson added a commit that referenced this issue Jul 20, 2012
…s the useNativeFullscreen option. Added docs and tests.
@OscarGodson
Copy link
Owner

@narfdotpl Alright, pull develop! I've added the fullscreen API stuff. There's 2 new methods enterFullscreen and exitFullscreen as well as 2 new events fullscreenenter and fullscreenexit and an option to useNativeFullscreen so you can turn off native fullscreen if you want.

Let me know if this is what you expected and is working well!

@narfdotpl
Copy link
Author

Thanks, works great! ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants