# `Issho.Place`
[🔗](https://github.com/hattoriai/issho/blob/v0.1.0/lib/issho/place.ex#L1)

Where someone is, in a component's own terms: a row and a column in a
grid, a node and an offset in a text, a point on a canvas. Never screen
pixels, because each person has their own order, filters and zoom.

A place comes from a browser and goes to everyone else in the room, so a
binding checks it (`c:validate/1`) before Issho shares it. The browser's
half of a binding turns places into rectangles on the screen.

Places nest across components: a place in a text inside a canvas node is
`%{"doc" => "board:42/n7/body", "at" => %{"node" => "t3", "offset" => 4}}`
inside the room `board:42`. Issho checks the `"doc"` belongs to the room,
and the binding of that document checks `"at"`.

# `validate`

```elixir
@callback validate(place :: term()) :: :ok | {:error, term()}
```

`:ok` for a place this binding draws, else an error.

# `check`

```elixir
@spec check(term(), String.t(), (String.t() -&gt; module() | nil)) ::
  :ok | {:error, term()}
```

Checks a place of the room: a map with the `"doc"` of the room and, in
`"at"`, the binding's own place. `validators` maps a document's id to its
place module; a document with none accepts any small JSON value.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
