Revize fdba469a
Přidáno uživatelem Martin Sebela před více než 3 roky(ů)
website/public/js/zcu-heatmap.js | ||
---|---|---|
193 | 193 |
const onArrowLeftRightKeysDownRegister = () => { |
194 | 194 |
$(document).keydown(function (e) { |
195 | 195 |
const { which } = e |
196 |
|
|
196 | 197 |
if (which === arrowKeyLEFT) { |
197 | 198 |
previous() |
199 |
e.preventDefault() |
|
198 | 200 |
} else if (which === arrowKeyRIGHT) { |
199 | 201 |
next() |
202 |
e.preventDefault() |
|
200 | 203 |
} |
201 |
e.preventDefault() |
|
202 | 204 |
}) |
203 | 205 |
} |
204 | 206 |
|
... | ... | |
461 | 463 |
$('#player-time > span').text(currentTime + ':00') |
462 | 464 |
$('#player-time').attr('class', 'time hour-' + currentTime) |
463 | 465 |
} |
466 |
|
|
464 | 467 |
const loadingTimeline = (isLoading) => { |
465 | 468 |
if (isLoading) { |
466 | 469 |
loadingYTimeline() |
... | ... | |
736 | 739 |
const elem = $('#player-time') |
737 | 740 |
const offset = elem.offset().left - elem.parent().offset().left |
738 | 741 |
|
739 |
elem.draggable({ containment: 'parent', axis: 'x', cursor: 'ew-resize' }) |
|
740 |
|
|
741 | 742 |
if (offset >= 0 && offset <= elem.parent().width()) { |
742 | 743 |
const hour = Math.round(offset / hourElemWidthPx) |
743 | 744 |
|
744 |
elem.attr('class', 'time hour-' + hour) |
|
745 |
$('#player-time span').html(hour + ':00') |
|
745 |
if (hour != currentTime) { |
|
746 |
elem.attr('class', 'time hour-' + hour) |
|
747 |
$('#player-time span').html(hour + ':00') |
|
746 | 748 |
|
747 |
onChangeHour(hour) |
|
749 |
onChangeHour(hour) |
|
750 |
} |
|
748 | 751 |
} |
749 | 752 |
} |
Také k dispozici: Unified diff
Re #8187 - fixed draggable bug, draggable timeline is now more smooth due optimalization, deploy new Bootstrap version due .map files