Skip to content

Commit

Permalink
feat(autocomplete): restore adaptative snippeting
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerska committed Apr 26, 2016
1 parent d42fdb6 commit 486cdfe
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions app/src/autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,9 @@ class Autocomplete {
}

_nbSnippetWords(inputWidth) {
var words;
// if (inputWidth < XS_WIDTH) words= 0;
// if (inputWidth < SM_WIDTH) words= 5 + Math.floor(inputWidth / 30);
words = Math.floor(inputWidth / 35);
return words;
if (inputWidth < XS_WIDTH) return 0;
if (inputWidth < SM_WIDTH) return 3 + Math.floor(inputWidth / 45);
return Math.floor(inputWidth / 35);
}

_source(params) {
Expand Down

0 comments on commit 486cdfe

Please sign in to comment.