Skip to content

Commit

Permalink
better timegrid event harness styling
Browse files Browse the repository at this point in the history
  • Loading branch information
arshaw committed Apr 9, 2020
1 parent 270405c commit c499406
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 6 additions & 3 deletions packages/timegrid/src/TimeCol.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,12 @@ export default class TimeCol extends BaseComponent<TimeColProps> {
return segs.map((seg) => {
let instanceId = seg.eventRange.instance.instanceId
let isMirror = isDragging || isResizing || isDateSelecting
let positionCss = isMirror
? { left: 0, right: 0, ...this.computeSegTopBottomCss(seg) } // TODO: use real fg-segs' left/right
: this.computeFgSegPositionCss(seg)
let positionCss = isMirror ?
// will span entire column width
// also, won't assign z-index, which is good, fc-event-mirror will overpower other harnesses
{ left: 0, right: 0, ...this.computeSegTopBottomCss(seg) }
:
this.computeFgSegPositionCss(seg)

return (
<div
Expand Down
3 changes: 2 additions & 1 deletion packages/timegrid/src/styles/_timegrid-event.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@

// harness

.fc-timegrid-event-harness-inset .fc-timegrid-event {
.fc-timegrid-event-harness-inset .fc-timegrid-event,
.fc-timegrid-event.fc-event-mirror {
box-shadow: 0px 0px 0px 1px #fff; // TODO: var
}

Expand Down

0 comments on commit c499406

Please sign in to comment.