Add drag event on Hotspot with javascript not using plugin

  • function addHotspot(krpano) {
    var mouse_at_h = '13.2154';
    var mouse_at_v = '12.6504';

    var str = '';
    str += 'addhotspot(' + spotname + ');';
    str +=
    'set(hotspot[' +
    spotname +
    '].url,http://45.79.111.106:3100/public/markers/venue2.png);';
    str += 'set(hotspot[' + spotname + '].ath,' + mouse_at_h + ');';
    str += 'set(hotspot[' + spotname + '].atv,' + mouse_at_v + ');';
    str += 'set(hotspot[' + spotname + '].scale,0.7);';
    str += 'set(hotspot[' + spotname + '].zoom,false);';
    str += 'set(hotspot[' + spotname + '].dragging,true);';
    str += 'set(hotspot[' + spotname + '].enabled,true);';
    str += 'set(hotspot[' + spotname + '].visible,true);';
    str += 'set(hotspot[' + spotname + '].renderer,css3d);';
    str += 'set(hotspot[' + spotname + '].ondown , ' + moveHotspot(krpano) + ');';
    krpano.call(str);
    }


    function moveHotspot(krpano) {

    }


    As above what should i add in moveHotspot function in order to able the drag the hotspot ?

  • Hi,

    here a full Javascript example:

    Best regards,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!