refactor: Simplify API calls and enhance model moving functionality

This commit is contained in:
Will Miao
2025-07-25 14:44:05 +08:00
parent d83fad6abc
commit 26d51b1190
9 changed files with 186 additions and 199 deletions

View File

@@ -164,23 +164,6 @@ export class VirtualScroller {
// Calculate the left offset to center the grid within the content area
this.leftOffset = Math.max(0, (availableContentWidth - actualGridWidth) / 2);
// Log layout info
console.log('Virtual Scroll Layout:', {
containerWidth,
availableContentWidth,
actualGridWidth,
columnsCount: this.columnsCount,
itemWidth: this.itemWidth,
itemHeight: this.itemHeight,
leftOffset: this.leftOffset,
paddingLeft,
paddingRight,
displayDensity,
maxColumns,
baseCardWidth,
rowGap: this.rowGap
});
// Update grid element max-width to match available width
this.gridElement.style.maxWidth = `${actualGridWidth}px`;