Sie sind nicht angemeldet.


Freitag, 5. Oktober 2018, 00:42

how can I put a button inside the html to close html div?


see the 'Here a link for testing the krpano JS API' part in the example.
It shows how to call any krpano code and that can be also used to remove or hide the layer (e.g. call removelayer or set visible to false).

Best regards,

Hi Klaus

"Here a link"
I don´t see it

»tmhok« hat folgendes Bild angehängt:
  • QQ图片20181005064050.png



Beiträge: 196

Wohnort: Habana, Cuba

Beruf: Architect, Photographer, Programmer.

  • Nachricht senden


Dienstag, 6. November 2018, 06:07

solved: modify style for handheld device

Hi, this is about the klaus example "div inside krpano" and the user indexofrefraction code in order to modify the text of div section for handheld device:

I modified the project for working with styles in HTML file instead multiple styles lines in .xml, example:

old xml (witout use class) :

<data name="info"><![CDATA[
<span style="text-decoration:none;cursor:pointer;font-size:16px;" >
Solution by indexofrefraction user, for change text size if handheld device:
var ishandheld = document.getElementById('krpanoSWFObject').get('device.handheld');
var fs = (ishandheld == true || ishandheld == 'true') ? 20 : 16;
div.innerHTML = args[1].replace(/font-sizeW:Wd+px/g, 'font-size:'+fs+'px');

current xml:

<data name="info"><![CDATA[
<span class="panos">

In current html add style definition:
.panos { color:#B6D1F0;text-decoration:none;cursor:pointer;font-size:1rem }
.panos_handheld { color:#B6D1F0;text-decoration:none;cursor:pointer;font-size:1.5rem }

For change the chain class="panos", with class="panos_handheld" if the device is handheld, my solution is:

var ishandheld = document.getElementById('krpanoSWFObject').get('device.handheld');
var fs = (ishandheld == true || ishandheld == 'true') ? 'panos_handheld' : 'panos';
div.innerHTML = args[1].replace(/class="panos"/g, 'class='+fs);

(100% inspired (almost copied) in solution of indexofrefraction user *thumbsup* ) Thanks!

Best regards,


Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Fernando« (7. November 2018, 01:16)