Merge pull request #4156 from IgorA100/patch-455917

Fix: Changed the declaration of the variable "pix" (event.js)
pull/4157/head
Isaac Connor 2024-09-28 17:50:14 -04:00 committed by GitHub
commit 819812bbeb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -204,6 +204,7 @@ function renderAlarmCues(containerEl) {
var spanTimeEnd = 0; var spanTimeEnd = 0;
var alarmed = 0; var alarmed = 0;
var alarmHtml = ''; var alarmHtml = '';
var pix = 0;
var pixSkew = 0; var pixSkew = 0;
var skip = 0; var skip = 0;
var num_cueFrames = cueFrames.length; var num_cueFrames = cueFrames.length;
@ -218,7 +219,7 @@ function renderAlarmCues(containerEl) {
if (frame.Delta == 0) continue; //If event starts with an alarm or too few for a nonespan if (frame.Delta == 0) continue; //If event starts with an alarm or too few for a nonespan
spanTimeEnd = frame.Delta * 100; spanTimeEnd = frame.Delta * 100;
spanTime = spanTimeEnd - spanTimeStart; spanTime = spanTimeEnd - spanTimeStart;
let pix = cueRatio * spanTime; pix = cueRatio * spanTime;
pixSkew += pix - Math.round(pix);//average out the rounding errors. pixSkew += pix - Math.round(pix);//average out the rounding errors.
pix = Math.round(pix); pix = Math.round(pix);
if ((pixSkew > 1 || pixSkew < -1) && pix + Math.round(pixSkew) > 0) { //add skew if it's a pixel and won't zero out span. if ((pixSkew > 1 || pixSkew < -1) && pix + Math.round(pixSkew) > 0) { //add skew if it's a pixel and won't zero out span.