freegroup / draw2d

Create Visio like drawings, diagrams or workflows with JavaScript and HTML5
https://freegroup.github.io/draw2d/#/examples
MIT License
738 stars 227 forks source link

Can't get old Height and Width of figure on resizing figure. #192

Closed ubaidurrehman87 closed 1 year ago

ubaidurrehman87 commented 2 years ago

Is it possible to get old width or height on run time when resizing any figure? I am able to get old width & height when resize event ends.

this.app.view.getCommandStack().addEventListener((e) => {
      if (e.isPostChangeEvent()) {
          let oldWidth = e.command.oldWidth;
          let oldHeigh =  e.command.oldHeigh;
      }
  });

I need to get the same properties while resizing (runtime).

freegroup commented 1 year ago

These kinds of events are more the status of the document. Just to indicate if the document is dirty. Use the event handler canvas.on("...",...) and figure.on("...", ) if you need a more explicit information