In the NHL rulebook, Rule 83.1 on “off-side” explains the situation as such: “… a player actually controlling the puck who shall cross the line ahead of the puck shall not be considered ‘off-side,’ provided he had possession and control of the puck prior to his skates crossing the blue line.”
I am, or was, since i retired for medical reasons, a referee. This rule is not standard everywhere. For years the NHL did not follow this rule. I am trying to find when it was changed. It was one of noted differences between junior hockey which has allowed this for a long time, and the NHL.
The referees made the correct call. The main point was that Virtanen had control to the point he looked up to see where the Sedins were, i gather that was the deciding point was that he didn't need to look down to pass the puck.