Working at resizing algorithm

treated in the event -> resize