Skip to content

Commit

Permalink
fix issue on portrait mode for keymapping grid debug
Browse files Browse the repository at this point in the history
  • Loading branch information
jparez committed Aug 6, 2024
1 parent 3414645 commit 226ded4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/KeyboardMapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,7 @@ module.exports = class KeyboardMapping {
const parentSize = this.instance.videoWrapper.getBoundingClientRect();
const videoSize = this.instance.video.getBoundingClientRect();
videoSize.height = videoSize.height - this.instance.coordinateUtils.getTopBorder() * 2;
videoSize.width = videoSize.width - this.instance.coordinateUtils.getLeftBorder() * 2;

// div vertical
Array.from(Array(11).keys()).forEach((val, i) => {
Expand All @@ -747,7 +748,7 @@ module.exports = class KeyboardMapping {
const div = document.createElement('div');
div.style.position = 'absolute';
div.style.left = `${0}px`;
div.style.top = `${i * (videoSize.height * 0.1) + this.instance.coordinateUtils.getTopBorder()}px`;
div.style.top = `${i * (videoSize.height * 0.1) + (parentSize.height - videoSize.height) / 2}px`;
div.style.width = '100%';
div.style.height = '1px';
div.style.background = 'red';
Expand Down

0 comments on commit 226ded4

Please sign in to comment.