first implamentations for canvas resize