How to use the @deja-js/component/tiles.DejaTileGroup function in @deja-js/component

To help you get started, we’ve selected a few @deja-js/component examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DSI-HUG / dejajs-components / src / app / tiles / tiles-demo.ts View on Github external
const tile = new DejaTile();
                tile.percentBounds = new Rect(x2, y2, 15, 15);
                tile.color = country.color;
                tile.templateModel = country;

                x2 += 15;
                if (x2 + 15 > 100) {
                    x2 = 0;
                    y2 += 15;
                }

                return tile;
            }),
            reduce((acc: DejaTile[], cur: DejaTile) => [...acc, cur], []));

        const tileGroup = new DejaTileGroup();
        tileGroup.percentBounds = new Rect(x2, y2, 60, 30);
        tileGroup.color = '#aba280';
        tileGroup.html = `<div>Tuile <b>éditable</b> de type groupe</div><div><div><p>Utilise le composant deja-editor</p></div></div>`;

        this.tiles3$ = of([tileGroup]);
    }
github DSI-HUG / dejajs-components / src / app / tiles / tiles-demo.ts View on Github external
public addGroup(tilesComponent: DejaTilesComponent) {
        const tileGroup = new DejaTileGroup();
        tileGroup.html = 'New Group';
        tilesComponent.addTiles([tileGroup]);
    }