File tree Expand file tree Collapse file tree 3 files changed +111
-0
lines changed
js/annotations/components Expand file tree Collapse file tree 3 files changed +111
-0
lines changed Original file line number Diff line number Diff line change
1
+ <template >
2
+ <ul class =" labelbot-labels" >
3
+ <li class =" labelbot-labels-label" v-for =" (label, index) in labelBOTLabels" :key =" index" >
4
+ <div v-if =" index === 0" class =" labelbot-labels-label__nameProgress" >
5
+ <!-- Progress bar -->
6
+ <div class =" labelbot-labels-label__progress-bar" :style =" { width: progressWidth + '%' }" ></div >
7
+ <!-- Label name -->
8
+ <div class =" labelbot-labels-label__nameProgressColor" >
9
+ <span class =" labelbot-labels-label__color" :style =" { backgroundColor: label.color }" ></span >
10
+ <span >{{ label.name }}</span >
11
+ </div >
12
+ </div >
13
+ <div v-else class =" labelbot-labels-label__name" >
14
+ <span class =" labelbot-labels-label__color" :style =" { backgroundColor: label.color }" ></span >
15
+ <span >{{ label.name }}</span >
16
+ </div >
17
+ </li >
18
+ <li class =" labelbot-labels-label" >
19
+ <input class =" form-control" placeholder =" type..." >
20
+ </li >
21
+ </ul >
22
+ </template >
23
+
24
+ <script >
25
+ export default {
26
+ data () {
27
+ return {
28
+ annotationPoints: { x: 222 , y: 200 },
29
+ labelBOTLabels: [
30
+ { name: " Label 1" , color: " red" },
31
+ { name: " Label 2" , color: " blue" },
32
+ { name: " Label 3" , color: " green" }
33
+ ],
34
+ progressWidth: 0
35
+ };
36
+ },
37
+ methods: {
38
+ startAnimation () {
39
+ this .progressWidth = 100 ;
40
+ }
41
+ },
42
+ mounted () {
43
+ this .startAnimation ();
44
+ }
45
+ };
46
+ </script >
Original file line number Diff line number Diff line change
1
+ .labelbot-labels {
2
+ list-style-type : none ;
3
+ max-width : min-content ;
4
+ display : block ;
5
+ padding : $padding-large-vertical ;
6
+ border : 1px solid $input-border ;
7
+ border-radius : $input-border-radius ;
8
+ margin : 0 ;
9
+ }
10
+
11
+ .labelbot-labels-label {
12
+ position : relative ;
13
+
14
+ .labelbot-labels-label__color {
15
+ position : absolute ;
16
+ top : 14px ;
17
+ left : $padding-small-vertical ;
18
+ width : 1em ;
19
+ height : 1em ;
20
+ border : 2px solid white ;
21
+ border-radius : 50% ;
22
+ }
23
+
24
+ .labelbot-labels-label__name ,
25
+ .labelbot-labels-label__nameProgressColor {
26
+ position : relative ;
27
+ padding : $padding-large-vertical 27px ;
28
+ margin-bottom : 4px ;
29
+ border : 1px solid $input-border ;
30
+ border-radius : $input-border-radius ;
31
+ word-wrap : break-word ;
32
+ transition : background-color 0.3s ease ;
33
+
34
+ & :hover {
35
+ color : white ;
36
+ cursor : pointer ;
37
+ background-color : $gray-lighter ;
38
+ }
39
+ }
40
+
41
+ .labelbot-labels-label__nameProgress {
42
+ position : relative ;
43
+
44
+ .labelbot-labels-label__nameProgressColor {
45
+ border-color : #219b19 ;
46
+
47
+ & :hover {
48
+ background-color : #219b19 ;
49
+ }
50
+ }
51
+
52
+ .labelbot-labels-label__progress-bar {
53
+ position : absolute ;
54
+ top : 0 ;
55
+ left : 0 ;
56
+ width : 0 ;
57
+ height : 100% ;
58
+ background-color : #186612 ;
59
+ transition : width 10s ease-in-out ;
60
+ border : 1px solid #219b19 ;
61
+ border-radius : $input-border-radius ;
62
+ }
63
+ }
64
+ }
Original file line number Diff line number Diff line change 46
46
@import " components/minimap" ;
47
47
@import " components/control-button" ;
48
48
@import " components/annotation-tooltip" ;
49
+ @import " components/labelbotPopover" ;
You can’t perform that action at this time.
0 commit comments