-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathTopBottomArranger.js
78 lines (67 loc) · 1.83 KB
/
TopBottomArranger.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/**
* Contains the declaration for the {@link module:layout/TopBottomArranger~TopBottomArranger} kind.
* @module layout/TopBottomArranger
*/
var
kind = require('enyo/kind');
var
LeftRightArranger = require('./LeftRightArranger');
/**
* {@link module:layout/TopBottomArranger~TopBottomArranger} is a
* {@link module:layout/Arranger~Arranger} that displays the active control and
* some of the previous and next controls. The active control is centered
* vertically in the container, and the previous and next controls are laid out
* above and below, respectively.
*
* Transitions between arrangements are handled by sliding the new control in
* from the bottom and sliding the active control out the top.
*
* For more information, see the documentation on
* [Arrangers]{@linkplain $dev-guide/building-apps/layout/arrangers.html} in the
* Enyo Developer Guide.
*
* @class TopBottomArranger
* @extends module:layout/LeftRightArranger~LeftRightArranger
* @public
*/
module.exports = kind(
/** @lends module:layout/TopBottomArranger~TopBottomArranger.prototype */ {
/**
* @private
*/
name: 'enyo.TopBottomArranger',
/**
* @private
*/
kind: LeftRightArranger,
/**
* @see {@link module:layout/Arranger~Arranger#dragProp}
* @private
*/
dragProp: 'ddy',
/**
* @see {@link module:layout/Arranger~Arranger#dragDirectionProp}
* @private
*/
dragDirectionProp: 'yDirection',
/**
* @see {@link module:layout/Arranger~Arranger#canDragProp}
* @private
*/
canDragProp: 'vertical',
/**
* @see {@link module:layout/LeftRightArranger~LeftRightArranger#axisSize}
* @protected
*/
axisSize: 'height',
/**
* @see {@link module:layout/LeftRightArranger~LeftRightArranger#offAxisSize}
* @protected
*/
offAxisSize: 'width',
/**
* @see {@link module:layout/LeftRightArranger~LeftRightArranger#axisPosition}
* @protected
*/
axisPosition: 'top'
});