mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-02-20 13:40:50 +01:00
Merge pull request #123 from VE-FORBRYDERNE/settings
Prevent the settings throttle from lagging the sliders
This commit is contained in:
commit
716951f059
@ -118,7 +118,7 @@ var adventure = false;
|
|||||||
// Chatmode
|
// Chatmode
|
||||||
var chatmode = false;
|
var chatmode = false;
|
||||||
|
|
||||||
var sliders_throttle = getThrottle(40);
|
var sliders_throttle = getThrottle(200);
|
||||||
|
|
||||||
//=================================================================//
|
//=================================================================//
|
||||||
// METHODS
|
// METHODS
|
||||||
@ -174,12 +174,10 @@ function addSetting(ob) {
|
|||||||
window["label_"+ob.id] = reflb; // Is this still needed?
|
window["label_"+ob.id] = reflb; // Is this still needed?
|
||||||
// Add event function to input
|
// Add event function to input
|
||||||
var send = function () {
|
var send = function () {
|
||||||
var that = refin;
|
|
||||||
sliders_throttle(ob.id, function () {
|
sliders_throttle(ob.id, function () {
|
||||||
socket.send({'cmd': $(that).attr('id'), 'data': $(that).val()});
|
socket.send({'cmd': $(refin).attr('id'), 'data': $(refin).val()});
|
||||||
refin.val(parseFloat($(that).val()));
|
|
||||||
reflb.html($(that).val());
|
|
||||||
});
|
});
|
||||||
|
reflb.val($(refin).val());
|
||||||
}
|
}
|
||||||
refin.on("input", send);
|
refin.on("input", send);
|
||||||
reflb.on("change", function (event) {
|
reflb.on("change", function (event) {
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
<script src="static/bootstrap.min.js"></script>
|
<script src="static/bootstrap.min.js"></script>
|
||||||
<script src="static/bootstrap-toggle.min.js"></script>
|
<script src="static/bootstrap-toggle.min.js"></script>
|
||||||
<script src="static/rangy-core.min.js"></script>
|
<script src="static/rangy-core.min.js"></script>
|
||||||
<script src="static/application.js?ver=1.17d"></script>
|
<script src="static/application.js?ver=1.17e"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<input type="file" id="remote-save-select" accept="application/json" style="display:none">
|
<input type="file" id="remote-save-select" accept="application/json" style="display:none">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user