fix getCursor in canvas lib