You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Umalo

Professional

  • "Umalo" started this thread

Posts: 1,047

Location: Osijek, Croatia, EU

  • Send private message

1

Tuesday, September 19th 2017, 9:21pm

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

Intermediate

Posts: 427

Location: Barcelona

Occupation: creating ideas & coding them

  • Send private message

2

Wednesday, September 20th 2017, 8:55am

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 :

Source code

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

Umalo

Professional

  • "Umalo" started this thread

Posts: 1,047

Location: Osijek, Croatia, EU

  • Send private message

3

Wednesday, September 20th 2017, 10:51am

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

Intermediate

Posts: 427

Location: Barcelona

Occupation: creating ideas & coding them

  • Send private message

4

Wednesday, September 20th 2017, 3:40pm

+1
everpano.com smart virtual tours

5

Saturday, September 23rd 2017, 12:01am

Hi,

Quoted

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:

Source code

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


Best regards,
Klaus

Umalo

Professional

  • "Umalo" started this thread

Posts: 1,047

Location: Osijek, Croatia, EU

  • Send private message

6

Sunday, September 24th 2017, 7:38pm

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

Similar threads