Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 4 commits
  • 5 files changed
  • 0 commit comments
  • 1 contributor
View
3 core/deck.core.css
@@ -4,11 +4,12 @@ html {
body.deck-container {
overflow-y: auto;
+ position: static;
}
.deck-container {
position: relative;
- height: 100%;
+ min-height: 100%;
margin: 0 auto;
padding: 0 48px;
font-size: 16px;
View
3 core/deck.core.scss
@@ -4,11 +4,12 @@ html {
body.deck-container {
overflow-y:auto;
+ position:static;
}
.deck-container {
position:relative;
- height:100%;
+ min-height:100%;
margin:0 auto;
padding:0 48px;
font-size:16px;
View
14 extensions/hash/deck.hash.js
@@ -53,13 +53,19 @@ slide.
Every slide that does not have an id is assigned one at initialization.
Assigned ids take the form of hashPrefix + slideIndex, e.g., slide-0,
slide-12, etc.
+
+ options.preventFragmentScroll
+ When deep linking to a hash of a nested slide, this scrolls the deck
+ container to the top, undoing the natural browser behavior of scrolling
+ to the document fragment on load.
*/
$.extend(true, $[deck].defaults, {
selectors: {
hashLink: '.deck-permalink'
},
- hashPrefix: 'slide-'
+ hashPrefix: 'slide-',
+ preventFragmentScroll: true
});
@@ -125,5 +131,11 @@ slide.
else {
goByHash(window.location.hash);
}
+ })
+ /* Prevent scrolling on deep links */
+ .bind('load', function() {
+ if ($[deck]('getOptions').preventFragmentScroll) {
+ $[deck]('getContainer').scrollLeft(0).scrollTop(0);
+ }
});
})(jQuery, 'deck', this);
View
5 extensions/scale/deck.scale.css
@@ -1,6 +1,9 @@
-.csstransforms .deck-container.deck-scale:not(.deck-menu) {
+/* Remove this line if you are embedding deck.js in a page and
+using the scale extension. */
+.csstransforms {
overflow: hidden;
}
+
.csstransforms .deck-container.deck-scale:not(.deck-menu) > .slide {
-webkit-box-sizing: padding-box;
-moz-box-sizing: padding-box;
View
8 extensions/scale/deck.scale.scss
@@ -1,6 +1,10 @@
-.csstransforms .deck-container.deck-scale:not(.deck-menu) {
+/* Remove this line if you are embedding deck.js in a page and
+using the scale extension. */
+.csstransforms {
overflow:hidden;
-
+}
+
+.csstransforms .deck-container.deck-scale:not(.deck-menu) {
> .slide {
-webkit-box-sizing: padding-box;
-moz-box-sizing: padding-box;

No commit comments for this range

Something went wrong with that request. Please try again.