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.

  • "sachagriffin" started this thread

Posts: 1,852

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

1

Monday, September 10th 2012, 11:51pm

textfield documentation autoheight

Autoheight doesn't appear to do anything. I've doublechecked the installed textfield.swf plugin.
The correct attribute is autosize

Also for the new textfield, autoheight, it has a new behavior.
I was setting it to -1 , set the input, and reading out the height when it changed so that I can resize its container.
However, now it can change with a step in between, if they final height is 100, it may have gone to 16 before its finished. This prevents me from discovering when its finished and created an erratic race condition.
Usually, I read out the correct height, but it's not 100%.

Also, setting autosize true, from false causes the plugin to resize correctly, however, the height attribute is never upadated until the input changes.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

2

Wednesday, September 12th 2012, 9:30am

Hi,

the new 'autoheight' setting is internally just an new (boolean) setter/getter for the old 'autosize' setting,

the valid values for 'autosize' were (always) just 'none', 'left', 'center' or 'right' but 'left', 'center' or 'right' always had the same effect in the textfield usage case, so I thought a boolean value with just 'true' or 'false' values would be better and easier to use (btw - the 'autosize' setting is still there for backward compatibility)

Quoted

Also for the new textfield, autoheight, it has a new behavior.
I was setting it to -1 , set the input, and reading out the height when it changed so that I can resize its container.
However, now it can change with a step in between, if they final height is 100, it may have gone to 16 before its finished. This prevents me from discovering when its finished and created an erratic race condition.
Usually, I read out the correct height, but it's not 100%.
sorry, but here I really don't understand what you mean - 'setting to -1' ...

best regards,
Klaus

  • "sachagriffin" started this thread

Posts: 1,852

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

3

Wednesday, September 12th 2012, 5:09pm

Interesting.
my autosize was always true.
I see what happened.
If there was an autosize set autoheight is ignored.
I was testing using the console.
Setting to -1 was my attempt at discovering when autoheight was complete. If I noticed a change from -1, I assumed it was complete. I have a container that is +x pixels height my textfield so it was important to know when the textfield had arrived at the final height in order to make the frame. On the new textfield, it can go from -1 to 16 to its final size of 40 and if the delayedcall loop happens to catch it at 16 height the frame is off. So now, I'm just waiting more time before I start to check height, however I assume a slower cpu or a textfield filled with complicated content may still fail this threshhold.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

4

Thursday, September 13th 2012, 9:21am

Hi,
my autosize was always true.
'true' was never a documented setting for autosize, but has 'failsafe' it was handled like autosize=left in Flash (see the included textfield.as).



If there was an autosize set autoheight is ignored.
No, both setting are working, the autoheight setting is just a setter/getter for autosize setting - that means when setting the autoheight setting to true, the autosize setting will be automatically set to 'center', and when setting to false, then to 'none'.


Setting to -1 was my attempt at discovering when autoheight was complete. If I noticed a change from -1, I assumed it was complete. I have a container that is +x pixels height my textfield so it was important to know when the textfield had arrived at the final height in order to make the frame. On the new textfield, it can go from -1 to 16 to its final size of 40
okay, I will try to add an dedicated event for that case, e.g. maybe some like 'onhavesize' or just 'onresize'...

Best regards,
Klaus