layout: allow disable
parent
c9eb878330
commit
88e89c88e0
|
@ -34,7 +34,7 @@
|
|||
|
||||
<NcCheckboxRadioSwitch :checked.sync="config_squareThumbs"
|
||||
type="switch">
|
||||
{{ t('memories', 'Square photos') }}
|
||||
{{ t('memories', 'Square grid mode') }}
|
||||
</NcCheckboxRadioSwitch>
|
||||
|
||||
<button @click="updateAll()">
|
||||
|
|
|
@ -725,6 +725,7 @@ export default class Timeline extends Mixins(GlobalMixin, UserConfig) {
|
|||
rowHeight: this.rowHeight,
|
||||
squareMode: this.squareMode,
|
||||
numCols: this.numCols,
|
||||
allowBreakout: (window.innerWidth < 768) && !this.config_squareThumbs,
|
||||
seed: dayId,
|
||||
});
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ export function getLayout(
|
|||
rowHeight: number,
|
||||
squareMode: boolean,
|
||||
numCols: number,
|
||||
allowBreakout: boolean,
|
||||
seed: number,
|
||||
}
|
||||
): {
|
||||
|
@ -71,7 +72,8 @@ export function getLayout(
|
|||
// Check if previous row has something used
|
||||
// or something beside this is used
|
||||
// We don't do these one after another
|
||||
if ((row > 0 && matrix[row-1].some(v => v & FLAG_USED)) ||
|
||||
if (!opts.allowBreakout ||
|
||||
(row > 0 && matrix[row-1].some(v => v & FLAG_USED)) ||
|
||||
(col > 0 && matrix[row][col-1] & FLAG_USED)
|
||||
) {
|
||||
photoId++; col++; continue;
|
||||
|
|
Loading…
Reference in New Issue