You are not logged in.

1

Friday, December 10th 2021, 10:27am

Hotspot floating issue while playing with panorama image

When i move pano image and if there are some hotspots available than the position of hotspot is changing slightly which is not happenign on your example.

There are two image I am attaching here so you can understand the problem I am having.

Hotspot Before moving pano image : https://drive.google.com/file/d/1bsUYTrI…iew?usp=sharing
Hotspot Before moving pano image : https://drive.google.com/file/d/13HN2_q6…iew?usp=sharing



You see there is a difference of position while i move panorama image so hotspot position is also changing. I don't want that to happen which in your demo is working completely fine.


P.S I am using these attributes to set hotspot.



var mouse_at_h = 13.2154;
var mouse_at_v = 12.6504;

krpano = krpano.get('global');

var hs = krpano.addhotspot('auto');
hs.url = 'http://localhost:3900/public/markers/venue2.png';
hs.ath = mouse_at_h;
hs.atv = mouse_at_v;
hs.name = makeid(5);
hs.accuracy = 1;
hs.keep = true;
hs.alpha = '1.0';
hs.scale = 1;
hs.zoom = true;
hs.rotate = 0;
hs.dragging = true; // a custom setting for enabling/disabling the dragging
hs.enabled = true;
hs.visible = true;
hs.renderer = 'css3d';
hs.html = 'hello';
console.log('hs', hs);


Can you please help me on this.
thanks

This post has been edited 1 times, last edit by "vishruttechtic" (Dec 10th 2021, 11:24am)


2

Tuesday, December 14th 2021, 8:24am

Hi Klaus any update on this cause it is urgent for me to find a solution on this. *smile*

3

Tuesday, December 14th 2021, 11:40am

Hi,

with the default settings the hotspot image is centered, so just set proper edge and x/y offsets for your hotspot image.
E.g. something like this:

Source code

1
2
3
hs.edge = "bottom";
hs.x = 0;
hs.y = -10;


Btw - this line is highly problematic:

Source code

1
hs.name = makeid(5);

The name is an internal used variable for addressing the objects and should not be manually changed:
https://krpano.com/docu/xml/#name

If you want a specific name, set it already in the addhotspot call:
https://krpano.com/docu/actions/#addhotspot

Best regards,
Klaus