mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-04-20 04:21:59 +02:00
Update notification and fix selection.
This commit is contained in:
parent
1670528bec
commit
7b837066ec
@ -2,13 +2,12 @@
|
||||
#notify {
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
top: 3px;
|
||||
width: 200px;
|
||||
margin-left: -100px;
|
||||
z-index: 100;
|
||||
padding: 2px 6px 2px 6px;
|
||||
padding: 3px 6px 6px 6px;
|
||||
color: #fff;
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
border-radius: 4px;
|
||||
border-radius: 0 0 4px 4px;
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -104,20 +104,14 @@ modulejs.define('ext/select', ['_', '$', 'core/settings', 'core/resource', 'core
|
||||
|
||||
function selectionStart(event) {
|
||||
|
||||
window.console.log(event);
|
||||
|
||||
var $window = $(window);
|
||||
var viewRight = $window.scrollLeft() + $window.width();
|
||||
var viewBottom = $window.scrollTop() + $window.height();
|
||||
// only on left button and don't block scrollbar
|
||||
if (event.button !== 0 || event.offsetX >= $('#content').width() - 14) {
|
||||
return;
|
||||
}
|
||||
|
||||
x = event.pageX;
|
||||
y = event.pageY;
|
||||
|
||||
// only on left button and don't block the scrollbars
|
||||
if (event.button !== 0 || x >= viewRight || y >= viewBottom) {
|
||||
return;
|
||||
}
|
||||
|
||||
$(':focus').blur();
|
||||
if (!event.ctrlKey && !event.metaKey) {
|
||||
$('#items .item').removeClass('selected');
|
||||
|
Loading…
x
Reference in New Issue
Block a user