mateuszmarkowski / jQuery-Seat-Charts

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

Seat Naming Issue #54

Closed MostafaAttia closed 7 years ago

MostafaAttia commented 7 years ago

I have seats named as characters from A to Z, But also have some seats which are named like: AA, AB, AC and so on.

When I name a seat in two characters like AA or AB, The layout for these seats is broken and an empty seat (with no label or id) is shown after each seat, like shown in this screenshot !

I tried to change the name to A_A or _A_A but it didn't work.

Any idea where is the problem ?

mateuszmarkowski commented 7 years ago

It's most likely a CSS issue but I'm not able to replicate it. The demo layout doesn't break even if I replace labels with much longer ones: image

Labels are truncated but this is expected as there isn't enough room for them.

What was the browser/version?

MostafaAttia commented 7 years ago

@mateuszmarkowski I think the problem isn't a CSS issue, the problem is with generating the seats with more than one character, for example:

`seats: { a: { price : 99.99, classes : 'front-seat' }, b: { price : 50.99, classes : 'b-seat' }, c: { price : 40.99, classes : 'c-seat' }, . . . z: { price : 30.99, classes : 'z-seat' },

                   ab: {      // here is the problem
            price   : 20.99,
            classes : 'ab-seat' 
        },

    }`
mateuszmarkowski commented 7 years ago

Right, now I see. Seat identifier (AKA character) can only be a single character. If you need a longer name, you can include it in your custom data hash, i.e.:

a: {
    price: 20.50,
    class: 'ab-seat',
    name: 'AB'
}
ArkadySladkoff commented 6 years ago

so we have only 26 rows for seats?

mateuszmarkowski commented 6 years ago

Only if you want to use a different character for each row. Generally characters are intended for seat classes so 26 should be enough in most cases.