Skip to content

Commit c57b7dc

Browse files
committed
- Adding new option: dragAndMove that enables the dragging and flickering of sections and slides with mouse or fingers alvarotrigo#2182
1 parent 7d1031f commit c57b7dc

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ $(document).ready(function() {
171171
continuousHorizontal: false,
172172
scrollHorizontally: false,
173173
interlockedSlides: false,
174+
dragAndMove: false,
174175
offsetSections: false,
175176
resetSliders: false,
176177
fadingEffect: false,
@@ -395,6 +396,8 @@ the fitting by the configured milliseconds.
395396

396397
- `interlockedSlides`: (default `false`) [Extension of fullpage.js](http://alvarotrigo.com/fullPage/extensions/). Determines whether moving one horizontal slider will force the sliding of sliders in other section in the same direction. Possible values are `true`, `false` or an array with the interlocked sections. For example `[1,3,5]` starting by 1. Requires fullpage.js >= 2.8.3.
397398

399+
- `dragAndMove`: (default `false`) [Extension of fullpage.js](http://alvarotrigo.com/fullPage/extensions/). Enables or disables the dragging and flicking of sections and slides by using mouse or fingers. Possible values are `true`, `false`, `fingersonly`.
400+
398401
- `offsetSections`: (default `false`)[Extension of fullpage.js](http://alvarotrigo.com/fullPage/extensions/). Provides a way to use non full screen sections based on percentage. Ideal to show visitors there's more content in the site by showing part of the next or previous section. Requires fullPage.js >= 2.8.8
399402
To define the percentage of each section the attribute `data-percentage` must be used. The centering of the section in the viewport can be determined by using a boolean value in the attribute `data-centered` (default to `true` if not specified). For example:
400403
``` html

README_SPANISH.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ $(document).ready(function() {
170170
continuousHorizontal: false,
171171
scrollHorizontally: false,
172172
interlockedSlides: false,
173+
dragAndMove: false,
173174
offsetSections: false,
174175
resetSliders: false,
175176
fadingEffect: false,
@@ -390,6 +391,8 @@ Otras librerías puede ser usadas si se desea.
390391

391392
- `interlockedSlides`: (default `false`) [Extensión de fullpage.js](http://alvarotrigo.com/fullPage/extensions/). Determina si al mover horizontalmente una sección con diapositivas ésto forzará el movimiento de otras diapositivas en otras secciones en la misma dirección. Los posibles valores son `true`, `false` o un array con las secciones que estarán interconectadas. Por ejemplo `[1,3,5]` empeznado por 1.
392393

394+
- `dragAndMove`: (default `false`) [Extensión de fullpage.js](http://alvarotrigo.com/fullPage/extensions/). Habilita o deshabilita el desplazamiento de secciones y diapositivas usando el ratón o los dedos en dispositivos táctiles. Los posibles valores para esta opción son `false`, `true`, `fingersonly`. La opción `fingersonly` habilita esta funcionalidad sólo para el desplazamienton con los dedos en dispositivos táctiles.
395+
393396
- `offsetSections`: (default `false`)[Extensión de fullpage.js](http://alvarotrigo.com/fullPage/extensions/). Provee una manera de usar secciones que no toman la pantalla completa sino un porcentage determinado de la misma. Ideal para mostrar a los visitantes que hay más contenido en la página mostrando parte de sección siguiente o anterior.
394397
Para definir el porcentage de la sección hay que hacer uso del atributo `data-percentage`. El centrado de la sección en la ventana puede definirse usando un valor booleano (true o false) en el atributo `data-centered`. (Por defecto será `true` si no se especifica) Por ejemplo:
395398
``` html

jquery.fullPage.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@
138138
continuousHorizontal: false,
139139
scrollHorizontally: false,
140140
interlockedSlides: false,
141+
dragAndMove: false,
141142
offsetSections: false,
142143
resetSliders: false,
143144
fadingEffect: false,
@@ -2631,7 +2632,7 @@
26312632
// that's why we round it to 0.
26322633
var roundedTop = Math.round(top);
26332634

2634-
if(options.scrollBar){
2635+
if(options.scrollBar || !options.autoScrolling){
26352636
container.scrollTop(roundedTop);
26362637
}
26372638
else if (options.css3) {
@@ -2806,7 +2807,7 @@
28062807
* Displays warnings
28072808
*/
28082809
function displayWarnings(){
2809-
var extensions = ['fadingEffect', 'continuousHorizontal', 'scrollHorizontally', 'interlockedSlides', 'resetSliders', 'responsiveSlides', 'offsetSections'];
2810+
var extensions = ['fadingEffect', 'continuousHorizontal', 'scrollHorizontally', 'interlockedSlides', 'resetSliders', 'responsiveSlides', 'offsetSections', 'dragAndMove'];
28102811
if($('html').hasClass(ENABLED)){
28112812
showError('error', 'Fullpage.js can only be initialized once and you are doing it multiple times!');
28122813
return;

0 commit comments

Comments
 (0)