Commit f6e35a7a authored by jan.koester's avatar jan.koester
Browse files

test

parent d017a1b9
Loading
Loading
Loading
Loading
+3 −3
Changes for src/webedit/slider/slider.cpp: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -373,7 +373,7 @@ extern "C" {
                wrapper.setAttribute("style", style.c_str());

                // --- Slide track ---
                std::string trackStyle = "display: flex; height: 100%; touch-action: pan-y;";
                std::string trackStyle = "display: flex; height: 100%; touch-action: pan-y; flex-wrap: nowrap; will-change: transform;";
                if (transition == "slide") {
                    trackStyle += " transition: transform 0.5s ease-in-out;";
                }
@@ -387,7 +387,7 @@ 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; overflow: hidden; -webkit-user-drag: none; touch-action: pan-y; user-select: none;";
                    std::string slideStyle = "width: 100%; flex: 0 0 100%; height: 100%; position: relative; overflow: hidden; -webkit-user-drag: none; touch-action: pan-y; user-select: none; box-sizing: border-box;";
                    if (transition == "fade") {
                        slideStyle = "position: absolute; top: 0; left: 0; width: 100%; height: 100%;"
                                     " opacity: 0; transition: opacity 0.5s ease-in-out;"
@@ -460,7 +460,7 @@ extern "C" {
                    js << "var dots=el.querySelectorAll('." << cls << "-dots button');";
                    js << "var n=slides.length,cur=0,timer=null;";
                    // Set slide widths in pixels for reliable mobile rendering
                    js << "function setSizes(){var w=el.offsetWidth;for(var j=0;j<n;j++)slides[j].style.minWidth=w+'px';}";
                    js << "function setSizes(){var w=el.offsetWidth;for(var j=0;j<n;j++){slides[j].style.width=w+'px';slides[j].style.flex='0 0 '+w+'px';}}";
                    js << "setSizes();";
                    js << "function show(i){";
                    js << "  cur=((i%n)+n)%n;";