Pergunta

I am using imagemapster to add some effects to an image map, it would be really awesome if I could cancel the hover effect for areas that are selected, is that possible?

edit: I am referring to http://www.outsharked.com/imagemapster/

Foi útil?

Solução

Okay, so I finally managed to obtain the effect I was talking about.

First I used this in the main .mapster() options:

    onMouseover: function(data) {
        if ( data['selected'] !== true ) {
            $('#bgartisti').mapster('highlight', data['key']);              
        }
    },

And this didn't work, because if you set highlight : false it disables them completely, as opposed to isSelectable ( like in the comment I added to the question ). So I commented the hover completely to manage it manually. I did that by commenting the statement at line 2725 in jquery.imagemapster.js

Outras dicas

For selected area

    onMouseover: function (e) {
        if (!e.selected) {
            $(this).mapster('deselect');
        }
    }

For all areas

     onMouseover: function (e) {
        if (!e.selected) {
            $("#imageID").mapster('deselect');
        }
     }

This may solve your problem.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top