fixed umlauts using iconv-lite
This commit is contained in:
@@ -70,20 +70,6 @@ export function generateMap(): string[] {
|
||||
return arrMatrix.map(element => element.join(""));
|
||||
}
|
||||
|
||||
export function generateLegend(inNode: string): I.JSCLegend {
|
||||
const seatmapXML: any = config.state.seatmapXML;
|
||||
const venueXML: I.VenueXML = config.state.inVenueXML!;
|
||||
const pricescaleArr: I.SeatmapPricescale[] = seatmapXML.seatmap[0].pricescale_config[0].pricescale;
|
||||
const venuePricescaleArr: I.Pricescale2[] = venueXML.venue[0].pricescales[0].pricescale;
|
||||
|
||||
return <I.JSCLegend>{
|
||||
node: jQuery(inNode),
|
||||
items: createLegendItems(pricescaleArr, venuePricescaleArr)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
export function setUnavailableSeats(): void {
|
||||
const seatmapXML: any = config.state.seatmapXML;
|
||||
const seatmap: any = config.state.seatmap;
|
||||
@@ -140,16 +126,6 @@ export function addSeatmap(inSelector: string, inMap: string[], inRowsNaming: st
|
||||
});
|
||||
}
|
||||
|
||||
function createLegendItems(pricescaleArr: I.SeatmapPricescale[], venuePricescaleArr: I.Pricescale2[]): string[][] {
|
||||
return pricescaleArr.map((arr, index: number) => {
|
||||
const id: string = arr.id[0];
|
||||
const seatsKey: string = String.fromCharCode(97 + index).toLocaleUpperCase();
|
||||
const desc: string | undefined = venuePricescaleArr.find(obj => obj.id[0] === id)?.desc[0];
|
||||
const description: string = `${desc} €${pricescaleArr[index].ref_price[0]}`;
|
||||
return [seatsKey, "available", description];
|
||||
});
|
||||
}
|
||||
|
||||
function enterSeatsInMatrix(inRows: I.LayoutRow2[], inArrMatrix: string[][], inPricescaleArr: I.SeatmapPricescale[], inAvailabilityArr: I.JSCAvailability): string[][] {
|
||||
const availableArr: string[] = inAvailabilityArr.available_selectable_mask[0].split(",");
|
||||
const unavailableArr: string[] = inAvailabilityArr.unavailable_unselectable_mask[0].split(",");
|
||||
|
||||
Reference in New Issue
Block a user