2 * Contains area definitions for applications radial menu and apps definitions.
3 * @class predefAppModel
4 * @module HomescreenApplication
7 * Define center point of radial menu
8 * @property centerPoint
10 * @default {x: 360, y: 675}
13 var centerPoint = {x: 360, y: 675};
16 * Definitions of radial pie.
17 * Possible properties in contained Objects:
18 * name, id, action, sectorID, iconPath, shape, sc, lc, sa, la
19 * @property areasDefinitions
23 * Name of an application
28 * Id of an application
33 * Action after click to defined area.
38 * Sector id in context to homescreen pie sectors
48 * Define shape of clicking area
53 * Small circle - define distance from center, where pie sector starts (influence only if shape is pieWithoutCenter)
58 * Large circle - define distance from center, where pie sector ends
63 * Start angle - define starting ange of pie sector. Angle is based on zero angle(zero angle has a line, which is horizontal and starts in the center point) (influence only if shape is pieWithoutCenter).
68 * End angle - define ending angle of pie sector (influence only if shape is pieWithoutCenter).
73 var areasDefinitions = [ {
78 $("#homeScrAppGridView").fadeIn();
85 iconPath: '../icons/Navigation_icon.png',
91 shape: 'pieWithoutCenter'
93 name: "airconditioning",
94 iconPath: '../icons/Dashboard_icon.png',
96 sc: 94, //small circle border
97 lc: 437, //large circle border
98 sa: 11, //smaller angle based on horizontal line which starts in center and continue right (right border)
99 la: 55, //larger angle (left border)
100 shape: 'pieWithoutCenter'
102 name: 'MultimediaPlayer',
103 iconPath: '../icons/Multimedia_Player_icon.png',
109 shape: 'pieWithoutCenter'
111 name: 'SmartDeviceLink',
112 iconPath: '../icons/SmartDeviceLink_icon.png',
118 shape: 'pieWithoutCenter'
121 iconPath: '../apps/Phone_icon.png',
127 shape: 'pieWithoutCenter'
130 iconPath: '../icons/AppManager_icon.png',
136 shape: 'pieWithoutCenter'
139 iconPath: '../icons/Dashboard_icon.png',
145 shape: 'pieWithoutCenter'
148 function fillAppIDs (appList)
150 for (i = 0; i < appList.length; i++)
152 var app = appList[i];
153 if (app.name.indexOf('Modello') >= 0)
157 case "ModelloNavigation":
158 areasDefinitions[1].id = app.id;
162 areasDefinitions[2].id = app.id;
165 case "ModelloMultimediaPlayer":
166 areasDefinitions[3].id = app.id;
169 case "ModelloSmartDeviceLink":
170 areasDefinitions[4].id = app.id;
174 areasDefinitions[5].id = app.id;
177 case "ModelloAppManager":
178 areasDefinitions[6].id = app.id;
181 case "ModelloDashboard":
182 areasDefinitions[7].id = app.id;
189 function setPieAppIDs ()
191 tizen.application.getAppsInfo(fillAppIDs, function(err) {
192 console.log("Modello failed to get app IDs for center icons");