• Resolved Plamen Yanev

    (@pyanev)


    I’m using a modern widget in my pano. I have used the display title option. Can some additional js code to render a second title (custom text, logo) at the top of the scenes. Similar to the original plug-in buttons that are visualized on each scene. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Avirtum

    (@avirtum)

    Well, I can show a simple code. You should paste it inside the custom js section inside the item builder

    
    var instance = this,
    $ = jQuery;
    
    var $title = $("<div>").addClass("mytitle");
    instance.$container.append($title);
    
    instance.$container.on("ipanorama:scene-before-load", function(e, data) {
       $title.html(data.scene.cfg.userData);
    });

    It uses the custom event “ipanorama:scene-before-load”, inside the hadler we paste string data from userData field (see scene config -> the section “data”). Also you can style this custom title like below

    .mytitle {
        position:absolute;
        top:5px;
        left:5px;
        padding:10px;
        background:#000;
        color:#fff;
    }
    Thread Starter Plamen Yanev

    (@pyanev)

    Great job, thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Second title’ is closed to new replies.