move canvas to viewer and add adaptive grid flag