allow proper amount of rowers
This commit is contained in:
parent
67d86bb908
commit
b348a3248a
@ -52,7 +52,7 @@ function selectBoatChange() {
|
|||||||
(option: HTMLOptionElement) => option.value === value
|
(option: HTMLOptionElement) => option.value === value
|
||||||
)[0];
|
)[0];
|
||||||
|
|
||||||
const rowers = Number(originalOption.dataset.amount_seats) - 1;
|
const rowers = Number(originalOption.dataset.amount_seats);
|
||||||
const isShipmasterSteering = originalOption.dataset.default_shipmaster_only_steering;
|
const isShipmasterSteering = originalOption.dataset.default_shipmaster_only_steering;
|
||||||
|
|
||||||
setMaxAmountRowers(rowers,isShipmasterSteering);
|
setMaxAmountRowers(rowers,isShipmasterSteering);
|
||||||
@ -137,7 +137,7 @@ function initBoatActions() {
|
|||||||
Array.prototype.forEach.call(boatSelects, (select: HTMLInputElement) => {
|
Array.prototype.forEach.call(boatSelects, (select: HTMLInputElement) => {
|
||||||
select.addEventListener('click', function() {
|
select.addEventListener('click', function() {
|
||||||
if(select.dataset.seats) {
|
if(select.dataset.seats) {
|
||||||
const rowers = Number(select.dataset.seats) - 1;
|
const rowers = Number(select.dataset.seats);
|
||||||
const isShipmasterSteering = select.dataset.default_shipmaster_only_steering;
|
const isShipmasterSteering = select.dataset.default_shipmaster_only_steering;
|
||||||
|
|
||||||
setMaxAmountRowers(rowers, isShipmasterSteering);
|
setMaxAmountRowers(rowers, isShipmasterSteering);
|
||||||
|
Loading…
Reference in New Issue
Block a user