Fix bug 440715 - Event duration>'Show ...hours in view' -> selecting event in the unifinder doesn't scroll view to event if. r=mschroeder

git-svn-id: svn://10.0.0.236/trunk@252683 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mozilla%kewis.ch
2008-06-29 20:11:35 +00:00
parent 58ab081d06
commit 9304d83e0f

View File

@@ -3032,10 +3032,18 @@
var displayDuration = highMinute - lowMinute;
if (this.mSelectedItems.length &&
displayDuration >= 0 &&
displayDuration <= this.mVisibleMinutes) {
var minute = lowMinute + (displayDuration - this.mVisibleMinutes) / 2
this.setFirstVisibleMinute(minute);
displayDuration >= 0) {
if (displayDuration <= this.mVisibleMinutes) {
var minute = lowMinute + (displayDuration - this.mVisibleMinutes) / 2
this.setFirstVisibleMinute(minute);
} else if (this.mSelectedItems.length == 1) {
// If the displayDuration doesn't fit into the visible
// minutes, but only one event is selected, then go ahead and
// center the event start.
var minute = Math.max(0, lowMinute - (this.mVisibleMinutes / 2));
this.setFirstVisibleMinute(minute);
}
}
]]></body>
</method>