mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-22 14:59:34 +00:00
[timeline] overlapovanie taskov s rovnakou dlzkou, zaciatkom a koncom casu
This commit is contained in:
1 parent
9d70fe378d
commit
761c32ef5e
4 files changed
+48
-18
No files matched your search
@@ -40,7 +40,7 @@ export default {
|
||||
cellFormattedDate: { type: String, default: "" },
|
||||
event: { type: Object, default: () => ({}) },
|
||||
cellEvents: { type: Array, default: () => [] },
|
||||
overlaps: { type: Array, default: () => [] },
|
||||
cellOverlaps: { type: Object, default: () => ({}) },
|
||||
// If multiple simultaneous events, the events are placed from left to right from the
|
||||
// one starting first to the last. (See utils/event.js > checkCellOverlappingEvents)
|
||||
eventPosition: { type: Number, default: 0 },
|
||||
@@ -225,6 +225,14 @@ export default {
|
||||
},
|
||||
|
||||
computed: {
|
||||
overlaps() {
|
||||
return this.cellOverlaps.overlaps
|
||||
},
|
||||
|
||||
sameOverlaps() {
|
||||
return this.cellOverlaps.sameOverlaps
|
||||
},
|
||||
|
||||
eventDimensions() {
|
||||
const { startTimeMinutes, endTimeMinutes } = this.segment || this.event;
|
||||
|
||||
@@ -260,11 +268,18 @@ export default {
|
||||
return {};
|
||||
// let width = 100 / Math.min(this.overlaps.length + 1, this.overlapsStreak)
|
||||
// let left = (100 - ((this.overlaps.length + 1) * 10 )) * this.eventPosition
|
||||
|
||||
let width = 100 - this.eventPosition * 10;
|
||||
let left = (10 * this.eventPosition) / 2;
|
||||
let zIdnex = (this.eventPosition + 1) * 10;
|
||||
let background = this.event.master_task_color;
|
||||
|
||||
if (Array.isArray(this.cellOverlaps.sameOverlaps) && this.cellOverlaps.sameOverlaps.length) {
|
||||
width = 50
|
||||
left = 50 * this.eventPosition
|
||||
zIdnex = 10
|
||||
}
|
||||
|
||||
if (this.vuecal.minEventWidth && width < this.vuecal.minEventWidth) {
|
||||
width = this.vuecal.minEventWidth;
|
||||
left =
|
||||
|
||||
Reference in new issue
Block a user