forked from damiengarbarino/dojo-calendar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MobileVerticalRenderer.js
51 lines (45 loc) · 992 Bytes
/
MobileVerticalRenderer.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
define([
"dcl/dcl",
"delite/register",
"./RendererBase",
"delite/handlebars!./templates/MobileVerticalRenderer.html"
], function (
dcl,
register,
_RendererMixin,
template
) {
return register("d-calendar-mobile-vertical", [HTMLElement, _RendererMixin], {
// summary:
// The mobile specific item vertical renderer.
template: template,
mobile: true,
visibilityLimits: {
resizeStartHandle: 75,
resizeEndHandle: -1,
summaryLabel: 55,
startTimeLabel: 75,
endTimeLabel: 20
},
_isElementVisible: dcl.superCall(function (sup) {
return function (elt) {
var d;
switch (elt) {
case "startTimeLabel":
d = this.item.startTime;
if (this.item.allDay || this.owner.isStartOfDay(d)) {
return false;
}
break;
case "endTimeLabel":
d = this.item.endTime;
if (this.item.allDay || this.owner.isStartOfDay(d)) {
return false;
}
break;
}
return sup.apply(this, arguments);
};
})
});
});