Hello, I'm new one here and I wonder is there exists some way to make calculation percentage minus pixels like there is in css3 calc(100% - 50px) ?
How to set width like percentage minus pixels?
-
-
Hello,
I think it depends on what's that 100% applied to.
If it's the screen size, you could use the variables stagewidth and stageheight to get them in pixels.
If it's a layer or hotspot size, you could use the function registercontentsize
I hope you find this useful.
Cheers,
Parallax
-
Hi,
just use negative values for width and height, what will be the same size as '100% - pixelsize'.
See here:
https://krpano.com/docu/xml/#layer.widthBest regards,
Klaus -
-
-
Wow, impressive. In that case size is responsive which is perfect with no need for additional onresize handling. Very good tip. Thanks Klaus.
That mean if layer is no child of another layer area size will be taken in consideration, right? What is this is child of another layer and size need to be 33px bigger then size of parent? What would be syntax in that case?
<layer ... width="+50">
Isn't that same as <layer ... width="50">
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!