Skip to content

Commit

Permalink
remove blockscroll from presets
Browse files Browse the repository at this point in the history
  • Loading branch information
IzaacAyelin committed May 28, 2024
1 parent 9bb1ff5 commit 6594f49
Show file tree
Hide file tree
Showing 11 changed files with 2 additions and 10 deletions.
1 change: 0 additions & 1 deletion packages/lib/src/core/presets/collageGallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const fixToCollage = (options) => {
presetOptions[optionsMap.layoutParams.structure.responsiveMode] =
GALLERY_CONSTS[optionsMap.layoutParams.structure.responsiveMode].FIT_TO_SCREEN;
presetOptions[optionsMap.layoutParams.structure.numberOfColumns] = 0;
presetOptions[optionsMap.behaviourParams.gallery.horizontal.blockScroll] = false;
presetOptions[optionsMap.layoutParams.crop.cropOnlyFill] = false;
presetOptions[optionsMap.behaviourParams.gallery.horizontal.slideAnimation] =
GALLERY_CONSTS[optionsMap.behaviourParams.gallery.horizontal.slideAnimation].SCROLL;
Expand Down
1 change: 0 additions & 1 deletion packages/lib/src/core/presets/columnGallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const fixToColumn = (options) => {
presetOptions[optionsMap.layoutParams.crop.enableSmartCrop] = false;

presetOptions[optionsMap.layoutParams.structure.numberOfColumns] = 0;
presetOptions[optionsMap.behaviourParams.gallery.horizontal.blockScroll] = false;
presetOptions[optionsMap.layoutParams.crop.cropOnlyFill] = false;

presetOptions[optionsMap.behaviourParams.gallery.horizontal.slideAnimation] =
Expand Down
1 change: 0 additions & 1 deletion packages/lib/src/core/presets/fullsizeGallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ const fixToFullsize = (options) => {
];
presetOptions[optionsMap.layoutParams.structure.numberOfGridRows] = 1;
presetOptions[optionsMap.layoutParams.crop.enableSmartCrop] = false;
presetOptions[optionsMap.behaviourParams.gallery.horizontal.blockScroll] = false;
presetOptions[optionsMap.behaviourParams.gallery.horizontal.enableScrollSnap] = true;
presetOptions[optionsMap.layoutParams.crop.cropOnlyFill] = true;
presetOptions[optionsMap.layoutParams.structure.scatter.randomScatter] = 0;
Expand Down
1 change: 0 additions & 1 deletion packages/lib/src/core/presets/gridGallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const fixToGrid = (options) => {
presetOptions[optionsMap.behaviourParams.gallery.horizontal.loop] = false;
presetOptions[optionsMap.layoutParams.crop.enableSmartCrop] = false;
// presetOptions.galleryType = 'Columns';
presetOptions[optionsMap.behaviourParams.gallery.horizontal.blockScroll] = false;
presetOptions[optionsMap.layoutParams.crop.cropOnlyFill] = false;
presetOptions[optionsMap.layoutParams.targetItemSize.minimum] = 50;
presetOptions[optionsMap.behaviourParams.gallery.horizontal.slideAnimation] =
Expand Down
1 change: 0 additions & 1 deletion packages/lib/src/core/presets/masonryGallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const fixToMasonry = (options) => {
GALLERY_CONSTS[optionsMap.layoutParams.groups.allowedGroupTypes]['1'],
];
presetOptions[optionsMap.behaviourParams.gallery.horizontal.loop] = false;
presetOptions[optionsMap.behaviourParams.gallery.horizontal.blockScroll] = false;
presetOptions[optionsMap.layoutParams.crop.cropOnlyFill] = false;
return presetOptions;
};
Expand Down
1 change: 0 additions & 1 deletion packages/lib/src/core/presets/panoramaGallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const fixToPanorama = (options) => {
presetOptions[optionsMap.layoutParams.structure.responsiveMode] =
GALLERY_CONSTS[optionsMap.layoutParams.structure.responsiveMode].SET_ITEMS_PER_ROW;
presetOptions[optionsMap.layoutParams.structure.numberOfColumns] = 1;
presetOptions[optionsMap.behaviourParams.gallery.horizontal.blockScroll] = false;
presetOptions[optionsMap.layoutParams.crop.cropOnlyFill] = false;
presetOptions[optionsMap.behaviourParams.gallery.horizontal.loop] = false;

Expand Down
1 change: 0 additions & 1 deletion packages/lib/src/core/presets/sliderGallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const fixToSlider = (options) => {
presetOptions[optionsMap.layoutParams.structure.numberOfGridRows] = 1;
presetOptions[optionsMap.layoutParams.crop.enableSmartCrop] = false;

presetOptions[optionsMap.behaviourParams.gallery.horizontal.blockScroll] = false;
presetOptions[optionsMap.behaviourParams.gallery.horizontal.enableScrollSnap] = true;
presetOptions[optionsMap.layoutParams.crop.cropOnlyFill] = true;
presetOptions[optionsMap.behaviourParams.gallery.horizontal.slideAnimation] =
Expand Down
1 change: 0 additions & 1 deletion packages/lib/src/core/presets/slideshowGallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const fixToSlideshow = (options) => {
presetOptions[optionsMap.layoutParams.targetItemSize.value] = 550;

presetOptions[optionsMap.layoutParams.structure.numberOfColumns] = 1;
presetOptions[optionsMap.behaviourParams.gallery.horizontal.blockScroll] = false;
presetOptions[optionsMap.behaviourParams.gallery.horizontal.enableScrollSnap] = true;
presetOptions[optionsMap.layoutParams.crop.cropOnlyFill] = false;

Expand Down
1 change: 0 additions & 1 deletion packages/lib/src/core/presets/thumbnailsGallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const fixToThumbnail = (options) => {
presetOptions[optionsMap.layoutParams.structure.numberOfGridRows] = 1;
presetOptions[optionsMap.layoutParams.crop.enableSmartCrop] = false;
presetOptions[optionsMap.layoutParams.thumbnails.enable] = true;
presetOptions[optionsMap.behaviourParams.gallery.horizontal.blockScroll] = false;
presetOptions[optionsMap.behaviourParams.gallery.horizontal.enableScrollSnap] = true;
presetOptions[optionsMap.layoutParams.crop.cropOnlyFill] = false;
presetOptions[optionsMap.layoutParams.structure.scatter.randomScatter] = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default {
GALLERY_CONSTS[optionsMap.layoutParams.structure.scrollDirection].HORIZONTAL &&
options[optionsMap.layoutParams.groups.groupSize] === 1 &&
options[optionsMap.layoutParams.crop.enable] &&
options[optionsMap.layoutParams.crop.ratios] === ['100%/100%'], //v5 TODO check that this works
JSON.stringify(options[optionsMap.layoutParams.crop.ratios]) === JSON.stringify(['100%/100%']), //v5 TODO check that this works
isRelevantDescription:
'Set a Horizontal gallery ("Scroll Direction" as "Horizontal"), set "Max Group Size" to "1" and set "Crop Images" to true.',
type: INPUT_TYPES.OPTIONS,
Expand Down
1 change: 1 addition & 0 deletions packages/playground/src/constants/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export const optionsBySection = {
optionsMap.layoutParams.thumbnails.spacing,
optionsMap.layoutParams.thumbnails.marginToGallery,
optionsMap.layoutParams.structure.enableStreching,
optionsMap.behaviourParams.gallery.horizontal.blockScroll,
],
[SECTIONS.INFO]: [
optionsMap.layoutParams.info.placement,
Expand Down

0 comments on commit 6594f49

Please sign in to comment.