Resize tool for diagram

I want to know if there is a possibility of a simple resizing of the diagram, for example, how does the textarea allow this?

Video for example -

If you want the Diagram to update the viewport while your code is resizing the HTML DIV element, be sure to call Diagram.requestUpdate. Resizing Diagrams -- Northwoods Software