semagrams.sprites
Contains a variety of Sprites for displaying parts of a Semagram
Attributes
Members list
Type members
Classlikes
A basic sprite used for edges, which looks up the Start
and End
properties to see where to start and end, has an arrow head pointing towards
the end, and curves according to Bend
.
A basic sprite used for edges, which looks up the Start
and End
properties to see where to start and end, has an arrow head pointing towards
the end, and curves according to Bend
.
It also has an invisible "handle", which is thicker than the arrow and used for mouse events, because otherwise it would be very annoying to mouse over the arrow.
Attributes
- Companion:
- object
- Graph
- Supertypes
A Middleware that attaches click handlers to a sprite
A Sprite that is a box with ports on both sides.
A Sprite that is a box with ports on both sides.
Attributes
- `boxSprite`
the sprite to use for the box
- `inPortSprite`
the sprite to use for the left hand ports
- `inPort`
the object in the subschema to query for the list of in ports
- `outPortSprite`
the sprite to use for the right hand ports
- `outPort`
the object in the subschema to query for the list of out ports
- Companion:
- object
- Graph
- Supertypes
A sprite that wraps an HTML element for use inside the SVG.
A sprite that wraps an HTML element for use inside the SVG.
We wrap inside an invisible div that takes up the whole window, so that we can use CSS logic for the actual positioning.
Attributes
- build
Constructor for a new HtmlElement
- globalSize
A reference to the size of the overall window
- Graph
- Supertypes
Middleware that attaches mouseover and mouseout handlers that update a global hover state
Middleware that attaches mouseover and mouseout handlers that update a global hover state
Attributes
- Graph
- Supertypes
Mixins that can be used to modify Sprites, by updating the data passed in and by updating the function passed in that attaches handlers.
Mixins that can be used to modify Sprites, by updating the data passed in and by updating the function passed in that attaches handlers.
We pass a function that attaches handlers so that the underlying Sprite can decide where those handlers are attached.
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Known subtypes
A sprite used for wires. Similar to Arrow, except this one is a spline where the beginning and the end are both horizontal, and it has no arrowhead.
Attributes
- Graph
- Supertypes
- trait Enumtrait Serializabletrait Producttrait Equalstrait Propertyclass Objecttrait Matchableclass Any
A sprite for ports which shows the port as a stub of a wire.
A sprite for ports which shows the port as a stub of a wire.
Attributes
- Graph
- Supertypes
A wrapper around a Sprite that adds middleware.
A wrapper around a Sprite that adds middleware.
Attributes
- Graph
- Supertypes
Value members
Concrete methods
Like ACSetEntitySource, but then also computes the edge properties using edgeProps
An EntitySource that extracts all parts of type ob
from an ACSet and
pairs them with sprite
along with their subacset
An EntitySource that extracts all parts of type ob
from an ACSet and
pairs them with sprite
along with their subacset
Attributes
Adds hover and click handlers to a sprite
Adds hover and click handlers to a sprite
Attributes
An EntitySource that just returns a fixed list of entities.
Compute the properties (i.e. Start and End) for an edge, using the top-level
properties in acs
and the other sprites in m
.
Compute the properties (i.e. Start and End) for an edge, using the top-level
properties in acs
and the other sprites in m
.
If Start
/End
are already set, it uses those, otherwise it looks up a
point on the boundary of the sprite corresponding to the src
/tgt
of the
edge.
Need to update this to look up the sprite for just the first part of src/tgt, and then pass the rest of the path of the part into a method on that sprite.
Attributes
Find the point on the boundary in direction dir
of the sprite
corresponding to p
, by looking up the sprite/data in m
Find the point on the boundary in direction dir
of the sprite
corresponding to p
, by looking up the sprite/data in m
Attributes
Find the center of the sprite corresponding to p
, by looking up the
sprite/data in m
Find the center of the sprite corresponding to p
, by looking up the
sprite/data in m
Attributes
Similar to edgeProps. Computes the position and direction for the ends
of a wire from the ports it is connected to, using the top-level properties
in acs
and the other sprites in m
.
Similar to edgeProps. Computes the position and direction for the ends
of a wire from the ports it is connected to, using the top-level properties
in acs
and the other sprites in m
.
If src
/tgt
are present, it uses those, otherwise it looks up an explicit
Start
/End
value in acs
Takes an optional callback argument bg: => Part
to relativize the lookup
to a variable background for zooming in and out.