sped up scroll bars
This commit is contained in:
parent
b7703e2a0f
commit
bfa25bc604
6 changed files with 38 additions and 19 deletions
|
@ -45,7 +45,7 @@ function buildCardWithHogan(node) {
|
|||
nodeValues.synapse_count = node.getData("synapseCount");
|
||||
nodeValues.id = node.id;
|
||||
nodeValues.metacode = node.getData("metacode");
|
||||
nodeValues.metacode_class = 'mbg' + node.getData("metacode").replace(/\s/g,'');
|
||||
nodeValues.metacode_class = 'mbg' + node.getData("metacode").replace(/\s/g, '');
|
||||
nodeValues.imgsrc = imgArray[node.getData("metacode")].src;
|
||||
nodeValues.name = node.name;
|
||||
nodeValues.userid = node.getData("userid");
|
||||
|
@ -127,7 +127,12 @@ function populateShowCard(node) {
|
|||
$('.metacodeSelect').show();
|
||||
// add the scroll bar to the list of metacode select options if it isn't already there
|
||||
if (!$('.metacodeSelect ul').hasClass('mCustomScrollbar')) {
|
||||
$('.metacodeSelect ul').mCustomScrollbar();
|
||||
$('.metacodeSelect ul').mCustomScrollbar({
|
||||
mouseWheelPixels: 200,
|
||||
advanced: {
|
||||
updateOnContentResize: true
|
||||
}
|
||||
});
|
||||
|
||||
$('.metacodeSelect li').click(function () {
|
||||
selectingMetacode = false;
|
||||
|
|
|
@ -148,7 +148,7 @@ function updateMetacode(node, metacode) {
|
|||
data: mdata,
|
||||
success: function (data) {
|
||||
$('.CardOnGraph').find('.metacodeTitle').text(metacode)
|
||||
.attr('class', 'metacodeTitle mbg' + metacode.replace(/\s/g,''));
|
||||
.attr('class', 'metacodeTitle mbg' + metacode.replace(/\s/g, ''));
|
||||
$('.CardOnGraph').find('.metacodeImage').css('background-image', 'url(' + imgArray[metacode].src + ')');
|
||||
node.setData("metacode", metacode);
|
||||
Mconsole.plot();
|
||||
|
@ -305,8 +305,7 @@ function cancelMetacodeSetSwitch() {
|
|||
MetamapsModel.selectedMetacodeNames = [];
|
||||
MetamapsModel.newSelectedMetacodes = [];
|
||||
MetamapsModel.newSelectedMetacodeNames = [];
|
||||
}
|
||||
else { // custom set is selected
|
||||
} else { // custom set is selected
|
||||
// reset it to the current actual selection
|
||||
$('.customMetacodeList li').addClass('toggledOff');
|
||||
for (var i = 0; i < MetamapsModel.selectedMetacodes.length; i++) {
|
||||
|
@ -337,7 +336,12 @@ function openNodeShowcard(node) {
|
|||
|
||||
$('.showcard').fadeIn('fast');
|
||||
var s = $('.showcard').find('.scroll');
|
||||
s.height(s.height()).mCustomScrollbar();
|
||||
s.height(s.height()).mCustomScrollbar({
|
||||
mouseWheelPixels: 200,
|
||||
advanced: {
|
||||
updateOnContentResize: true
|
||||
}
|
||||
});
|
||||
MetamapsModel.showcardInUse = node.id;
|
||||
}
|
||||
|
||||
|
@ -349,7 +353,12 @@ function openLightbox(which) {
|
|||
$('#lightbox_main').css('margin-top', '-' + ($('#lightbox_main').height() / 2) + 'px');
|
||||
|
||||
if (!MetamapsModel.metacodeScrollerInit) {
|
||||
$('.customMetacodeList, .metacodeSetList').mCustomScrollbar({advanced: { updateOnContentResize: true }});
|
||||
$('.customMetacodeList, .metacodeSetList').mCustomScrollbar({
|
||||
mouseWheelPixels: 200,
|
||||
advanced: {
|
||||
updateOnContentResize: true
|
||||
}
|
||||
});
|
||||
MetamapsModel.metacodeScrollerInit = true;
|
||||
}
|
||||
if (which == "switchMetacodes") {
|
||||
|
@ -384,4 +393,3 @@ function cancelMapCreate(id) {
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -76,6 +76,7 @@ $(document).ready(function () {
|
|||
|
||||
// initialize scroll bar for filter by metacode, then hide it and position it correctly again
|
||||
$("#filter_by_metacode").mCustomScrollbar({
|
||||
mouseWheelPixels: 200,
|
||||
advanced: {
|
||||
updateOnContentResize: true
|
||||
}
|
||||
|
|
|
@ -1764,7 +1764,7 @@ div.mapInfoStat {
|
|||
list-style-type: none;
|
||||
display: block;
|
||||
padding: 0px;
|
||||
width: 93px;
|
||||
width: 92px;
|
||||
height: 70px;
|
||||
float: left;
|
||||
text-align: center;
|
||||
|
|
|
@ -60,7 +60,12 @@
|
|||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
$('.FAQ').height( (parseInt($('body').height()) - 40) ).mCustomScrollbar();
|
||||
$('.FAQ').height( (parseInt($('body').height()) - 40) ).mCustomScrollbar({
|
||||
mouseWheelPixels: 200,
|
||||
advanced: {
|
||||
updateOnContentResize: true
|
||||
}
|
||||
});
|
||||
|
||||
$('.FAQ .question').click(function() {
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<div class="mapCard">
|
||||
<div class="mapPerm <%= map.mk_permission %>"></div>
|
||||
<span class="title">
|
||||
<%= best_in_place map, :name, :type => :input, :classes => 'best_in_place_name' %>
|
||||
<%= map.name %>
|
||||
</span>
|
||||
<div class="mapContains">
|
||||
<span class="topicCount"><%= pluralize(map.topics.count, 'topic') %></span>
|
||||
|
@ -19,7 +19,7 @@
|
|||
<div class="littleOverlay">
|
||||
<div class="scroll">
|
||||
<div class="desc">
|
||||
<%= best_in_place map, :desc, :type => :textarea, :nil => "<span class='gray'>Click to add description.</span>", :classes => 'best_in_place_desc' %>
|
||||
<%= map.desc %>
|
||||
</div>
|
||||
</div>
|
||||
<span><%= pluralize(map.contributors.count, 'contributor') %></span><span>Last edit <%= time_ago_in_words( map.updated_at ) %> ago</span>
|
||||
|
|
Loading…
Reference in a new issue