Remove rounding of item positions. ref #10

If you want to round them still, subclass `Shuffle` and override the `getStylesForTransition()` method.
pull/160/head
Glen Cheney 7 years ago
parent 9bb8f43f17
commit 68fc6ae10a

2
dist/shuffle.js vendored

@ -733,7 +733,7 @@ function getItemPosition(_ref) {
var shortColumnIndex = getShortColumn(setY, buffer);
// Position the item
var point = new Point(Math.round(gridSize * shortColumnIndex), Math.round(setY[shortColumnIndex]));
var point = new Point(gridSize * shortColumnIndex, setY[shortColumnIndex]);
// Update the columns array with the new values for each column.
// e.g. before the update the columns could be [250, 0, 0, 0] for an item

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -106,9 +106,7 @@ export function getItemPosition({ itemSize, positions, gridSize, total, threshol
const shortColumnIndex = getShortColumn(setY, buffer);
// Position the item
const point = new Point(
Math.round(gridSize * shortColumnIndex),
Math.round(setY[shortColumnIndex]));
const point = new Point(gridSize * shortColumnIndex, setY[shortColumnIndex]);
// Update the columns array with the new values for each column.
// e.g. before the update the columns could be [250, 0, 0, 0] for an item

Loading…
Cancel
Save