thx for your input ... seems like it's working as it should now ... bit hard to do if one only works with krpano every few years ...
Solution:
Code
screentosphere(mouse.x, mouse.y, ath, atv);
txtadd(hs, 'hs_', get(hotspot.count));
addhotspot(get(hs));
jscall(calc('addHotspot("kbZ1", "' + hs + '", "' + ath + '", "' + atv + '");'));
set(hotspot[get(hs)].url, calc(viewerDom+viewerPath+'includes/krpano/1.20.9/skin/Marker.svg'));
assignstyle(hotspot[get(hs)], 'hotspot');
set(hotspot[get(hs)].onover, "set(url,calc(viewerDom+viewerPath+'includes/krpano/1.20.9/skin/Marker_hover.svg'))");
set(hotspot[get(hs)].onout, "set(url,calc(viewerDom+viewerPath+'includes/krpano/1.20.9/skin/Marker.svg'))");
set(hotspot[get(hs)].ondown, "set(dragging,true); draghotspot();");
set(hotspot[get(hs)].onup, "set(dragging,false);");
set(hotspot[get(hs)].zorder, 50);
copy(hotspot[get(hs)].children, true);
copy(hotspot[get(hs)].ath, ath);
copy(hotspot[get(hs)].atv, atv);
calc(del_layer_name,'layer_' + hotspot[get(hs)].name);
addlayer(get(del_layer_name));
assignstyle(layer[del_layer_name], 'layer');
set(layer[get(del_layer_name)].type, "image");
set(layer[get(del_layer_name)].url, "/includes/krpano/1.20.9/skin/Marker_hover_delete.svg");
set(layer[get(del_layer_name)].parent, calc("hotspot["+get(hs)+"]"));
set(layer[get(del_layer_name)].enabled, true);
set(layer[get(del_layer_name)].keep, false);
set(layer[get(del_layer_name)].zorder, 100);
set(layer[get(del_layer_name)].x, +26);
set(layer[get(del_layer_name)].y, -11);
set(layer[get(del_layer_name)].onclick, "deletehotspot();");
Display More