diff --git a/src/components/grapher/Dot.vue b/src/components/grapher/Dot.vue
index 83d0a67..9688162 100644
--- a/src/components/grapher/Dot.vue
+++ b/src/components/grapher/Dot.vue
@@ -48,22 +48,41 @@ import Vue from "vue";
import StuntSheet from "@/models/StuntSheet";
import DotAppearance from "@/models/DotAppearance";
+const nextSSDotAppearance = new DotAppearance({
+ filled: true,
+ fill: "purple",
+ color: "purple",
+});
+
+const nextSSUnconnectedDotAppearance = new DotAppearance({
+ ...nextSSDotAppearance,
+ fill: "deeppink",
+ color: "deeppink",
+});
+
/**
* Renders a single dot
*/
export default Vue.extend({
name: "Dot",
props: {
+ isNextSS: Boolean,
dotTypeIndex: Number,
label: String,
labeled: Boolean,
selected: Boolean,
+ isConnected: Boolean,
},
computed: {
radius(): number {
- return 0.7;
+ return this.$props.isNextSS ? 0.5 : 0.7;
},
dotAppearance(): DotAppearance {
+ if (this.$props.isNextSS) {
+ return this.$props.isConnected
+ ? nextSSDotAppearance
+ : nextSSUnconnectedDotAppearance;
+ }
const currentSS: StuntSheet = this.$store.getters.getSelectedStuntSheet;
return currentSS.dotAppearances[this.dotTypeIndex];
},
diff --git a/src/components/grapher/Grapher.vue b/src/components/grapher/Grapher.vue
index a12ba81..66b9ac4 100644
--- a/src/components/grapher/Grapher.vue
+++ b/src/components/grapher/Grapher.vue
@@ -10,6 +10,7 @@
+
@@ -20,6 +21,7 @@
diff --git a/src/components/grapher/GrapherFlow.vue b/src/components/grapher/GrapherFlow.vue
new file mode 100644
index 0000000..45a831b
--- /dev/null
+++ b/src/components/grapher/GrapherFlow.vue
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/menu-bottom/MenuBottom.vue b/src/components/menu-bottom/MenuBottom.vue
index 84c874a..d2abe89 100644
--- a/src/components/menu-bottom/MenuBottom.vue
+++ b/src/components/menu-bottom/MenuBottom.vue
@@ -27,12 +27,15 @@ import BaseTool, { ToolConstructor } from "@/tools/BaseTool";
import ToolBoxSelect from "@/tools/ToolBoxSelect";
import ToolLassoSelect from "@/tools/ToolLassoSelect";
import ToolSingleDot from "@/tools/ToolSingleDot";
+import ToolConnectDots from "@/tools/ToolConnectDots";
import { Mutations } from "@/store/mutations";
+import { VIEW_MODES } from "@/store/constants";
interface ToolData {
label: string;
- icon: string;
+ icon: string; // See https://materialdesignicons.com/
tool: ToolConstructor;
+ forceViewMode?: VIEW_MODES;
"data-test": string;
}
@@ -59,8 +62,16 @@ export default Vue.extend({
label: "Add and Remove Single Dot",
icon: "plus-minus",
tool: ToolSingleDot,
+ forceViewMode: VIEW_MODES.STUNTSHEET,
"data-test": "add-rm",
},
+ {
+ label: "Connect Dots between Stuntsheets",
+ icon: "transit-connection-horizontal",
+ tool: ToolConnectDots,
+ forceViewMode: VIEW_MODES.FLOW,
+ "data-test": "connect-dots",
+ },
],
toolSelectedIndex: 0, // Assume that 0 is the pan/zoom tool
}),
@@ -70,14 +81,16 @@ export default Vue.extend({
methods: {
setTool(toolIndex: number): void {
this.$data.toolSelectedIndex = toolIndex;
- const ToolConstructor: ToolConstructor = this.$data.toolDataList[
- toolIndex
- ].tool;
+ const toolItem = this.$data.toolDataList[toolIndex];
+ const ToolConstructor: ToolConstructor = toolItem.tool;
const tool: BaseTool = new ToolConstructor();
this.$store.commit(Mutations.SET_TOOL_SELECTED, tool);
if (!tool.supportsSelection) {
this.$store.commit(Mutations.CLEAR_SELECTED_DOTS);
}
+ if (toolItem.forceViewMode) {
+ this.$store.commit(Mutations.SET_VIEW_MODE, toolItem.forceViewMode);
+ }
},
},
});
diff --git a/src/components/menu-right/MenuRight.vue b/src/components/menu-right/MenuRight.vue
index 3c7822b..d84c202 100644
--- a/src/components/menu-right/MenuRight.vue
+++ b/src/components/menu-right/MenuRight.vue
@@ -1,5 +1,7 @@