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.

james

Beginner

  • "james" started this thread

Posts: 22

Location: Edinburgh, UK

  • Send private message

1

Friday, October 11th 2019, 1:38pm

Dynamically setting scale to a distorted hotspot?

I am sure there must be something really stupid that I'm doing setting scale:

set (hotspot[name].scale,get(varable));
I am creating a new hotspot dynamically from a list of attributes (ath, rx etc etc).
All are implemented as expected except the scale which stubbornly fuses to change. tracing shows the variable is correct but the set doesn't action the change, If a get(scale) is performed the old value remains.
I have changed the order the atributes are actioned, switched off distortion whilse making the declarations, the position of the style and .loadstyle etc with no luck. I have also tried using width and height, and imagewidth and height, these can be set but always return the original value. Only the scale reflects the actual size on screen (which is changed progamatically, crrectly, elsewhere.
It will take some time to boil this down to a example I can post, so I wondered (before I did that) if there si something obvious why)
This works: mul(scale,1.01)

This doen't: set (hotspot[name].scale,get(varable));
I found some stuff on the forum suggesting the relationship between width, height, scale, "prop" and distortion was complicated but...
James

2

Friday, October 11th 2019, 1:51pm

this should work. (dont know if the space after set is allowed, tough)

also note :
set(hotspot[name].scale,get(varable));

is better written as
copy(hotspot[name].scale,varable);

james

Beginner

  • "james" started this thread

Posts: 22

Location: Edinburgh, UK

  • Send private message

3

Friday, October 11th 2019, 3:15pm

Thanks for the response.

The space wsa a typo. I also changed set to copy (just in case), still the same operation.
I'll start later to tear it down to something postable (currently multiple files, 1000s of lines)
Next post will be either a solution (found whilst tearing-down, or the tear-down itself...
James

james

Beginner

  • "james" started this thread

Posts: 22

Location: Edinburgh, UK

  • Send private message

4

Friday, October 11th 2019, 11:50pm

Teardown to isolate the issue revealed the problem - my bad.
For reasons too complex to explain <scale /> information is stored in a number of different static and dynamic files/locations. In one of these locations there was a scale declaration of scale.mobile and scale.nomobile, in a section all about different platforms, not explicitly about position & scaling.

Lesson learned - attention to details!
Closed!
James