How to use the @swim/view.SvgView.fromTag function in @swim/view

To help you get started, we’ve selected a few @swim/view 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 swimos / transit / ui / main / TransitViewController.ts View on Github external
protected createLogo(): SvgView {
    const logo = SvgView.fromTag("svg").width(156).height(68).viewBox("0 0 156 68");
    logo.append("polygon").fill("#008ac5").points("38.262415 60.577147 45.7497674 67.9446512 41.4336392 66.3395349");
    logo.append("polygon").fill("#004868").points("30.6320304 56.7525259 35.7395349 55.9824716 41.4304178 66.3390957");
    logo.append("polygon").fill("#1db0ef").points("45.8577521 43.5549215 35.7395349 55.9813953 30.895331 54.807418");
    logo.append("polygon").fill("#008ac5").points("45.8604651 43.5549215 41.760398 48.5902277 50.5169298 42.7788873");
    logo.append("polygon").fill("#008ac5").points("26.3271825 57.4036063 35.7395349 55.9813953 19.2251161 51.7639132");
    logo.append("polygon").fill("#008ac5").points("21.8522892 56.6610604 26.3302326 57.4059108 24.8674419 60.4330233");
    logo.append("polygon").fill("#46c7ff").points("25.8602519 50.1512126 21.9749543 52.4673682 26.296682 53.5765239");
    logo.append("polygon").fill("#004868").points("8.22304588 54.4 26.3302326 57.4046512 10.7431892 45.0311035");
    logo.append("polygon").fill("#008ac5").points("13.8293387 33.5634807 4.10372093 35.5972093 8.22325581 54.4");
    logo.append("polygon").fill("#004868").points("8.22099482 54.4011969 0.0941817913 35.6005706 4.10375191 35.6005706");
    logo.append("polygon").fill("#004a6a").points("29.0049687 26.1913296 29.4164365 29.8907151 13.8293023 33.5651163 4.10372093 35.5972093");
    logo.append("polygon").fill("#46c7ff").points("29.0062121 26.1911555 4.10372093 35.5972093 18.5813833 12.4933152");
    logo.append("polygon").fill("#008ac5").points("11.2792478 19.5948645 18.5832775 12.4930233 4.10372093 35.5972093");
    logo.append("polygon").fill("#0076a9").points("0.0976972893 35.6005706 11.6715695 18.9158345 4.10403655 35.6005706");
    logo.append("polygon").fill("#46c7ff").points("24.2487055 31.1058385 29.4139535 29.8876265 26.2195349 45.5916279");
    logo.append("polygon").fill("#004868").points("34.5718675 26.2202296 36.2830885 37.7346648 31.9099624 28.1109897");

@swim/view

Unified HTML, SVG, and Canvas view hierarchy, with integrated controller architecture, animated procedural styling, and constraint-based layouts

Apache-2.0
Latest version published 3 years ago

Package Health Score

57 / 100
Full package analysis

Similar packages