cp.model.data: Get information of object
Hi all,
how can I use cp.model.data in order to get the information of an object? This is really important for me! Let me explain my question more in detail:
With cp.model.data I get properties of the entire project, for example with cp.model.data.project_main.slides an array of all slides of the project.
Similarly, cp.model.data yields information of an object: For example, if SmartShape_1 is an object which triggers an action, I can access this action by cp.model.data.SmartShape_1.oca (and trigger the action by cp.runJavascript(cp.model.data.SmartShape_1.oca).
My question: I think in the same way it should be possible to access the remaining data of the object (I'm mainly interested in the x- and y-coordinates and in the width and height of the object). But how can I access this information exactly? For example, how can I populate a variable with the x-coordinate of the object?
If I have a look in the CPM.js, I can see the above mentioned oca as well as the coordinates (more precisely, I find the left x-coordinate, the upper y-coordinate, the right x-coordinate and the bottom y-coordinate of the object) - bold in the code below:
SmartShape_1:{type:612,from:1,to:18000,rp:0,rpa:0,mdi:'SmartShape_1c',retainState:false,immo:false,apsn:'Slide5663',JSONTT_4:[],cpa:true,oca:'cp.jumpToNextSlide();',JSONTT_5:[],ofa:'cpCmndResume = 1;',trin:0,trout:0,stl:[{stn:'Normal',stt:0,stsi:[8827]}],stis:0,bstiid:-1,sipst:0,sicbs:false,sihhs:false,sihds:false,isDD:false},SmartShape_1c:{b:[362,175,549,263],uid:8827,dn:'SmartShape_1',visible:1,effectiveVi:1,JSONEffectData:false,accstr:' ',traccstr:'',ti:-1,sc:'#0080ff',sw:0,ss:0,fa:100,bc:'#00beff',p0:[[0],[1,362,175],[2,362,263],[2,549,263],[2,549,175],[2,362,175],[4]],svg:false,vbwr:[362,175,549,263],vb:[362,175,549,263]}
So I'm quite sure it should be possible to access this information in some way. Can anybody help? Or is there any other JavaScript method to get the coordinates and populate a variable with it?
Thank you very much in advance for any help!
