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

Split mode normal screen ( Add fullscreen APIs ) #146

Closed
bootstraponline opened this issue Jul 12, 2012 · 10 comments
Closed

Split mode normal screen ( Add fullscreen APIs ) #146

bootstraponline opened this issue Jul 12, 2012 · 10 comments

Comments

@bootstraponline
Copy link

Is it possible to have a split mode without forcing the user to enter full screen?

@OscarGodson
Copy link
Owner

You mean like native fullscreen in Chrome? Not with an option, but I'll add it. Maybe a boolean useNativeFullscreen. I'll add it to the 0.1.2 release.

For now tho you can do it manually in the source pretty easily. I think you can just change this line (401):

, nativeFs = document.body.webkitRequestFullScreen ? true : false

to be false.

@bootstraponline
Copy link
Author

I mean something like this. It's split screen, however I didn't have to press F11 to enter "full screen mode." It would replace the "switch to preview mode" because it would be split screen for previewing, without requiring full screen. It'd be nice to have as an option.

@OscarGodson
Copy link
Owner

No, again, but it'd be super easy to add. I'll add an API call to enter fullscreen as well as being able to turn off native fullscreen so that you could do like:

var editor = new EpicEditor({ useNativeFullscreen: false });
editor.load(function () {
  editor.fullscreen();
});

And it'd look like your example. I'll try to get both of these in.

@bootstraponline
Copy link
Author

That'd be great!

@OscarGodson
Copy link
Owner

@bootstraponline quick question, would you rather have fullscreen() toggle opening and closing fullscreen (like it does internally) or would you rather have an explicit exitFullscreen()?

@bootstraponline
Copy link
Author

I'd prefer exitFullscreen() so that it's a no-op if the editor is not already in full screen mode.

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

@bootstraponline 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!

@OscarGodson
Copy link
Owner

Also I did an example for you :) http://jsbin.com/aketom (http://jsbin.com/aketom/edit)

Less code than originally expected, now just:

var editor = new EpicEditor();

editor.load(function () {
  editor.enterFullscreen();
});

@bootstraponline
Copy link
Author

Wow! That's perfect.

@OscarGodson
Copy link
Owner

Glad to hear that!

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