
onresize event does not work properly
-
-
- Official Post
Works fine for me, do you have a non-working example?
-
Sure:
krpano - A Plague Tale Innocence 360-Stereo 2021.08.07 - 18.19.05.25
Code
Display More<hotspot name="hstextexample" textalign="center" text="IMAGE HOTSPOT" type="text" distorted="true" width="350" height="250" oversampling="2.0" mipmapping="false" ath="20" atv="0" scalemode="scale" capturewheel="true" onwheel="calc(scale,scale*(1+wheeldelta_raw/20));" onresize="onresizeelement()" /> <hotspot name="hsimgexample" url="342.jpg" distorted="true" width="350" height="250" ath="-20" atv="0" scalemode="scale" capturewheel="true" onwheel="calc(scale,scale*(1+wheeldelta_raw/20));" onresize="onresizeelement()" />
-
- Official Post
Okay, the question was about hotspots...
The scale there is a kind of special case - changing the scale of a hotspot will not change its layout, that means no recalculation, only changes the displayed/rendered size will change.
And html/css3d-rendered textfield hotspots are another special case - they are recalculating the 'layout' on scale changes because scaling just by CSS3D-transforms doesn't work well cross-browser... (when adding renderer="webgl" to the textfield, there would be also no additional onresize event on changes of the scale setting).
That means that works basically as intended... (I hope that explanation makes sense or is understandable
)
-
Thank you for explaining the mechanism. I will remember for the future how it works.
Fortunately krpano is so flexible that one functionality can be done in at least several ways
Piotr
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!