try to link main panel event in custom directive