Skip to content

Commit 842d525

Browse files
committed
Merge pull request alvarotrigo#2024 from alvarotrigo/dev
- Removed `resize` option
2 parents 0ac8674 + 8562748 commit 842d525

File tree

8 files changed

+53
-110
lines changed

8 files changed

+53
-110
lines changed

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ $(document).ready(function() {
182182
//Design
183183
controlArrows: true,
184184
verticalCentered: true,
185-
resize : false,
186185
sectionsColor : ['#ccc', '#fff'],
187186
paddingTop: '3em',
188187
paddingBottom: '10px',
@@ -300,8 +299,6 @@ Embedded HTML5 `<video>` / `<audio>` and Youtube iframes are automatically paus
300299

301300
- `verticalCentered`: (default `true`) Vertically centering of the content within sections. When set to `true`, your content will be wrapped by the plugin. Consider using delegation or load your other scripts in the `afterRender` callback.
302301

303-
- `resize`: (default `false`) Whether you want to resize the text when the window is resized.
304-
305302
- `scrollingSpeed`: (default `700`) Speed in milliseconds for the scrolling transitions.
306303

307304
- `sectionsColor`:(default `none`) Define the CSS `background-color` property for each section:

dist/jquery.fullpage.js

Lines changed: 6 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
// slimscroll
2727
var SCROLLABLE = 'fp-scrollable';
2828
var SCROLLABLE_SEL = '.' + SCROLLABLE;
29-
var SLIMSCROLL_BAR_SEL = '.slimScrollBar';
30-
var SLIMSCROLL_RAIL_SEL = '.slimScrollRail';
3129

3230
// util
3331
var RESPONSIVE = 'fp-responsive';
@@ -101,7 +99,7 @@
10199

102100
$.fn.fullpage = function(options) {
103101
//only once my friend!
104-
if($('html').hasClass(ENABLED)){ displayWarnings(); return };
102+
if($('html').hasClass(ENABLED)){ displayWarnings(); return; }
105103

106104
// common jQuery objects
107105
var $htmlBody = $('html, body');
@@ -152,7 +150,6 @@
152150
controlArrows: true,
153151
controlArrowColor: '#fff',
154152
verticalCentered: true,
155-
resize: false,
156153
sectionsColor : [],
157154
paddingTop: 0,
158155
paddingBottom: 0,
@@ -353,7 +350,7 @@
353350
*/
354351
FP.silentMoveTo = function(sectionAnchor, slideAnchor){
355352
FP.setScrollingSpeed (0, 'internal');
356-
FP.moveTo(sectionAnchor, slideAnchor)
353+
FP.moveTo(sectionAnchor, slideAnchor);
357354
FP.setScrollingSpeed (originals.scrollingSpeed, 'internal');
358355
};
359356

@@ -395,14 +392,8 @@
395392

396393
isResizing = true;
397394

398-
var windowsWidth = $window.outerWidth();
399395
windowsHeight = $window.height(); //updating global var
400396

401-
//text resizing
402-
if (options.resize) {
403-
resizeMe(windowsHeight, windowsWidth);
404-
}
405-
406397
$(SECTION_SEL).each(function(){
407398
var slidesWrap = $(this).find(SLIDES_WRAPPER_SEL);
408399
var slides = $(this).find(SLIDE_SEL);
@@ -466,7 +457,7 @@
466457
$(SECTION_NAV_SEL).show();
467458
$body.removeClass(RESPONSIVE);
468459
}
469-
}
460+
};
470461

471462
//flag to avoid very fast sliding for landscape sliders
472463
var slideMoving = false;
@@ -1992,26 +1983,6 @@
19921983
return element.addClass(NO_TRANSITION);
19931984
}
19941985

1995-
/**
1996-
* Resizing of the font size depending on the window size as well as some of the images on the site.
1997-
*/
1998-
function resizeMe(displayHeight, displayWidth) {
1999-
//Standard dimensions, for which the body font size is correct
2000-
var preferredHeight = 825;
2001-
var preferredWidth = 900;
2002-
2003-
if (displayHeight < preferredHeight || displayWidth < preferredWidth) {
2004-
var heightPercentage = (displayHeight * 100) / preferredHeight;
2005-
var widthPercentage = (displayWidth * 100) / preferredWidth;
2006-
var percentage = Math.min(heightPercentage, widthPercentage);
2007-
var newFontSize = percentage.toFixed(2);
2008-
2009-
$body.css('font-size', newFontSize + '%');
2010-
} else {
2011-
$body.css('font-size', '100%');
2012-
}
2013-
}
2014-
20151986
/**
20161987
* Activating the website navigation dots according to the given slide name.
20171988
*/
@@ -2334,8 +2305,6 @@
23342305
var sectionAnchor = getAnchor(section);
23352306
var slideAnchor = getAnchor(slide);
23362307

2337-
var sectionIndex = section.index(SECTION_SEL);
2338-
23392308
var text = String(sectionAnchor);
23402309

23412310
if(slide.length){
@@ -2761,7 +2730,7 @@
27612730
this.wrapper.addEventListener('wheel', this);
27622731
this.wrapper.addEventListener('mousewheel', this);
27632732
this.wrapper.addEventListener('DOMMouseScroll', this);
2764-
}
2733+
};
27652734

