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