Code review comment for lp:~zsombi/ubuntu-ui-toolkit/76-refactoring

Revision history for this message
Zsombor Egri (zsombi) wrote :

> 143 - var snapPos = (ListItemActions.offset >
> ListItemActions.listItem.swipeOvershoot && snapIn) ? panel.width : 0.0;
> 144 - ListItemActions.snapToPosition(snapPos);
> 145 + var snapPos = (swipedOffset > units.gu(2) && snapIn) ?
> panel.width : 0.0;
> 146 + ListItem.snapToPosition(snapPos);
> 147 }
>
> You replaced swipeOvershoot by a hard-coded value here. Is that an
> improvement? It is better to have a constant defined.

The thing is that if we use swipeOvershoot, and that one is set to 10GU, it will snap out even if the first 2 actions will be visible, as those get visible on <10GU swiped offset. So as last time discussed, the magic number for the swipe is 2GU, that's why I have it.

« Back to merge proposal