Loading src/webedit/slider/slider.cpp +5 −3 Changes for src/webedit/slider/slider.cpp: 5 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -356,7 +356,7 @@ extern "C" { } // --- Slider container styles --- std::string style = "position: relative; overflow: hidden;"; std::string style = "position: relative; overflow: hidden; touch-action: pan-y pinch-zoom;"; if (!width.empty()) style += " width: " + width + ";"; if (!height.empty()) style += " height: " + height + ";"; if (!backgroundColor.empty() && backgroundColor != "none") { Loading Loading @@ -387,10 +387,11 @@ extern "C" { const EditPlugin *cur = child; while (cur) { libhtmlpp::HtmlElement slide("div"); std::string slideStyle = "min-width: 100%; height: 100%; flex-shrink: 0; position: relative;"; std::string slideStyle = "min-width: 100%; height: 100%; flex-shrink: 0; position: relative; overflow: hidden; -webkit-user-drag: none;"; if (transition == "fade") { slideStyle = "position: absolute; top: 0; left: 0; width: 100%; height: 100%;" " opacity: 0; transition: opacity 0.5s ease-in-out;"; " opacity: 0; transition: opacity 0.5s ease-in-out;" " overflow: hidden; -webkit-user-drag: none;"; } slide.setAttribute("style", slideStyle.c_str()); slide.setAttribute("class", (cls + "-slide").c_str()); Loading Loading @@ -482,6 +483,7 @@ extern "C" { js << "startAuto();"; } // Touch/swipe support for mobile js << "el.querySelectorAll('img,video').forEach(function(m){m.draggable=false;m.style.webkitUserDrag='none';m.style.userSelect='none';});"; js << "var tx=0,ty=0,moving=false;"; js << "el.addEventListener('touchstart',function(e){"; js << " tx=e.touches[0].clientX;ty=e.touches[0].clientY;moving=true;"; Loading Loading
src/webedit/slider/slider.cpp +5 −3 Changes for src/webedit/slider/slider.cpp: 5 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -356,7 +356,7 @@ extern "C" { } // --- Slider container styles --- std::string style = "position: relative; overflow: hidden;"; std::string style = "position: relative; overflow: hidden; touch-action: pan-y pinch-zoom;"; if (!width.empty()) style += " width: " + width + ";"; if (!height.empty()) style += " height: " + height + ";"; if (!backgroundColor.empty() && backgroundColor != "none") { Loading Loading @@ -387,10 +387,11 @@ extern "C" { const EditPlugin *cur = child; while (cur) { libhtmlpp::HtmlElement slide("div"); std::string slideStyle = "min-width: 100%; height: 100%; flex-shrink: 0; position: relative;"; std::string slideStyle = "min-width: 100%; height: 100%; flex-shrink: 0; position: relative; overflow: hidden; -webkit-user-drag: none;"; if (transition == "fade") { slideStyle = "position: absolute; top: 0; left: 0; width: 100%; height: 100%;" " opacity: 0; transition: opacity 0.5s ease-in-out;"; " opacity: 0; transition: opacity 0.5s ease-in-out;" " overflow: hidden; -webkit-user-drag: none;"; } slide.setAttribute("style", slideStyle.c_str()); slide.setAttribute("class", (cls + "-slide").c_str()); Loading Loading @@ -482,6 +483,7 @@ extern "C" { js << "startAuto();"; } // Touch/swipe support for mobile js << "el.querySelectorAll('img,video').forEach(function(m){m.draggable=false;m.style.webkitUserDrag='none';m.style.userSelect='none';});"; js << "var tx=0,ty=0,moving=false;"; js << "el.addEventListener('touchstart',function(e){"; js << " tx=e.touches[0].clientX;ty=e.touches[0].clientY;moving=true;"; Loading