Skip to content

Commit 78c954a

Browse files
committed
Change default target resolution to HD 1920x1080.
If you aren't setting target width and height explicitly in the root div, this change will likely affect the size and layout of your presentation steps. See DOCUMENTATION.md for details and how to fix.
1 parent 20cd28f commit 78c954a

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

DOCUMENTATION.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,12 @@ You need to use pixel values. The pixel values used here correspond to the `data
2121
given to the `#impress` root element. When the presentation is viewed on a larger or smaller screen, impress.js
2222
will automatically scale the steps to fit the screen.
2323

24-
**NOTE:** I intend to change the defaults to target HD screens in 2021. So you may want to make a habit
25-
of explicitly defining these attributes for now, to avoid any disruption when the defaults change.
24+
**NOTE:** The default width and height have been changed to target HD screens in v1.2.0. If you
25+
don't set target width and height explicitly, layout and dimensions of your presentations are likely
26+
to be affected. In order to get back the old target resolution, use:
27+
28+
<div id="impress" data-width="1024" data-height="768" data-max-scale="1" data-min-scale="0"
29+
2630

2731
You can also control the perspective with `data-perspective="500"` giving it a number of pixels.
2832
It defaults to 1000. You can set it to 0 if you don't want any 3D effects.
@@ -36,9 +40,9 @@ See also [the plugin README](src/plugins/README.md) for documentation on `data-a
3640
Attribute | Default | Explanation
3741
-------------------------|-----------|------------
3842
data-transition-duration | 1000 (ms) | Speed of transition between steps.
39-
data-width | 1024 (px) | Width of target screen size. When presentation is viewed on a larger or smaller screen, impress.js will scale all content automatically.
40-
data-height | 768 (px) | Height of target screen size.
41-
data-max-scale | 1 | Maximum scale factor. (Note that the default 1 will not increase content size on larger screens!)
43+
data-width | 1920 (px) | Width of target screen size. When presentation is viewed on a larger or smaller screen, impress.js will scale all content automatically.
44+
data-height | 1080 (px) | Height of target screen size.
45+
data-max-scale | 3 | Maximum scale factor. (Note that the default 1 will not increase content size on larger screens!)
4246
data-min-scale | 0 | Minimum scale factor.
4347
data-perspective | 1000 | Perspective for 3D rendering. See https://developer.mozilla.org/en/CSS/perspective
4448

js/impress.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@
169169

170170
// Some default config values.
171171
var defaults = {
172-
width: 1024,
173-
height: 768,
174-
maxScale: 1,
172+
width: 1920,
173+
height: 1080,
174+
maxScale: 3,
175175
minScale: 0,
176176

177177
perspective: 1000,

src/impress.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@
167167

168168
// Some default config values.
169169
var defaults = {
170-
width: 1024,
171-
height: 768,
172-
maxScale: 1,
170+
width: 1920,
171+
height: 1080,
172+
maxScale: 3,
173173
minScale: 0,
174174

175175
perspective: 1000,

0 commit comments

Comments
 (0)