Execute function with arguments.
If string, then a function
in the local map or global map will be executed (local map takes
precedence). If Function, then the
function will be exectuted. If null, then nothing will happen.
Add a function to the map.
unique identifier
function to add
Function Map
In FigureOne Recorder, state is saved in stringified javascript objects. When the state includes a function (like a trigger method in an animation for example) then that function is referenced in the state object as a unique string id.
When a geometry is loaded, functions that will be captured in state objects need to be added to a function map. Both Figure and FigureElement have attached function maps as the property
fnMap. Therefore, the method is added to either the figure or element function map, with an associated unique string id, and that string id is used when the function is used. For example as defined callbacks, triggerAnimationStep and customAnimationStep callbacks, or recorder slide definitions (entryState,steadyState,leaveState,exec,execDelta).The funciton map has:
Example