Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
deguchi committed Apr 27, 2022
1 parent 585c724 commit a0229ae
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Hiradumi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,13 @@ const Hiradumi = (props: Props) => {
}

// rowに入れる処理済みのItemのindex
let putInRowIndex = 0
let itemsInProcess = Items.slice(putInRowIndex, putInRowIndex+100)
let rowIndex = 0
const processThroughput = 100
let itemsInProcess = Items.slice(rowIndex, rowIndex+processThroughput)

const rowMaxWidth = props.width - props.padding * 2 - getScrollbarWidth()
for (let i = 0; itemsInProcess.length > 0 && rows.length <= props.rowCount; i++) {
const rowRatioIndex = i % props.rowRatios.length
const rowRatio = props.rowRatios[rowRatioIndex]
const rowRatio = props.rowRatios[i % props.rowRatios.length]

// 行の幅の範囲内にアイテムを入れる
let rowItems = putItem(itemsInProcess, rowMaxWidth, rowRatio, props.itemHeight, props.itemMargin)
Expand Down Expand Up @@ -147,8 +147,8 @@ const Hiradumi = (props: Props) => {
})
rowHeights.push(Math.max(...heights))

putInRowIndex += rowItems.length
itemsInProcess = Items.slice(putInRowIndex, putInRowIndex+100)
rowIndex += rowItems.length
itemsInProcess = Items.slice(rowIndex, rowIndex+processThroughput)

}

Expand Down Expand Up @@ -222,7 +222,7 @@ const Hiradumi = (props: Props) => {
const row = Rows[rowItem.index]
const rowStyle = JSON.parse(JSON.stringify(rowItem.style))
rowStyle.display = 'flex'
rowStyle.justifyContent = 'space-between'
// rowStyle.justifyContent = 'space-between'

if (typeof row.type==='undefined') {
// paddingを反映
Expand Down

0 comments on commit a0229ae

Please sign in to comment.