Skip to content

Group

Group

It is used to render group or oval content. The specific type is as follows:

ts
type Group = {
  type: 'group';
  x: number;
  y: number;
  w: number;
  h: number;
  angle: number;
  detail: {
    children: Element;
    background: string;
    borderRadius?: string;
    borderWidth?: number;
    borderColor?: number;
  };
};

Group.detail

The basic attribute details of the element can be viewed Element's Detail # .

Group.detail Data-Type

The Data-Type of Group.detail

ts
type GroupDetail = {
  children: Array<Element>;
  background?: string;
  background?: string;
  borderWidth?: number;
  borderColor?: string;
};

Group.detail Properties

PropertyDescriptionTypeDefaultRequiredOthers
childrenChildren element listArray<Element>-trueeg. #000000
backgroundGroup background colorstring-falseeg. #000000
borderRadiusGroup radius of border cornernumber0false-
borderWidthBorder width of Groupnumber0false-
borderColorBorder color of Groupnumber0falseeg. #000000

Complete Data Example

js
const elementGroup = {
  name: 'group',
  x: 160,
  y: 120,
  w: 200,
  h: 100,
  angle: 30,
  type: 'group',
  detail: {
    children: []
  }
};

Demo Preview

More Demo >>