Hiyve Components - v1.0.0
    Preparing search index...
    • Load canvas from JSON data.

      Tolerates empty and partially-malformed inputs:

      • null/undefined/non-object → resolves with an empty canvas (no throw).
      • objects missing or empty → renders an empty canvas.
      • Objects with missing/invalid type are dropped up-front (salvage pass).
      • If Fabric still throws or times out on the sanitized input, a second attempt is made with an empty-objects canvas so the whiteboard at least loads (vs. hanging or erroring).

      Parameters

      • canvas: Canvas
      • json: unknown
      • OptionalonObjectLoaded: (object: WhiteboardObject) => void

      Returns Promise<LoadCanvasResult>

      A LoadCanvasResultdroppedCount > 0 signals the caller should mark the file unsaved (or trigger save) to rewrite it clean.