Adding off canvas events for pattern library