Skip to content

Commit

Permalink
touchup: allow effect trees
Browse files Browse the repository at this point in the history
i.e. adding effect/benefit/detriments to each other in either direction.
  • Loading branch information
keyserj committed Jan 30, 2024
1 parent 527d7cd commit 48ce1eb
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/web/topic/utils/edge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,27 @@ export const relations: AddableRelation[] = exploreRelations.concat([
{ child: "criterion", name: "relatesTo", parent: "benefit", addableFrom: "neither" },
{ child: "criterion", name: "relatesTo", parent: "detriment", addableFrom: "neither" },

// effects, benefits, detriments, can each create each other (when coming up from solution)
// and be created by each other (when going up to problem)
{ child: "effect", name: "creates", parent: "effect", addableFrom: "child" },
{ child: "benefit", name: "creates", parent: "effect", addableFrom: "child" },
{ child: "detriment", name: "creates", parent: "effect", addableFrom: "child" },
{ child: "effect", name: "creates", parent: "benefit", addableFrom: "child" },
{ child: "benefit", name: "creates", parent: "benefit", addableFrom: "child" },
{ child: "detriment", name: "creates", parent: "benefit", addableFrom: "child" },
{ child: "effect", name: "creates", parent: "detriment", addableFrom: "child" },
{ child: "benefit", name: "creates", parent: "detriment", addableFrom: "child" },
{ child: "detriment", name: "creates", parent: "detriment", addableFrom: "child" },
{ child: "effect", name: "createdBy", parent: "effect", addableFrom: "parent" },
{ child: "benefit", name: "createdBy", parent: "effect", addableFrom: "parent" },
{ child: "detriment", name: "createdBy", parent: "effect", addableFrom: "parent" },
{ child: "effect", name: "createdBy", parent: "benefit", addableFrom: "parent" },
{ child: "benefit", name: "createdBy", parent: "benefit", addableFrom: "parent" },
{ child: "detriment", name: "createdBy", parent: "benefit", addableFrom: "parent" },
{ child: "effect", name: "createdBy", parent: "detriment", addableFrom: "parent" },
{ child: "benefit", name: "createdBy", parent: "detriment", addableFrom: "parent" },
{ child: "detriment", name: "createdBy", parent: "detriment", addableFrom: "parent" },

{ child: "effect", name: "embodies", parent: "criterion", addableFrom: "neither" },
{ child: "benefit", name: "embodies", parent: "criterion", addableFrom: "neither" },
{ child: "detriment", name: "relatesTo", parent: "criterion", addableFrom: "neither" },
Expand Down

0 comments on commit 48ce1eb

Please sign in to comment.