VE-1477: Hide selection and context menu while Template dialog is open

Instead of subtracting surfaceOffset in both loops we could just subtract it the last loop of computeRects and re-store it.