Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Dienstag, 19. September 2017, 21:21

Textfield internal size

Hi Klaus
Textfield is not updating it's size when adding image of 100% width in html every time. Seams height of added image is not calculated fast enough (due to 100% width some prop value for height must be calculated and seams taking some time. Long enough not to register new texfield height increase)

Tried changing bgborder with delayedcall and it is working but not 100%. Specially when it is not visible it is not updating. So making it visible, then changing bgborder is almost ok but resizing is so obvious. And as sad before not 100% every time working.

Can we get kind of command to trigger internal textfield resize even when not visible? Or other tricks to trigger recalculation of the size?
Example:
layer[texfield_name].resize(); *rolleyes*
or
rebuild(layer[textfield_name]);

Umalo

jordi

Fortgeschrittener

Beiträge: 420

Wohnort: Barcelona

Beruf: creating ideas & coding them

  • Nachricht senden

2

Mittwoch, 20. September 2017, 08:55

I'm not sure if you mean this, but yesterday I came across a similar issue, I had an autowidth text layer, and once I resize it dynamically The text or content inside did not react, even wordwrap was set. The problem was that no real width was set to my layer. so I decide to make something which seems very obvious but it worked :

Quellcode

1
2
3
4
set(layer[myLayer].onautosized, 
   copy(myLayerWidth, layer[myLayer].width);
   copy(layer[myLayer].width, myLayerWidth);
);
everpano.com smart virtual tours

3

Mittwoch, 20. September 2017, 10:51

Exactly. Instead of tweaking textfield attributes, bgborder, height, width.... I propose Klaus make textfield internal action which we can call e.g. on resize or when html changed being sure textfield will be recalculating its size.

jordi

Fortgeschrittener

Beiträge: 420

Wohnort: Barcelona

Beruf: creating ideas & coding them

  • Nachricht senden

4

Mittwoch, 20. September 2017, 15:40

+1
everpano.com smart virtual tours

5

Samstag, 23. September 2017, 00:01

Hi,

Zitat

I propose Klaus make textfield internal action which we can call e.g. on resize or when html changed being sure textfield will be recalculating its size.
Okay, I will consider that.

In the meantime you could try this:

Quellcode

1
2
set(layer[name].forceresize, true);
layer[name].updatepos();


Best regards,
Klaus

6

Sonntag, 24. September 2017, 19:38

Working with workaround now. *thumbup* Thanks for including this to your backlog.
regards
Umalo

Ähnliche Themen