See
https://jsfiddle.net/5kxvspcm/6/