better comments
This commit is contained in:
parent
a4ff3a36b9
commit
13cf7d4170
3 changed files with 4 additions and 2 deletions
0
src/components/content.vue
Normal file
0
src/components/content.vue
Normal file
|
|
@ -15,12 +15,12 @@ export function calcSideProximity (inputItemX: number, winW: number) {
|
|||
export function calcPosition (inputItemPosition: number, percent: number,
|
||||
short: number, win: number) {
|
||||
|
||||
// Is it close to the right/left side?
|
||||
// Is it close to a side? If so, stay fixed.
|
||||
if (percent > 0.75) {
|
||||
inputItemPosition = win - short
|
||||
}
|
||||
|
||||
// Is it not close to a side?
|
||||
// Else move relativly.
|
||||
if (percent < 0.75 && percent > 0.25) {
|
||||
inputItemPosition = win * percent
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue