Book a Demo

Author Topic: React on size changes of diagramObjects  (Read 4187 times)

stao

  • EA User
  • **
  • Posts: 137
  • Karma: +0/-0
    • View Profile
React on size changes of diagramObjects
« on: April 08, 2012, 04:55:43 am »
Hi @ all
i need this functionality.
any ideas how to achieve this?

PS.

I have some stereotyped elements with custom shapescripts and want to prevent the elements shape to be smaller than the text the element contains (e.g. name of the element)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: React on size changes of diagramObjects
« Reply #1 on: April 09, 2012, 04:10:12 pm »
Quote
Hi @ all
i need this functionality.
any ideas how to achieve this?

PS.

I have some stereotyped elements with custom shapescripts and want to prevent the elements shape to be smaller than the text the element contains (e.g. name of the element)
Everybody wants this functionality.,  EA repors the last known size on the the disk - it doesn't even report the current size on the diagram...

EXTREMELY unsatisfactory and just plain WRONG...

Good Luck...  Figuring how big to make diagram objects and then getting EA to actually draw them the right size is EXTERMELY problematic.

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: React on size changes of diagramObjects
« Reply #2 on: April 09, 2012, 11:47:51 pm »
There's a OnContext... method telling element changes. The shape script now can invoke add-in scripts. Maybe both together can do what you want. However, at least it will be difficult. If not impossible.

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: React on size changes of diagramObjects
« Reply #3 on: April 10, 2012, 09:53:08 am »
Quote
There's a OnContext... method telling element changes. The shape script now can invoke add-in scripts. Maybe both together can do what you want. However, at least it will be difficult. If not impossible.

q.
Yes, but as far as EA is concerned, the element has NOT changed...  (In the use case where you open a diagram and the contnets of an shape have changed since the last time it was saved)  

There's the rub - EA lives in its own little world.

Paolo
« Last Edit: April 10, 2012, 09:54:01 am by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: React on size changes of diagramObjects
« Reply #4 on: April 10, 2012, 06:39:20 pm »
EA is unique in its whole, not only in its interface.

q.