Merge lp:~pkunal-parmar/ubuntu-calendar-app/IncubteObject into lp:ubuntu-calendar-app

Proposed by Kunal Parmar
Status: Merged
Approved by: Mihir Soni
Approved revision: 539
Merged at revision: 545
Proposed branch: lp:~pkunal-parmar/ubuntu-calendar-app/IncubteObject
Merge into: lp:ubuntu-calendar-app
Diff against target: 31 lines (+15/-2)
1 file modified
TimeLineBase.qml (+15/-2)
To merge this branch: bzr merge lp:~pkunal-parmar/ubuntu-calendar-app/IncubteObject
Reviewer Review Type Date Requested Status
Mihir Soni Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+241166@code.launchpad.net

Commit message

using incubate object to create bubble object

Description of the change

using incubate object to create bubble object

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Mihir Soni (mihirsoni) wrote :

Looks good to me !!
Thanks kunal

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'TimeLineBase.qml'
2--- TimeLineBase.qml 2014-11-06 13:49:22 +0000
3+++ TimeLineBase.qml 2014-11-08 02:18:28 +0000
4@@ -169,12 +169,25 @@
5 function createEvent( event, depth, sizeOfRow ) {
6 var eventBubble;
7 if( isHashEmpty(intern.unUsedEvents) ) {
8- eventBubble = delegate.createObject(bubbleOverLay);
9- eventBubble.objectName = children.length;
10+ var incubator = delegate.incubateObject(bubbleOverLay);
11+ if (incubator.status !== Component.Ready) {
12+ incubator.onStatusChanged = function(status) {
13+ if (status === Component.Ready) {
14+ incubator.object.objectName = children.length;
15+ assignBubbleProperties(incubator.object, event, depth, sizeOfRow);
16+ }
17+ }
18+ } else {
19+ incubator.object.objectName = children.length;
20+ assignBubbleProperties(incubator.object, event, depth, sizeOfRow);
21+ }
22 } else {
23 eventBubble = getUnusedEventBubble();
24+ assignBubbleProperties(eventBubble, event, depth, sizeOfRow);
25 }
26+ }
27
28+ function assignBubbleProperties(eventBubble, event, depth, sizeOfRow) {
29 var hour = event.startDateTime.getHours();
30 var yPos = (( event.startDateTime.getMinutes() * hourHeight) / 60) + hour * hourHeight
31 eventBubble.y = yPos;

Subscribers

People subscribed via source and target branches

to status/vote changes: