pds-dev-kit-web-test 2.2.81 → 2.2.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -357,20 +357,19 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
357
357
|
var _a, _b;
|
358
358
|
var viewport = width + ((_a = padding === null || padding === void 0 ? void 0 : padding.left) !== null && _a !== void 0 ? _a : 0) + ((_b = padding === null || padding === void 0 ? void 0 : padding.right) !== null && _b !== void 0 ? _b : 0);
|
359
359
|
if (device === 'MOBILE') {
|
360
|
+
var cellWidth_1 = viewport / MOBILE_GRID_COLS;
|
360
361
|
var baseViewPort = 375;
|
361
362
|
var gap = baseViewPort - viewport;
|
362
|
-
var cellWidth_1 = viewport / MOBILE_GRID_COLS;
|
363
363
|
if (gap > 0) {
|
364
|
-
var magicNumber = Math.pow((gap /
|
364
|
+
var magicNumber = Math.pow((gap / 18), 1.1);
|
365
365
|
var resSize = 16 - magicNumber;
|
366
|
-
console.log(viewport, resSize);
|
367
366
|
setBaseFontSize(resSize);
|
368
367
|
}
|
369
368
|
setRowHeight(cellWidth_1 * 0.56);
|
370
369
|
return;
|
371
370
|
}
|
372
|
-
var isSectionFontResponsive = !!(CB_CONTENT_PROP_SECTION === null || CB_CONTENT_PROP_SECTION === void 0 ? void 0 : CB_CONTENT_PROP_SECTION.CB_CONTENT_PROP_SECTION_SPEC_VARIABLEROOTFONTSIZE);
|
373
371
|
var cellWidth = viewport / DESKTOP_GRID_COLS;
|
372
|
+
var isSectionFontResponsive = !!(CB_CONTENT_PROP_SECTION === null || CB_CONTENT_PROP_SECTION === void 0 ? void 0 : CB_CONTENT_PROP_SECTION.CB_CONTENT_PROP_SECTION_SPEC_VARIABLEROOTFONTSIZE);
|
374
373
|
setRowHeight(cellWidth * 0.56);
|
375
374
|
isSectionFontResponsive ? setBaseFontSize(cellWidth / 2.35) : setBaseFontSize(16);
|
376
375
|
};
|
@@ -418,7 +417,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
418
417
|
paddingLeft: padding.left
|
419
418
|
} }, { children: (0, jsx_runtime_1.jsx)(Responsive, __assign({ innerRef: innerRef, allowOverlap: true, layouts: layouts, resizeHandles: ['nw', 'e', 'n', 'ne', 's', 'se', 'sw', 'w'], breakpoints: breakpoints, breakpoint: breakpoint, cols: { lg: 24, sm: 8 }, rowHeight: rowHeight, margin: [10, 10], style: {
|
420
419
|
width: customSectionStyles.width,
|
421
|
-
maxWidth: isMobile ? '
|
420
|
+
maxWidth: isMobile ? '480px' : customSectionStyles.maxWidth,
|
422
421
|
minWidth: isMobile ? GLE_MIN_WIDTH_MOBILE_PX : GLE_MIN_WIDTH_DESKTOP_PX,
|
423
422
|
fontSize: "".concat(baseFontSize, "px")
|
424
423
|
}, onLayoutChange: onLayoutChange, onDragStop: onDragStop, onResizeStop: onResizeStop, onWidthChange: onWidthChange, minNbRow: rows, isDraggable: isEditMode, isResizable: isEditMode }, { children: keepSimilarOrderToPreventRerender(layouts[layoutByDevice]).map(function (each, index) {
|