linkWithActiveObj(obj1 {Object})

linkWithActiveObj(obj1 {Object})
Takes the passed object (see format below) and either attaches it to the active object in PluginController, or if no active object is set, does nothing.

Takes:

obj {Object} a JSON-based object which has:

id: {String} unique ID for the object

type: {String} name for how the object will be stored within other objects. For example, if you had a selection object with ID ‘sel1′ and linked it to a shape ‘shp1′, ‘shp1′ would store your selections’s reference in an internal array of type, as specified by your type variable.

jsonName: {String} name for where the object is stored in the core JSON. If you use the same name as in type, it will store at the global level, along with pages. If you use TILEPAGE (current url), it will store it as a variable inside that page element

obj: {Object} Actual object to be inserted into the JSON session under the array jsonName