Hi,
I would like to browse attributes of a given hotspot to copy only a subset of them to another hotspot. Like copyattributes() but with a way to say "copy this, not that". I tried to run around the getattributes() function, but I couldn't get it work from krpano itself.
Best shot I could give was to copy paste it, but the result looks so ugly...
Code
<action name="skd_SetStyleFromConfig" type="Javascript">
<![CDATA[
var configobject = krpano.get(caller.configobjectname);
var entriesArray = Object.entries(configobject);
entriesArray.forEach(([key, value]) => {
if ((typeof value !== 'function') && (typeof value !== 'object') && (key.charAt(0) !== '_') ) {
console.log(`${key} ${value}`);
<!-- get/set in progress -->
}
});
]]>
</action>
Alles anzeigen
I'm sure I got the wrong way... I'm new to using js/krpano together, it's tough to get into it when one is not a js expert.
Thanks
Florian