hotspot's image and plugin JS file are loaded only after loading all pano's tiles

  • Hello. I use krpano 1.16.4
    And faced with some thing that I suppose strange.
    I load pano with "loadpano" action. XML file that is loaded contains <hotspot url="%BASEDIR%/hotspotpic.png"> tag.
    And base XML file contains <plugin alturl="%BASEDIR%/plugin.js"> tag.
    But hotspot is rendered only after all pano's tiles are loaded. And so browser sends request for hotspotpic.png in the last turn. Same with plugin.js. And if one has slow internet connection hotspot and plugin appear after amount of time that pano's tiles loading takes (it's too long).
    Why is it so? How to make png and plugin.js files load first before pano's tiles?

  • Hi.

    I did some tests and learnt that DIV element that corresponds to hotspot exists in the very begining. But its style attribute has value

    Quote

    display: none; position: absolute; z-index: 2001; overflow: visible; cursor: pointer; pointer-events: auto; opacity: 1; -webkit-transform-origin: 0px 0px;

    And it is rendered only in the very end of pano's tiles loading. Style attribute becomes

    Quote

    position: absolute; z-index: 2001; overflow: visible; cursor: pointer; pointer-events: auto; opacity: 1; -webkit-transform-origin: 0px 0px; background-image: url(http://krpano/xmls/hs_arrow_sequence.png); width: 84px; height: 150px; background-size: 168px 150px; -webkit-transform: translate3d(683px, 157.5px, 0px) perspective(272.79800197676917px) rotateZ(0deg) translateZ(272.79800197676917px) rotateX(0deg) rotateY(-134deg) rotateY(134deg) rotateX(1.574deg) scale3d(1, 1, 1) translateZ(-250px) rotate(0deg) translate(0px, 0px) rotateY(0deg) rotateX(60deg) rotateZ(7deg) scale(0.17857142857142858, 0.25) translate(-42px, -150px); background-position: 0px 0px;

    This makes browser to send request for hotspot pic after request for tiles.

    How can I instruct krpano engine to render hotspots earlier?

  • Hi,

    that's not correct - krpano is first internally loading the image to get it's size and then after the loading it is setting the css to display it.

    The loading order might depend on the order of the loading request and the number of the files that the browser can simultaneously download...

    You can try using the preload=true setting or try using multires and the 1.17 version - there the number of file downloads at the same time is controlled and limited.

    Best regards,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!