position legend modal