Skip to main content

legend

Named exports

  • Legend: The design constructor
  • about: Metadata about the design
  • bartack: The bartack part of the design
  • buttons: The buttons part of the design
  • cutonfold: The cutonfold part of the design
  • dimension: The dimension part of the design
  • fabricLines: The fabricLines part of the design
  • grainline: The grainline part of the design
  • i18n: Internationalisation (i18n/translation) data for the design
  • lineStrokes: The lineStrokes part of the design
  • lineWidths: The lineWidths part of the design
  • logo: The logo part of the design
  • notches: The notches part of the design
  • otherLines: The otherLines part of the design
  • sa: The sa part of the design
  • saLines: The saLines part of the design
  • scalebox: The scalebox part of the design
  • snaps: The snaps part of the design
  • textSize: The textSize part of the design
  • title: The title part of the design

Constructor

To create a new legend Design, import the constructur as such:

import { Legend } from '@freesewing/legend'

Then you can instantiate it by passing a settings object:

const pattern = new Legend(settings)

Design config

You can access the design configuration without instantiating a design. It is available as the designConfig property of the design constructor:

import { Legend } from '@freesewing/legend'

// Access the design config from the constructor
const dConf = Legend.designConfig

Pattern config

You can access the pattern configuration without instantiating a design. It is available as the patternConfig property of the design constructor:

import { Legend } from '@freesewing/legend'

// Access the pattern config from the constructor
const pConf = Legend.patternConfig

Metadata

You can access the design's metadata through the about named export:

import { about } from '@freesewing/legend'

I18n

You can access the design's internationalization data through the i18n named export:

import { i18n } from '@freesewing/legend'

Parts

bartack

The part itself

You can access this part as the bartack named export:

import { bartack } from '@freesewing/legend'

buttons

The part itself

You can access this part as the buttons named export:

import { buttons } from '@freesewing/legend'

cutonfold

The part itself

You can access this part as the cutonfold named export:

import { cutonfold } from '@freesewing/legend'

dimension

The part itself

You can access this part as the dimension named export:

import { dimension } from '@freesewing/legend'

fabricLines

The part itself

You can access this part as the fabricLines named export:

import { fabricLines } from '@freesewing/legend'

grainline

The part itself

You can access this part as the grainline named export:

import { grainline } from '@freesewing/legend'

lineStrokes

The part itself

You can access this part as the lineStrokes named export:

import { lineStrokes } from '@freesewing/legend'

lineWidths

The part itself

You can access this part as the lineWidths named export:

import { lineWidths } from '@freesewing/legend'

The part itself

You can access this part as the logo named export:

import { logo } from '@freesewing/legend'

notches

The part itself

You can access this part as the notches named export:

import { notches } from '@freesewing/legend'

otherLines

The part itself

You can access this part as the otherLines named export:

import { otherLines } from '@freesewing/legend'

sa

The part itself

You can access this part as the sa named export:

import { sa } from '@freesewing/legend'

saLines

The part itself

You can access this part as the saLines named export:

import { saLines } from '@freesewing/legend'

scalebox

The part itself

You can access this part as the scalebox named export:

import { scalebox } from '@freesewing/legend'

snaps

The part itself

You can access this part as the snaps named export:

import { snaps } from '@freesewing/legend'

textSize

The part itself

You can access this part as the textSize named export:

import { textSize } from '@freesewing/legend'

title

The part itself

You can access this part as the title named export:

import { title } from '@freesewing/legend'