Props

NameTypeDefault valueRequired?Description
currentPositionsArray-NoThe current positions of all members.
teamMembersArray-NoThe list of team members displayed on the mat.
widthNumber500NoThe width of the SVG mat in pixels.
heightNumber-NoThe height of the SVG mat in pixels.
dotRadiusNumber20NoThe radius of each member's dot on the mat.
snappingBooleantrueNoWhether position snapping is enabled.
transitionMsNumber1000NoThe transition duration for movements in milliseconds.
interactiveBooleantrueNoWhether the mat is interactive (allows dragging).
matTypeString"square"NoThe type/layout of the mat (e.g., 'square', 'cheer').
proposedPositionsArray-Nothe proposed positions of unpositioned members.

Data

NameTypeDefault valueDescription
selectedMemberIdStringnullThe currently selected member's ID for interaction.
snappingDistanceNumber2The distance threshold for snapping positions.
positionsArraynullThe array of member positions on the mat.

Computed

NameTypeDescription
_heightNumberThe computed height of the mat based on type and width

Events

NamePayload TypeDescription
positionChangeArrayEmitted when a member's position is changed. [selectedMemberId, xNew, yNew]

Examples

<Mat :currentPositions="positions" :teamMembers="members" @positionChange="handler" />
<Mat :currentPositions="positions" :teamMembers="members" :width="800" :height="400" :dotRadius="30" :snapping="false" :transitionMs="500" :interactive="false" matType="cheer" :proposedPositions="proposedPositions" @positionChange="handler" />