Browse Source

Platform: this documentation is wrong.

pull/481/head
Vladimír Vondruš 6 years ago
parent
commit
e03813643a
  1. 11
      doc/platforms-html5.dox
  2. 2
      src/Magnum/Platform/EmscriptenApplication.h
  3. 2
      src/Magnum/Platform/Sdl2Application.h

11
doc/platforms-html5.dox

@ -273,11 +273,12 @@ endif()
@section platforms-html5-layout Modifying page style, canvas size and aspect ratio
The `WebApplication.css` file contains a basic style and the additional
@cb{.css} .container @ce, @cb{.css} .sizer @ce and @cb{.css} .expander @ce
@cb{.html} <div> @ce s take care of aligning the canvas to the center and
making it responsively scale on narrow screens, preserving aspect ratio. For
proper responsiveness on all platforms it's important to include the
@cb{.html} <meta name="viewport"> @ce tag in the HTML markup as well.
@cb{.css} #container @ce, @cb{.css} #sizer @ce, @cb{.css} #expander @ce and
@cb{.css} #listener @ce @cb{.html} <div> @ce s take care of aligning the canvas
to the center and making it responsively scale on narrow screens, preserving
aspect ratio. For proper responsiveness on all platforms it's important to
include the @cb{.html} <meta name="viewport"> @ce tag in the HTML markup as
well.
By default the canvas is @cpp 640px @ce wide with a 4:3 aspect ratio, you can
modify this by placing one of the @cb{.css} .aspect-* @ce CSS classes on the

2
src/Magnum/Platform/EmscriptenApplication.h

@ -517,7 +517,7 @@ class EmscriptenApplication {
/**
* @brief Set container CSS class
*
* Assigns given CSS class to the @cb{.html} <div class="container"> @ce.
* Assigns given CSS class to the @cb{.html} <div id="container"> @ce.
* Useful for example to change aspect ratio of the view or stretch it
* to cover the full page. See @ref platforms-html5-layout for more
* information about possible values. Note that this replaces any

2
src/Magnum/Platform/Sdl2Application.h

@ -797,7 +797,7 @@ class Sdl2Application {
/**
* @brief Set container CSS class
*
* Assigns given CSS class to the @cb{.html} <div class="container"> @ce.
* Assigns given CSS class to the @cb{.html} <div id="container"> @ce.
* Useful for example to change aspect ratio of the view or stretch it
* to cover the full page. See @ref platforms-html5-layout for more
* information about possible values. Note that this replaces any

Loading…
Cancel
Save