GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — ZStack_PatternMaker/main.js at main · BarbWire-1/ZStack_PatternMaker Expand file tree/ Copy pathmain.jsMore file actions 45 lines (36 loc) · 1.62 KB / Copy pathmain.jsFile metadata and controls45 lines (36 loc) · 1.62 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 import { ZStackGrid, createEventHandlers } from './ZStack/index.js'; window.onload = e => { // USAGE - INIT // the HTMLelements to appent into the components slot as template string const elements = ` <div class="square one"></div> <div class="square two"></div> <div class="square three"></div> <div class="square four"></div> <div class="square five"></div> <div class="square six"></div> `; const zStackGrid = new ZStackGrid({ parentId: 'container', // required rows: 6, // optional - default 6 columns: 6, // optional - default 6 alignment: 'bottom-right', // optional - default 'default' (same as 'center') mirrorType: 'both', // optional - default 'none' content: elements, }); // -------------------------------------------------------------------------------------TESTING // Event Delegation const { onClick, onInput } = createEventHandlers(zStackGrid); const controlPanel = document.getElementById('control-panel'); controlPanel.addEventListener('click', onClick); controlPanel.addEventListener('input', onInput); controlPanel.querySelector('#numColsInput').value = zStackGrid.columns; controlPanel.querySelector('#numRowsInput').value = zStackGrid.rows; // testing to include svg // const nonRootSvg = document.querySelectorAll('svg :not(svg)'); // console.log(nonRootSvg) // zStackGrid.alignment = 'bottom-right';// ok //zStackGrid.mirrorType = 'both';// ok //zStackGrid.content = `<div class="square one"></div>`// ok //zStackGrid.addContent(`<div class="square one"></div>`);// ok } |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |