Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip Seat Numbers for each underscore character #74

Open
miljosh68 opened this issue Jun 19, 2018 · 5 comments
Open

Skip Seat Numbers for each underscore character #74

miljosh68 opened this issue Jun 19, 2018 · 5 comments

Comments

@miljosh68
Copy link

miljosh68 commented Jun 19, 2018

I am not sure if there is a setting to accomplish what I wish to do. I understand that, whenever there is a (_) underscore character, it is an empty place. I wish that the code should skip the seat number when it comes across underscore character. The problem is that it keeps numbering seats in a continuous manner.

Please refer to the below screenshot. Consider that there is a gap in the center of the hall. Let us consider row 'A'. After seat number A10, I would expect the next seat number to be 'A11' but it shows 'A14' (since the gap is 3 seats wide). Is there a way to make the code skip seat numbering for each '_' character?

image

@jctmf
Copy link

jctmf commented Jun 19, 2018

Have this problem too.

@mateuszmarkowski
Copy link
Owner

Please see a similar issue #62.

You can specify your own function generating labels which will skip empty places:
https://github.com/mateuszmarkowski/jQuery-Seat-Charts#naming

@ilrisa
Copy link

ilrisa commented Jan 30, 2019

hi, I agree with the request made by Jaycer17, can i have an example of how to set the functions GetLabel and GetId? Thank you

@spinninghamster
Copy link

I am also looking for a solution. Can't figure it out :(

@mateuszmarkowski
Copy link
Owner

The issue is that JSC doesn't analyze columns to check if they are empty and therefore it automatically assigns a subsequent number to each of the columns assuming they have at least one non empty seat.

The following jsfiddle demonstrates how to "skip" empty columns (naming.columns attribute is the key, the rest is just the demo map):
https://jsfiddle.net/50c8hf32/

naming : {
  getLabel : function (character, row, column) {
    return row+column;
  },
  rows: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I'],
  columns : ['1', '2', '', '3', '4']
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants