Issue with ionic tabs using angular js

am using fabric js with ionic framework , with tabs and canvas in all tab view

issue if that if i reload tab with canvas that particular canvas work where as other canvas on next tab does not work i tried to call “calcOffset” on tab click .

Below is my code

jQuery( "" ).click(function() {

link of my code on codepen:

To replicate issue:
1: open

here tab 1 is active with canvas1

when u click tab 2 u can not see color in canvas2 means calcOffset not works

2: open

here tab 2 is active with canvas2