Skip to content
This repository was archived by the owner on Jul 20, 2025. It is now read-only.

Commit 7e916a9

Browse files
committed
Fix wrong order scaling & setup ports
1 parent 8a72a9a commit 7e916a9

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

webassets/design.html

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@
232232
};
233233

234234
window.mpds_host = 'https://mpds.io';
235-
window.srv_host = (window.location.hostname=='localhost' || window.location.hostname=='127.0.0.1' || window.location.hostname=='') ? 'http://127.0.0.1:5000' : 'https://labs.mpds.io';
235+
window.srv_host = (window.location.hostname=='localhost' || window.location.hostname=='127.0.0.1' || window.location.hostname=='') ? 'http://127.0.0.1:' + window.location.port : 'https://labs.mpds.io';
236236
window.api_host = 'https://api.mpds.io/v0';
237237

238238
window.srch_endpoint = window.api_host + '/search/facet';
@@ -319,20 +319,8 @@
319319
for (var prop_id in window.prop_models){
320320
var data = document.getElementById('slider_' + prop_id).noUiSlider.get();
321321

322-
if (prop_id == 'x' || prop_id == 't'){
323-
data[0] *= 10;
324-
data[1] *= 10;
322+
if (prop_id == 'w' && window.disabled_w) data = [0, 0];
325323

326-
} else if (prop_id == 'w'){
327-
if (window.disabled_w){
328-
data[0] = 0;
329-
data[1] = 0;
330-
331-
} else {
332-
data[0] *= 10;
333-
data[1] *= 10;
334-
}
335-
}
336324
numeric_search[prop_id] = data;
337325
}
338326

webassets/props.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
<script type="text/javascript">
124124
"use strict";
125125
window.player_src = 'player.html';
126-
window.req_endpoint = (window.location.hostname=='localhost' || window.location.hostname=='127.0.0.1' || window.location.hostname=='') ? 'http://127.0.0.1:5000/predict' : 'https://labs.mpds.io/predict';
126+
window.req_endpoint = (window.location.hostname=='localhost' || window.location.hostname=='127.0.0.1' || window.location.hostname=='') ? 'http://127.0.0.1:' + window.location.port + '/predict' : 'https://labs.mpds.io/predict';
127127
window.local_supported = window.File && window.FileReader && window.FileList && window.Blob;
128128
window.playerdata = null;
129129

0 commit comments

Comments
 (0)