Sie sind nicht angemeldet.

1

Samstag, 17. Februar 2018, 21:59

how to put a border to a hotspot image

Hello I would like to add a border to a hotspot image.
How to do ? (krpano-1.19-pr13)

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<action name="add_hotspot_image">
  set(hs_name, 'img_2');
  addhotspot(get(hs_name));
  copy(hs, hotspot[get(hs_name)]);
  set(hs.style, '' );
  hs.loadstyle('flyoutimage');
  set(hs.visible, true);
  set(hs.ath, 60);
  set(hs.atv, 54);
  set(hs.oy, 0);
  set(hs.rx, -22.5);
  set(hs.ry, -26.25);
  set(hs.rz, -50.1);
  set(hs.scale, 0.075);
  set(hs.width, 1600 );
  set(hs.height, 1067 );
  set(hs.url, 'imgs/image.jpg');
  set(hs.onover, '' );
  set(hs.ondown, "draghotspot();" );
</action>


I added the following line and it does not work

Quellcode

1
  set(hs.border, '4 0xFFBB00 1.0');


Other solution if possible ...
How to add the following layer parent to the hotspot in <action>?

Quellcode

1
<layer name="skin_thumb_border" type="container" x="0" y="0" zorder="1000" width="1604" height="1071" visible="true" enabled="false" align="" bgborder="get:skin_settings.design_thumbborder_bgborder" bgroundedge="get:skin_settings.design_thumbborder_bgroundedge" scale="0.075" />


I am desperate
please waiting for your answer

Mael B.

Schüler

Beiträge: 102

Wohnort: France, Montpellier

  • Nachricht senden

2

Montag, 26. Februar 2018, 22:32

The following action should work:

Quellcode

1
set(layer[skin_thumb_border].parent,hotspot[get(hs_name)]);


with

Quellcode

1
<layer name="skin_thumb_border" type="container" zorder="1000" width="100%" height="100%" visible="true" enabled="false" bgborder="get:skin_settings.design_thumbborder_bgborder" bgroundedge="get:skin_settings.design_thumbborder_bgroundedge" />

3

Sonntag, 4. März 2018, 13:24

Thanks Mael B.

unfortunately
in post https://krpano.com/forum/wbb/index.php?p…&threadID=10486
Klaus said : hotspots can't have a parent.

Mael B.

Schüler

Beiträge: 102

Wohnort: France, Montpellier

  • Nachricht senden

4

Sonntag, 4. März 2018, 19:12

hotspots can't have a parent... but hotspot can be a parent of layer.

So, this does not work:

Quellcode

1
 <hotspot name="hostspot_name" parent="layer_name" />


But this can work:

Quellcode

1
 <layer name="layer_name" parent="hotspot[hostspot_name]" />