page scrolling slowdown
This commit is contained in:
parent
b45fbe52ac
commit
d5fbaf950d
@ -427,12 +427,14 @@ input {
|
||||
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
cursor: -webkit-grab;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.mainClass {
|
||||
width: 100%;
|
||||
box-shadow: 2px 2px 15px 0px #090909;
|
||||
cursor: default !important;
|
||||
}
|
||||
|
||||
.classWrapper {
|
||||
|
||||
@ -112,17 +112,18 @@ Template.classesMode.rendered = function() {
|
||||
|
||||
var area = $("#classesMode");
|
||||
var clickX = 0;
|
||||
var reducer = 0.5;
|
||||
|
||||
area.on({
|
||||
'mousemove': function(e) {
|
||||
if(clicked && !dragging) {
|
||||
area.scrollLeft(area.scrollLeft() + (clickX - e.pageX));
|
||||
clickX = e.pageX;
|
||||
area.scrollLeft(area.scrollLeft() + (clickX - reducer*e.pageX));
|
||||
clickX = reducer*e.pageX;
|
||||
}
|
||||
},
|
||||
'mousedown': function(e) {
|
||||
clicked = true;
|
||||
clickX = e.pageX;
|
||||
clickX = reducer*e.pageX;
|
||||
},
|
||||
'mouseup': function() {
|
||||
clicked = false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user