Dynamically Moving Modules

I’m trying to dynamically move the modules on the screen, but I’m don’t know where to start. I’m able to identify all the modules loaded and hide and show them, but I’m not sure how to move them. I tried updating the module.config.position and the module.data.position but it did nothing. Can anyone shed some light on this for me.