27662735
/*
27672736
* Turns iScroll `mousewheel` option on dynamically
@@ -2771,7 +2740,7 @@
27712740
this.wrapper.removeEventListener('wheel', this);
27722741
this.wrapper.removeEventListener('mousewheel', this);
27732742
this.wrapper.removeEventListener('DOMMouseScroll', this);
2774-
}
2743+
};
27752744
}
27762745

27772746
/**
@@ -2911,7 +2880,7 @@
29112880
iscrollHandler.refreshId = setTimeout(function(){
29122881
$.each(iscrollHandler.iScrollInstances, function(){
29132882
$(this).get(0).refresh();
2914-
})
2883+
});
29152884
}, 150);
29162885

29172886
//updating the wrappers height

dist/jquery.fullpage.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jquery.fullpage.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/demoPage.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
$(document).ready(function() {
5959
$('#fullpage').fullpage({
6060
sectionsColor: ['#1bbc9b', '#4BBFC3', '#7BAABE', 'whitesmoke', '#ccddff'],
61-
anchors: ['firstPage', 'secondPage', '3rdPage', '4thpage', 'lastPage'],
61+
anchors: ['start-info', 'about-info', 'service-info', 'actual-info', 'contact-info'],
6262
menu: '#menu',
6363
scrollingSpeed: 1000
6464
});
@@ -107,33 +107,34 @@
107107
<div id="fullpage">
108108
<div class="section " id="section0">
109109
<h1>fullPage.js</h1>
110+
<input type="hidden" name="id" value="1" />
110111
<p>Create Beautiful Fullscreen Scrolling Websites</p>
111112
<img src="imgs/fullPage.png" alt="fullPage" />
112113
</div>
113-
<div class="section" id="section1">
114-
<div class="slide">
114+
<div class="section active" id="section1">
115+
<div class="slide">
115116
<div class="intro">
116117
<h1>Create Sliders</h1>
117118
<p>Not only vertical scrolling but also horizontal scrolling. With fullPage.js you will be able to add horizontal sliders in the most simple way ever.</p>
118119
<img src="imgs/slider.png" alt="slider" />
119120
</div>
120121

121122
</div>
122-
<div class="slide">
123+
<div class="slide">
123124
<div class="intro">
124125
<img src="imgs/1.png" alt="simple" />
125126
<h1>Simple</h1>
126127
<p>Easy to use. Configurable and customizable.</p>
127128
</div>
128129
</div>
129-
<div class="slide">
130+
<div class="slide">
130131
<div class="intro">
131132
<img src="imgs/2.png" alt="Cool" />
132133
<h1>Cool</h1>
133134
<p>It just looks cool. Impress everybody with a simple and modern web design!</p>
134135
</div>
135136
</div>
136-
<div class="slide">
137+
<div class="slide">
137138
<div class="intro">
138139
<img src="imgs/3.png" alt="Compatible" />
139140
<h1>Compatible</h1>

examples/methods.html

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
<script type="text/javascript">
2828
$(document).ready(function() {
2929

30-
function initialization(){
31-
$('#myContainer').fullpage({
32-
sectionsColor: ['#4A6FB1', '#4BBFC3', '#7BAABE', 'whitesmoke', '#ccddff'],
33-
anchors: ['firstPage', 'secondPage', '3rdPage', '4thpage', 'lastPage'],
34-
resize: false,
35-
animateAnchor:false,
30+
function initialization(){
31+
$('#myContainer').fullpage({
32+
sectionsColor: ['#4A6FB1', '#4BBFC3', '#7BAABE', 'whitesmoke', '#ccddff'],
33+
anchors: ['firstPage', 'secondPage', '3rdPage', '4thpage', 'lastPage'],
34+
resize: false,
35+
animateAnchor:false,
3636
scrollOverflow: true,
3737
autoScrolling:true,
3838
responsive: 900,
@@ -41,30 +41,30 @@
4141
navigation:true,
4242
continuousVertical:true,
4343
paddingTop: '20px',
44-
css3: true,
44+
css3: true,
4545
onLeave: function(index, nextIndex, direction){
4646
console.log("onLeave--" + "index: " + index + " nextIndex: " + nextIndex + " direction: " + direction);
4747
},
48-
afterLoad: function(anchorLink, index){
48+
afterLoad: function(anchorLink, index){
4949
console.log("afterLoad--" + "anchorLink: " + anchorLink + " index: " + index );
50-
},
50+
},
5151
afterSlideLoad: function(anchorLink, index, slideAnchor, slideIndex){
5252
console.log("afterSlideLoad--" + "anchorLink: " + anchorLink + " index: " + index + " slideAnchor: " + slideAnchor + " slideIndex: " + slideIndex);
5353
},
54-
onSlideLeave: function(anchorLink, index, slideIndex, direction){
54+
onSlideLeave: function(anchorLink, index, slideIndex, direction){
5555
console.log("onSlideLeave--" + "anchorLink: " + anchorLink + " index: " + index + " slideIndex: " + slideIndex + " direction: " + direction);
56-
},
57-
afterRender: function(){
56+
},
57+
afterRender: function(){
5858
console.log("afterRender");
59-
},
60-
afterResize: function(){
59+
},
60+
afterResize: function(){
6161
console.log("afterResize");
62-
}
63-
});
64-
}
62+
}
63+
});
64+
}
6565

66-
//fullPage.js initialization
67-
initialization();
66+
//fullPage.js initialization
67+
initialization();
6868

6969

7070
$('#moveSectionUp').click(function(e){
@@ -168,8 +168,8 @@
168168
e.preventDefault;
169169
$.fn.fullpage.setLockAnchors(false);
170170
});
171-
});
172-
</script>
171+
});
172+
</script>
173173

174174
<style>
175175
#actions{
@@ -271,9 +271,9 @@ <h1>Section 1</h1>
271271
</div>
272272
<div class="section" id="section1">
273273
<div class="slide"><h1>Section 2</h1></div>
274-
<div class="slide"><div class="wrap"><h1>Slide 2.1</h1></div></div>
275-
<div class="slide"><h1>Slide 2.2</h1></div>
276-
<div class="slide"><h1>Slide 2.3</h1></div>
274+
<div class="slide"><div class="wrap"><h1>Slide 2.1</h1></div></div>
275+
<div class="slide"><h1>Slide 2.2</h1></div>
276+
<div class="slide"><h1>Slide 2.3</h1></div>
277277
</div>
278278
<div class="section" id="section2"><h1>Section 3</h1></div>
279279
<div class="section" id="section3"><h1>Section 4</h1></div>

examples/scrolling.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,14 @@
6161
$('#fullpage').fullpage({
6262
anchors: ['firstPage', 'secondPage', '3rdPage', '4thPage'],
6363
sectionsColor: ['#4A6FB1', '#939FAA', '#323539'],
64-
scrollOverflow: true
64+
scrollOverflow: true,
65+
scrollOverflowOptions: {
66+
scrollbars: true,
67+
mouseWheel: true,
68+
hideScrollbars: false,
69+
fadeScrollbars: false,
70+
disableMouse: true
71+
}
6572
});
6673
});
6774
</script>

0 commit comments

Comments
 (0)