Added "Custom" preset logic with auto change. Added handling of the "onresize" event in the library.