-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Added timeline visualisation (WIP)
This commit add lots of new dependencies and components. Other misc changes include moving some component-specific styles to their respective .vue files.
- Loading branch information
Showing
15 changed files
with
675 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<template> | ||
<div class="input-group"> | ||
<span class="input-group-addon"> | ||
<i :class="['fa', value]"></i> | ||
</span> | ||
<input class="form-control" v-el:input v-model="value"> | ||
</div> | ||
</template> | ||
|
||
<script type="text/babel"> | ||
require('dist/components/fontawesome-iconpicker/dist/js/fontawesome-iconpicker'); | ||
export default { | ||
props: { | ||
value: { | ||
twoWay: true | ||
} | ||
}, | ||
data() { | ||
return { | ||
$icon: null | ||
} | ||
}, | ||
ready() { | ||
this.$icon = $(this.$els.input).iconpicker(); | ||
// form value has changed but event may not have been triggered by the iconpicker plugin | ||
this.$icon.on('iconpickerUpdated', () => { | ||
this.value = this.$els.input.value; | ||
}); | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<template> | ||
<div class="timeline" v-el:timeline></div> | ||
</template> | ||
|
||
<script type="text/babel"> | ||
const vis = window.require('./dist/components/vis/dist/vis'); | ||
export default { | ||
props: ['items', 'groups'], | ||
data() { | ||
return { | ||
timeline: null | ||
} | ||
}, | ||
ready() { | ||
this.$watch('items', () => this.timeline.setItems(this.items)); | ||
this.$watch('groups', () => this.timeline.setGroups(this.groups)); | ||
var options = { | ||
format: { | ||
minorLabels: { | ||
millisecond:'SSS[ms]', | ||
second: 'HH:mm:ss', | ||
minute: 'HH:mm', | ||
hour: 'HH:mm', | ||
}, | ||
majorLabels: { | ||
millisecond:'HH:mm:ss', | ||
second: 'HH:mm', | ||
minute: 'HH [hours]', | ||
hour: '', | ||
weekday: '', | ||
day: '', | ||
month: '', | ||
year: '' | ||
} | ||
}, | ||
min: 0, // msec | ||
max: 1000 * 60 * 60 * 2, // msec | ||
maxHeight: 300 | ||
}; | ||
this.timeline = new vis.Timeline(this.$els.timeline, this.items, options); | ||
this.timeline.setGroups(this.groups); | ||
window.timeline = this.timeline; | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="less" rel="stylesheet/less"> | ||
.timeline { | ||
width: 1024px; | ||
} | ||
</style> |
Oops, something went wrong.