Mockitt

Copy and Paste Optimization

In Mockitt, the Copy and Paste functionality features flexible positioning logic to ensure operations are accurate and convenient.

Positioning Logic

  1. Paste at Relative Position: When pasting into a target Page (or Canvas), the copied element maintains its relative position from the original page. If the relative position cannot be determined, it defaults to Paste to Center.

  2. Paste to Bottom-Left: After copying, if you select an element and paste, the content will appear at the bottom-left corner of the selected element.

  3. Paste in Place: If no page or element is selected, the content defaults to Paste in Place (original coordinates).

  4. Center Paste: If the copied element was originally outside a page (Independent Element), it will be centered when pasted into a target page.

  5. Paste to the Right (Empty Space): Pastes the copied content (including Pages) to the right of the target page or element, moving into an empty area. If there is enough space between the target and the next element, it pastes there; otherwise, it moves further right to an open space.

Position Determination Rules

Content Includes Pages

  1. With Selection: When you select one or more objects to paste, the content will be pasted horizontally to the right of the selected objects.

  2. Without Selection: If no object is selected, the content will be pasted horizontally to the right of the original object's location.

Note: In this case, Independent Elements will be re-evaluated. They will be classified as Page Elements or Independent Elements based on whether they intersect with a page.

Content Does Not Include Pages

  1. Copied from the Same Page:

    • Select Page (Target): Pastes at the relative position.
    • Select Element (Target): Pastes to the bottom-left of the selected element.
    • No Selection: Pastes in place (original coordinates).
  2. Copied from a Different Page:

    • Select Page (Target): Pastes to the center of the target page.
    • Select Element (Target): Pastes to the bottom-left of the selected element.
    • No Selection: Pastes in place (original coordinates).

In the cases above, all elements will be re-evaluated for layer association based on whether they visually intersect with a page.

Naming Rules

  1. New Canvases and Pages: Sequentially named (e.g., Canvas 1, Canvas 2, Page 1, Page 2).
  2. New Elements: Sequentially named based on type (e.g., Rectangle 1, Rectangle 2).
  3. Cross-Canvas/Page Paste: When pasting across different canvases or pages, element and group names remain unchanged.
  4. Same-Canvas/Page Paste: When pasting within the same canvas or page, "copy" and a number are appended to the name (e.g., "Rectangle 1 copy 1").

Layer Order

  1. Content Without Pages: Upon pasting, elements belonging to a page are placed at the top of that page's layer list. Independent elements are placed at the very top of the entire layer stack.

  2. Content With Pages: Similar to above, page elements sit at the top of the page hierarchy, while independent elements float at the top of the overall layer structure.