Commit 16c080db authored by jan.koester's avatar jan.koester
Browse files

test

parent 71cc5a73
Loading
Loading
Loading
Loading
+3 −1
Changes for src/webedit/slider/slider.cpp: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -465,7 +465,7 @@ extern "C" {
                        js << "  for(var j=0;j<n;j++){slides[j].style.opacity=j===cur?'1':'0';}";
                    } else {
                        js << "  var track=el.querySelector('." << trackCls << "');";
                        js << "  if(track)track.style.transform='translateX(-'+(cur*100)+'%)';";
                        js << "  if(track)track.style.transform='translateX(-'+(cur*el.offsetWidth)+'px)';";
                    }
                    js << "  for(var j=0;j<dots.length;j++){";
                    js << "    dots[j].style.background=j===cur?'white':'rgba(255,255,255,0.4)';";
@@ -482,6 +482,8 @@ extern "C" {
                    if (autoplay && slideCount > 1) {
                        js << "startAuto();";
                    }
                    // Recalculate position on resize/orientation change
                    js << "window.addEventListener('resize',function(){show(cur);});";
                    // Touch/swipe support for mobile
                    js << "el.querySelectorAll('img,video,a,div,span,p,h1,h2,h3,h4,button').forEach(function(m){m.style.touchAction='pan-y';m.draggable=false;m.style.webkitUserDrag='none';m.style.userSelect='none';});";
                    js << "var tx=0,ty=0,moving=false;";