mateuszmarkowski / jQuery-Seat-Charts

jQuery Seat Charts Plugin
MIT License
596 stars 209 forks source link

Refresh Map #63

Open KhoaKD91 opened 7 years ago

KhoaKD91 commented 7 years ago

I using $('.seatCharts-row').remove(); $('.seatCharts-legendItem').remove(); $('#seat-map,#seat-map *').unbind().removeData(); to refresh map is ok but has error: TypeError: seats[seatCharts.attr(...)] is undefined??? and then I refresh map one time datamap iss update but chart map don't change. please help me.

SubashKhatiwada commented 6 years ago

I have same problem....if you get answer then let me know on khatiwada_subash@ymail.com

nelson6e65 commented 4 years ago

No error, but still numeration label remains the old count when I recreated. :sweat:

nelson6e65 commented 4 years ago

It was my label function

        getLabel: function(character, row, column) {
          return firstSeatLabel++;
        },

Just need to reset firstSeatLabel to 1 before create the next instance.

nelson6e65 commented 4 years ago

I using $('.seatCharts-row').remove(); $('.seatCharts-legendItem').remove(); $('#seat-map,#seat-map *').unbind().removeData(); to refresh map is ok but has error: TypeError: seats[seatCharts.attr(...)] is undefined??? and then I refresh map one time datamap iss update but chart map don't change. please help me.

seatCharts.attr('aria-activedescendant') contains the ID. When you change the map, seems like this is not reset. In order to solve this, reset this attribute too:

$('.seatCharts-row').remove();
$('.seatCharts-legendItem').remove();
$('#seat-map,#seat-map *').unbind().removeData();
$('#seat-map').attr('aria-activedescendant', null); // <--- this
nelson6e65 commented 4 years ago

@KhoaKD91 @SubashKhatiwada I faced this issue too, so I solved by resetting the aria-activedescendant attribute in addition to other steps.