I have an object. imageI can do things like image.top, and it will return a value, or I can do image.myPoints[0].leftand it will return a value. I basically have this image object that stores values ββfor me. I want to be able to put multiple objects into an array imageso that I can do something like this:
$("#toPinpoint").mapImage({
useAjax: false,
pinpoints: [ { "top": 50,
"left": 280,
"width": 200,
"height": 200},
{ "top": 0,
"left": 0,
"width": 300,
"height": 74 } ]
});
I use this function to create an object, exact points are added to the object. When the mapImage function is called, this happens:
$.fn.mapImage = function(options){
var optionConfig = $.extend({}, $.fn.mapImage.defaults, options);
image=this;
this.image = this;
this.previewMode = optionConfig.previewMode;
this.pinpoints = optionConfig.pinpoints;
image.pinpoints = optionConfig.pinpoints;
image.pinpointCount = 0;
image.selected = 0;
...}
This sets the image properties, and now I want to change the properties with my application, and then SAVE these objects imageinto an array.
, , , , , , . , myArray[0].myPoints[0].left, , 30, , myPoints [0].left, 20, , , 20 30. , . !