-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: refactor styles and add dragging mask backdrop
- Loading branch information
Showing
16 changed files
with
232 additions
and
230 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
6 changes: 6 additions & 0 deletions
6
packages/gantt/src/drag-backdrop/drag-backdrop.component.html
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,6 @@ | ||
<div class="gantt-drag-mask"> | ||
<div class="date-range"> | ||
<span class="start"></span> | ||
<span class="end"></span> | ||
</div> | ||
</div> |
33 changes: 33 additions & 0 deletions
33
packages/gantt/src/drag-backdrop/drag-backdrop.component.scss
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 @@ | ||
.gantt-drag-backdrop { | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
bottom: 0; | ||
left: 0; | ||
z-index: 1; | ||
display: none; | ||
} | ||
|
||
.gantt-drag-mask { | ||
position: absolute; | ||
top: $gantt-header-height; | ||
z-index: 1; | ||
height: 100%; | ||
display: none; | ||
background: rgba($color: $gantt-item-drag-mask-color, $alpha: 0.05); | ||
|
||
.date-range { | ||
width: 100%; | ||
min-width: 120px; | ||
top: -23px; | ||
background: $gantt-item-drag-mask-color; | ||
line-height: 23px; | ||
border-radius: 4px; | ||
color: #fff; | ||
position: absolute; | ||
display: flex; | ||
justify-content: space-between; | ||
padding: 0 10px; | ||
box-sizing: border-box | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
packages/gantt/src/drag-backdrop/drag-backdrop.component.ts
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,13 @@ | ||
import { Component, OnInit, HostBinding } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'gantt-drag-backdrop', | ||
templateUrl: `./drag-backdrop.component.html` | ||
}) | ||
export class GanttDragBackdropComponent implements OnInit { | ||
@HostBinding('class.gantt-drag-backdrop') backdropClass = true; | ||
|
||
constructor() {} | ||
|
||
ngOnInit() {} | ||
} |
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,74 @@ | ||
.gantt { | ||
width: 100%; | ||
height: 100%; | ||
background-color: $gantt-bg-color; | ||
position: relative; | ||
overflow: hidden; | ||
display: flex; | ||
color: $gantt-color; | ||
opacity: 0; | ||
|
||
.gantt-side { | ||
border-right: 1px solid $gantt-border-color; | ||
position: relative; | ||
z-index: 1; | ||
overflow: auto; | ||
|
||
|
||
&-has-shadow { | ||
box-shadow: $gantt-side-shadow; | ||
} | ||
|
||
.gantt-side-header { | ||
box-sizing: border-box; | ||
height: $gantt-header-height; | ||
} | ||
|
||
.gantt-side-container { | ||
height: calc(100% - #{$gantt-header-height}); | ||
overflow: auto; | ||
|
||
&::-webkit-scrollbar { | ||
display: none; | ||
} | ||
} | ||
} | ||
|
||
.gantt-container { | ||
flex: 1; | ||
position: relative; | ||
display: flex; | ||
overflow: hidden; | ||
background-color: $gantt-container-background-color; | ||
} | ||
|
||
.gantt-main-container { | ||
width: 100%; | ||
height: calc(100% - #{$gantt-header-height}); | ||
flex: 1; | ||
position: absolute; | ||
top: $gantt-header-height; | ||
bottom: 0; | ||
left: 0; | ||
right: 0; | ||
overflow: auto; | ||
|
||
.gantt-main-groups .gantt-main-items { | ||
height: 100%; | ||
} | ||
|
||
.gantt-group { | ||
height: $gantt-group-height; | ||
background: $gantt-group-background-color; | ||
border-bottom: 1px solid $gantt-border-color; | ||
} | ||
|
||
.gantt-item { | ||
height: $gantt-item-height; | ||
border-bottom: 1px solid $gantt-border-color; | ||
box-sizing: border-box; | ||
position: relative; | ||
} | ||
} | ||
|
||
} |
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
Oops, something went wrong.