Skip to content
Bart edited this page Jun 19, 2024 · 1 revision

File: Meesterproef-SNSimulation/js/Post.js

Description

The Post class represents a social media post in the network. It extends the Node class, adding properties specific to a social media post, such as readers, image, and title.

Methods

  • constructor(id, label, x, y, data): Initializes a new instance of the Post class.
    • Parameters:
      • id (number): The unique identifier for the post.
      • label (string): The label for the node (should be "Social Media Post").
      • x (number): The x-coordinate of the post.
      • y (number): The y-coordinate of the post.
      • data (Object): An object containing the post image and title.
        • postImage (string): URL of the post image.
        • title (string): Title of the post.
    • View Code

Design rational

Clone this wiki locally