Skip to content

molecule data

Pawel Przezwanski edited this page Jan 27, 2020 · 1 revision

Every LouvPicture is made of molecules, each of which has its own object with data that can be used by morph to calculate css:

  • position { top, left }: position absolute in px
  • size { x, y }: molecule size in px
  • fromCorner { x, y }: molecule coordinates counting from top left corner (x is a column, y is a row), in example: { x: 5, y: 2 } means that molecule is in sixth column from left and third row from top
  • fromCenter { x, y }: molecule coordinates counted from center, in example: { x: -2, y: 3 } means that molecule is in third column to the left from center column and fourth row down from center row
  • totalIn { x, y }: how many molecules are in this column (x) and how many molecules are in this row (y)

Some data may be added in the process of morph iteration

Clone this wiki locally