Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
abb28e0
Successful render
tcardlab Nov 6, 2019
0723aae
turn and unix are now 1 to 1
tcardlab Nov 6, 2019
a2a9057
successful render
tcardlab Nov 6, 2019
2abe4de
rudimentary timeline
tcardlab Nov 6, 2019
6fbf352
Replace duplicate Move-To
tcardlab Nov 6, 2019
a81c6f3
Replace repeat else Extend method
tcardlab Nov 6, 2019
4b53cb9
cleaned
tcardlab Nov 6, 2019
57f826b
Update PathsMixin.js
tcardlab Nov 6, 2019
c2f8fb6
dropdown search bar
tcardlab Nov 7, 2019
ccf293c
elastic search component
tcardlab Nov 7, 2019
f5dfacf
proof of concept overwriting show
tcardlab Nov 7, 2019
15a3634
filtered but x not calculated
tcardlab Nov 7, 2019
a3dd7b4
Successful render
tcardlab Nov 7, 2019
3fe53bb
prevent overlap on zero
tcardlab Nov 12, 2019
9f23074
cleaned
tcardlab Nov 12, 2019
d100606
Merge pull request #28 from tcardlab/disable-transition-on-scaling
tcardlab Dec 24, 2019
1f76414
Merge branch 'develop' into Plot-by-date
tcardlab Dec 24, 2019
01c7bd8
Merge pull request #29 from tcardlab/Plot-by-date
tcardlab Dec 24, 2019
6900219
Merge pull request #30 from tcardlab/Extend-or-Replace-prior-dString-…
tcardlab Dec 24, 2019
32a9840
Merge branch 'develop' into Search-Branches
tcardlab Dec 24, 2019
4b7d97d
Merge pull request #32 from tcardlab/Search-Branches
tcardlab Dec 24, 2019
2fe6132
Sinlge click to toggle
tcardlab Dec 24, 2019
142ef45
successful reactivity
tcardlab Dec 25, 2019
c5a12d1
Junction Point
tcardlab Dec 25, 2019
8b28e5c
something about this method is very wrong
tcardlab Dec 26, 2019
9c48375
Update DisplayMixin.js
tcardlab Dec 26, 2019
542d0bd
Merge branch 'Vuex-Display-Module' into Move-All-DisplayMixin-to-Vuex
tcardlab Dec 26, 2019
5697a73
Successful Render!
tcardlab Dec 26, 2019
c8acab2
Continue toward Full Vuex
tcardlab Dec 26, 2019
7163b15
Still can't get it to work
tcardlab Dec 27, 2019
16a2f9c
Successful Render!
tcardlab Dec 27, 2019
baff90b
Scaling differentiates click vs drag
tcardlab Dec 27, 2019
d2088cc
added linking to vuex
tcardlab Dec 27, 2019
de77a5c
removed all methods from DisplayMixin
tcardlab Dec 27, 2019
8204bc2
seperated state from store index file
tcardlab Dec 27, 2019
28f4c20
some cleanup
tcardlab Dec 27, 2019
9896b71
Basic UI setup and reorganization
tcardlab Dec 28, 2019
6b7d449
Vuex Strict
tcardlab Dec 28, 2019
f9979b8
Succesful Render!
tcardlab Dec 28, 2019
482f994
Vuex Strict
tcardlab Dec 28, 2019
442dbcf
Update coordinates.js
tcardlab Dec 28, 2019
bd4427d
Revert "Still can't get it to work"
tcardlab Dec 28, 2019
8b9a539
Merge branch 'Vuex-Coordinates-Module' into Cache-Display-Coordinates
tcardlab Dec 28, 2019
4f72d3b
Update VGitGraph.vue
tcardlab Dec 28, 2019
db848ef
Path continuity vals calculated once.
tcardlab Dec 30, 2019
154d94f
Will only update when new item is added or action in path changed
tcardlab Dec 30, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .nuxt/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,21 @@ void (function updateModules() {
// Enforce store modules
store.modules = store.modules || {}

resolveStoreModules(require('../store/state.js'), 'state.js')
resolveStoreModules(require('../store/storeRoute.js'), 'storeRoute.js')
resolveStoreModules(require('../store/modules/coordinates.js'), 'modules/coordinates.js')
resolveStoreModules(require('../store/modules/display.js'), 'modules/display.js')

// If the environment supports hot reloading...

if (process.client && module.hot) {
// Whenever any Vuex module is updated...
module.hot.accept([
'../store/index.js',
'../store/state.js',
'../store/storeRoute.js',
'../store/modules/coordinates.js',
'../store/modules/display.js',
], () => {
// Update `root.modules` with the latest definitions.
updateModules()
Expand Down
86 changes: 0 additions & 86 deletions components/DisplayMixin.js

This file was deleted.

8 changes: 3 additions & 5 deletions components/Glyphs.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<component
:is="i.glyph? i.glyph: 'Dot'"
:x="getXDisp(items.x, i, $store.getters.solveXDisp(items.x))"
:y="getYDisp(turn, i)"
:x="coords[0]"
:y="coords[1]"
:color="items.color"
/>
</template>
Expand All @@ -11,11 +11,9 @@
import _ from "lodash";
import Dot from "./Glyphs/Dot.vue";
import Book from "./Glyphs/Book.vue";
import { DisplayMixin } from "~/components/DisplayMixin.js";

export default {
props:['items', 'i', 'turn'],
mixins: [DisplayMixin],
props:['items', 'i', 'coords'],
components: {
Dot: Dot,
Book: Book
Expand Down
10 changes: 4 additions & 6 deletions components/Links.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,18 @@
<component
:is="i.link.type"
v-if="Object.keys($options.components).includes(i.link.type)"
:x="getXDisp(items.x, i, $store.getters.solveXDisp(items.x))"
:y="getYDisp(turn, i)"
:XYLink="getLink(i.link)"
:x="coords[0]"
:y="coords[1]"
:XYLink="$store.getters.getLink(i.link)"
:color="items.color"
/>
</template>

<script>
import Dotted from "./Links/Dotted.vue";
import { DisplayMixin } from "~/components/DisplayMixin.js";

export default {
props:['items', 'i', 'turn'],
mixins: [DisplayMixin],
props:['items', 'i', 'coords'],
components: {
Dotted: Dotted,
},
Expand Down
51 changes: 26 additions & 25 deletions components/Paths.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<template>
<path
:class="{active: isActive}"
v-on:dblclick="toggleChildren(items.children)"
v-on:click="toggleChildren(items.children)"

:id="branchName"
:d="dString(items)"
:d="dString()"
fill="none"
:stroke="items.color"
stroke-width="7"
Expand All @@ -14,27 +14,36 @@
<script>
import _ from "lodash";
import { PathsMixin } from "./Paths/PathsMixin.js";
import { DisplayMixin } from "~/components/DisplayMixin.js";

export default {
props: ['items', 'branchName'],
mixins: [PathsMixin, DisplayMixin],
props: ['items', 'branchName', 'coords'],
mixins: [PathsMixin],
computed: {
isActive() {
var display = this.$store.state.show
return !this.items.children.every((val) => val in display)
}
if (_.isEmpty(this._Display.filtered)){
var display = this._Display.show
return !this.items.children.every((val) => val in display)
} else {return false}
},
getPath() { // –> [[x, y], ...]
// continuity data is held in 'y' of path items
// it is used in dString logic.
const xConst = this.items.x.reduce((a, b) => a + b, 0)
const yArr = _.map(this.items.path, 'y')
const coords = yArr.map(i => Array.isArray(i) ? [xConst+i[0], i[1]] : [xConst, i])
return coords
},
},
methods: {
toggleChildren(children) {
if (children.length) {
if (this.isActive === true) {
//var payload = {branches:children, parent:this.branchName}
this.$store.commit('addVisible', children) // payload
this.$store.dispatch('addVisible', children) // payload
} else {
for (var key of children){
var subChild = this._$[key].children
var show = this.$store.state.show
var subChild = this._Branches[key].children
var show = this._Display.show
var activeChildren = subChild.filter(branch => branch in show)
// Recusrion for children with descendants
if (activeChildren.length>0){
Expand All @@ -44,23 +53,15 @@ export default {
this.$store.commit('removeVisible', key)
}
}
console.log("state.show: ", this.$store.state.show)
//console.log("_Display.show: ", this._Display.show)
this.$store.dispatch('updateCache') // cant update 1 branch due to down stream effects.
}
},

getPath(bItems) { // –> [[x, y], ...]
// continuity data is held in 'y' of path items
// it is used in dString logic.
const xConst = bItems.x.reduce((a, b) => a + b, 0) // sum here?
const yArr = _.map(bItems.path, 'y')
const coords = yArr.map(i => Array.isArray(i) ? [xConst+i[0], i[1]] : [xConst, i])
return coords
},

dString(bItems) {
dString() {
var d = [];
var path = this.getPath(bItems)
var dispCoords = this.getDispPath(bItems)
var path = this.getPath
var dispCoords = Object.values(this.coords)

for (var i of _.range(path.length)) {
let [x, y] = path[i] // Logic variables
Expand All @@ -83,7 +84,7 @@ export default {
}

// In-path link: Prefix link dStrting at given point if type==path
var XYLink = this.inPathLink(bItems, i)
var XYLink = this.inPathLink(this.items, i)
if (XYLink !== false) {
this.moveTo(d, ...XYLink)
this.Branch(d, xDisp, yDisp, XYLink)
Expand Down
34 changes: 20 additions & 14 deletions components/Paths/PathsMixin.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,41 @@
export const PathsMixin = {
methods: {
ExtendOrReplace(d, x, y, marker, string) {
// If repeat, overwrite. Otherwise, extened dString.
let last_index = d.length-1
if (d.length>0 && d[last_index][0] === marker) {
d[last_index] = (string) // Overwrite repeat
return d
} else {
return d.push(string) // Extend dString
}
},
moveTo(d, x, y){
return d.push(`M${x} ${y}`)
},
const marker = 'M'
const string = `${marker}${x} ${y}`
return this.ExtendOrReplace(d, x, y, marker, string)
},
Branch(d, x, y, priorXYDisp, scale) {
var [xprior, yprior] = priorXYDisp;
var maxHeight = yprior + +this.$store.state.scale
var maxHeight = yprior + +this._Display.scale
var midY = (yprior + maxHeight) / 2;
d.push(`C${xprior} ${midY} ${x} ${midY} ${x} ${maxHeight}`);
if (maxHeight<y){
this.Line(d, x, y)
} else(this.Line(d, x, y))
this.Line(d, x, y)
// zero length line necessary for animation.
// Otherwise its not the same path
return d
},
Line(d, x ,y) {
let last_index = d.length-1
if (d[last_index][0] === "L") {
d[last_index] = (`L${x} ${y}`) // Extend prior line
return d
} else {
return d.push(`L${x} ${y}`) // Start new line
}
const marker = 'L'
const string = `${marker}${x} ${y}`
return this.ExtendOrReplace(d, x, y, marker, string)
},

// In-path Link
inPathLink(bItems, index){
var link = Object.values(bItems.path)[index].link
if (Object.keys(link).length > 0 && link.type==="Path"){
return this.getLink(link)
return this.$store.getters.getLink(link)
} else {
return false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ export default {
return Object.keys(this.$store.getters.rootBranches).sort()
},
all(){
return Object.keys(this._$).sort()
return Object.keys(this._Branches).sort()
},
branchState(){
var show = Object.keys(this.$store.state.show).sort()
var show = Object.keys(this._Display.show).sort()
if ( _.isEqual(show, this.roots) ){
return 0
} else if ( _.isEqual(show, this.all)) {
Expand All @@ -30,10 +30,10 @@ export default {
},
methods: {
collapse() {
this.$store.commit('setVisible', this.roots)
this.$store.dispatch('setVisible', this.roots)
},
expand() {
this.$store.commit('setVisible', this.all)
this.$store.dispatch('setVisible', this.all)
},
onChg(e) {
switch(+e.target.value) {
Expand All @@ -46,6 +46,7 @@ export default {
default:
break
}
this.$store.dispatch('updateCache')
}
}
}
Expand Down
9 changes: 9 additions & 0 deletions components/UI/DisplaySlider.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<template>

</template>

<script>
export default {

};
</script>
Loading