Skip to content
This repository was archived by the owner on Jul 29, 2019. It is now read-only.

Commit 6afe0f1

Browse files
authored
timeline: use css style instead of delete image (#2034)
1 parent d9576be commit 6afe0f1

File tree

3 files changed

+36
-14
lines changed

3 files changed

+36
-14
lines changed

gulpfile.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,7 @@ gulp.task('copy', ['clean'], function () {
175175
var network = gulp.src('./lib/network/img/**/*')
176176
.pipe(gulp.dest(DIST + '/img/network'));
177177

178-
var timeline = gulp.src('./lib/timeline/img/**/*')
179-
.pipe(gulp.dest(DIST + '/img/timeline'));
180-
181-
return merge(network, timeline);
178+
return network;
182179
});
183180

184181
gulp.task('minify', ['bundle-js'], function (cb) {

lib/timeline/component/css/item.css

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,26 +90,51 @@
9090
padding: 5px;
9191
}
9292

93-
.vis-item .vis-delete {
94-
background: url('img/timeline/delete.png') no-repeat center;
93+
.vis-item .vis-delete, .vis-item .vis-delete-rtl {
9594
position: absolute;
95+
top: 0px;
9696
width: 24px;
9797
height: 24px;
98-
top: -4px;
99-
right: -24px;
98+
box-sizing: border-box;
99+
padding: 0px 5px;
100100
cursor: pointer;
101+
102+
-webkit-transition: background 0.2s linear;
103+
-moz-transition: background 0.2s linear;
104+
-ms-transition: background 0.2s linear;
105+
-o-transition: background 0.2s linear;
106+
transition: background 0.2s linear;
107+
}
108+
109+
.vis-item .vis-delete {
110+
right: -24px;
101111
}
102112

103113
.vis-item .vis-delete-rtl {
104-
background: url('img/timeline/delete.png') no-repeat center;
105-
position: absolute;
106-
width: 24px;
107-
height: 24px;
108-
top: -4px;
109114
left: -24px;
110-
cursor: pointer;
111115
}
112116

117+
.vis-item .vis-delete:after, .vis-item .vis-delete-rtl:after {
118+
content: "\00D7"; /* MULTIPLICATION SIGN */
119+
color: red;
120+
font-family: arial, sans-serif;
121+
font-size: 22px;
122+
font-weight: bold;
123+
124+
-webkit-transition: color 0.2s linear;
125+
-moz-transition: color 0.2s linear;
126+
-ms-transition: color 0.2s linear;
127+
-o-transition: color 0.2s linear;
128+
transition: color 0.2s linear;
129+
}
130+
131+
.vis-item .vis-delete:hover, .vis-item .vis-delete-rtl:hover {
132+
background: red;
133+
}
134+
135+
.vis-item .vis-delete:hover:after, .vis-item .vis-delete-rtl:hover:after {
136+
color: white;
137+
}
113138

114139
.vis-item.vis-range .vis-drag-left {
115140
position: absolute;

lib/timeline/img/delete.png

-665 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)