Total Complexity | 4 |
Complexity/F | 1.33 |
Lines of Code | 32 |
Function Count | 3 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | /** |
||
12 | import $ from "jquery"; |
||
13 | |||
14 | /** |
||
15 | * Class DropdownWithScrollBar |
||
16 | * |
||
17 | * @package Components |
||
18 | */ |
||
19 | export default class DropdownWithScrollBar { |
||
20 | constructor() { |
||
21 | const element = $('.dropdown'); |
||
22 | const elementItemsList = $('.dropdown-item-list'); |
||
23 | |||
24 | /** |
||
25 | * Adding nicescroll effect to the list |
||
26 | */ |
||
27 | elementItemsList.niceScroll({ |
||
28 | cursorcolor: "#333", |
||
29 | cursoropacitymax: 0.5, |
||
30 | cursorwidth: "3px", |
||
31 | horizrailenabled: false, |
||
32 | autohidemode: false, |
||
33 | }); |
||
34 | |||
35 | element.on("shown.bs.dropdown", function (e) { |
||
|
|||
36 | elementItemsList.show().resize(); |
||
37 | }); |
||
38 | |||
39 | element.on("hide.bs.dropdown", function (e) { |
||
40 | elementItemsList.hide(); |
||
41 | }); |
||
42 | } |
||
43 | } |
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.