Skip to content

Commit

Permalink
correct
Browse files Browse the repository at this point in the history
  • Loading branch information
范丞德 committed Oct 19, 2024
1 parent d1f8dab commit 39a5660
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions spectromotion/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,21 @@ function selectCompVideo(methodPill, scenePill, n_views, modePill) {
}

function selectCompVideoAblation(methodPillAblation) {
select = true;
var videoSwitch = document.getElementById("compVideoSwitch");
var viewNum = document.getElementById("compVideoValue");
var video = document.getElementById("compVideo");

// Remove 'active' class from all pills
document.querySelectorAll('.method-pill').forEach(function(pill) {
pill.classList.remove("active");
});

if (activeMethodPillAblation) {
activeMethodPillAblation.classList.remove("active");
}
// Add 'active' class to the clicked pill
methodPillAblation.classList.add("active");

// Update the active pill reference
activeMethodPillAblation = methodPillAblation;
methodPillAblation.classList.add("active");
var method = methodPillAblation.getAttribute("data-value");

var video_active = document.getElementById("compVideo");
video_active.src = "videos/comparison/" + method + "_vs_ours_rgb.mp4";
video_active.load();
var method = methodPillAblation.getAttribute("data-value");
video.src = "videos/comparison/" + method + "_vs_ours_rgb.mp4";
video.load();
video.play();
}

0 comments on commit 39a5660

Please sign in to comment.