Update resize handle for new designs
The diff should have information on what this does and how it is supposed to work.
This commit is contained in:
parent
7549d7d98a
commit
5f8b7187cf
4 changed files with 132 additions and 37 deletions
|
@ -52,7 +52,24 @@ export class ListLayout {
|
|||
}
|
||||
|
||||
public get minVisibleTiles(): number {
|
||||
return 3;
|
||||
// the .65 comes from the CSS where the show more button is
|
||||
// mathematically 65% of a tile when floating.
|
||||
return 4.65;
|
||||
}
|
||||
|
||||
public calculateTilesToPixelsMin(maxTiles: number, n: number, possiblePadding: number): number {
|
||||
// Only apply the padding if we're about to use maxTiles as we need to
|
||||
// plan for the padding. If we're using n, the padding is already accounted
|
||||
// for by the resizing stuff.
|
||||
let padding = 0;
|
||||
if (maxTiles < n) {
|
||||
padding = possiblePadding;
|
||||
}
|
||||
return this.tilesToPixels(Math.min(maxTiles, n)) + padding;
|
||||
}
|
||||
|
||||
public tilesToPixelsWithPadding(n: number, padding: number): number {
|
||||
return this.tilesToPixels(n) + padding;
|
||||
}
|
||||
|
||||
public tilesToPixels(n: number): number {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue