Commit 53792e62 authored by jan.koester's avatar jan.koester
Browse files

test

parent 0e6fe342
Loading
Loading
Loading
Loading
+5 −3
Changes for src/webedit/slider/slider.cpp: 5 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -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") {
@@ -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());
@@ -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;";