added cocoone to know if app is native, improvement to canvas size calculation