diff --git a/plugin.js b/plugin.js index df26696..41186c8 100644 --- a/plugin.js +++ b/plugin.js @@ -62,8 +62,7 @@ // styles (.card / .full-start-new / .full-descr / .full-start__button). var css = '.mymovies{padding:2.2em 3.4em;overflow-y:auto;height:100%;box-sizing:border-box}' + - // Cards live inside the native Lampa.Scroll content wrapper. - '.mymovies .scroll__content{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:1.4em}' + + '.movies-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:1.4em}' + '.mymovies-detail{padding:2em 3em;box-sizing:border-box}' + '.mymovies-detail .full-start-new__img{opacity:1 !important}' + // Follow Lampa "simplified interface" (light--version): square corners like catalog cards @@ -76,23 +75,16 @@ } // ---------- Component: movie list ---------- - // Uses Lampa.Scroll (native catalog scroller) so arrow navigation + smooth - // scroll-up behave exactly like built-in Lampa catalogs. + // Native Lampa cards + native navigation (Controller/Navigator). Scrolling uses + // the standard overflow container so cards stay in view (Lampa.Scroll was dropped + // because it hijacks scrollTop and needs internal Item classes we don't replicate). function MyMovies() { var comp = this; var body; - var scroll; + var grid; this.create = function (b) { body = b; - // Native Lampa scroller (same options as category_full / items). - scroll = new Lampa.Scroll({ - mask: true, - over: true, - scroll_by_item: true, - end_ratio: 2 - }); - // Back button (Escape / remote) handled natively via keydown -> Activity.backward. comp._onKey = function (e) { if (e.key === 'Backspace' || e.key === 'Escape') { e.preventDefault(); @@ -105,15 +97,15 @@ this.destroy = function () { if (comp._onKey) document.removeEventListener('keydown', comp._onKey, true); - if (scroll && scroll.destroy) scroll.destroy(); }; this.render = function () { injectStyles(); var html = document.createElement('div'); html.className = 'mymovies'; - // Scroll provides its own body (.scroll__body / .scroll__content). - html.appendChild(scroll.render(true)); + grid = document.createElement('div'); + grid.className = 'movies-grid'; + html.appendChild(grid); if (comp.activity) comp.activity.loader(true); @@ -121,7 +113,7 @@ if (comp.activity) comp.activity.loader(false); if (err) { console.error('[mymovies] catalog error', err); - scroll.append($('