Skip to content

Commit 301015a

Browse files
committed
Small doc update
- Remove center_middle example because it's no longer an allowed style - Remove a few stray commented code snippets - Reference `Scenic.Primitive.Style.TextAlign` in a spot where `:text_align` is mentioned for easier discovery - Update a sample code to follow the Elixir Formatter's style
1 parent 9314020 commit 301015a

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

lib/scenic/component.ex

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,8 @@ defmodule Scenic.Component do
210210
# --------------------------------------------------------
211211
defoverridable add_to_graph: 3
212212
end
213-
214-
# quote
215213
end
216214

217-
# defmacro
218-
219215
@filter_out [
220216
:cap,
221217
:fill,
@@ -240,7 +236,6 @@ defmodule Scenic.Component do
240236
# prepare the list of opts to send to a component as it is being started up
241237
# the main task is to remove styles that have already been consumed or don't make
242238
# sense, while leaving any opts/styles that are intended for the component itself.
243-
# also, add the viewport as an option.
244239
@doc false
245240
@spec filter_opts(opts :: Keyword.t()) :: Keyword.t()
246241
def filter_opts(opts) when is_list(opts) do

lib/scenic/graph.ex

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ defmodule Scenic.Graph do
6868
that new primitives added to it are inserted into the new group instead of the
6969
root of the graph.
7070
71-
Finally, when the group is finished, a translation matrix and a `:text_align` style
72-
are added to it. These properties are _inherited_ by the primitives in the group.
71+
Finally, when the group is finished, a translation matrix and a `:text_align`
72+
style (see `Scenic.Primitive.Style.TextAlign`) are added to it. These
73+
properties are _inherited_ by the primitives in the group.
7374
7475
## Inheritance
7576

lib/scenic/primitive/style/text_align.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ defmodule Scenic.Primitive.Style.TextAlign do
1111
1212
```elixir
1313
graph
14-
|> text( "Some Text", text_align: :center_middle )
14+
|> text("Some Text", text_align: :center)
1515
```
1616
1717
### Data Format

lib/scenic/primitives.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,8 +1195,8 @@ defmodule Scenic.Primitives do
11951195
then draw it again without blur, slightly offset, you get a nice drop shadow
11961196
effect. The default is to draw with no blur.
11971197
* `:text_align` - Specify the alignment of the text you are drawing. You will
1198-
usually specify one of: `:left`, `:center`, or `:right`. You can also specify
1199-
vertical alignment. See `Scenic.Primitive.Style.TextAlign` for details.
1198+
usually specify one of: `:left`, `:center`, or `:right`. See
1199+
`Scenic.Primitive.Style.TextAlign` for details.
12001200
* `:text_height` - Specify the vertical spacing between rows of text.
12011201
12021202

0 commit comments

Comments
 (0)