1

Rename "hint steps" to "resolution"

This commit is contained in:
Alex Yatskov 2015-04-19 10:30:36 +09:00
parent f6452bc7fc
commit 2d308c470b
4 changed files with 7 additions and 7 deletions

View File

@ -61,14 +61,14 @@ func executeQuery(rw http.ResponseWriter, req *http.Request) {
Records: make([]jsonRecord, 0)}
for name, value := range features {
column := jsonColumn{Value: value, Steps: request.HintSteps}
column := jsonColumn{Value: value, Steps: request.Resolution}
hints := project(
entries,
features,
name,
request.MinScore,
request.HintSteps)
request.Resolution)
for _, hint := range hints {
jsonHint := jsonProjection{hint.compatibility, hint.count, hint.sample}

View File

@ -55,8 +55,8 @@
<input class="form-control" type="number" step="0.01" value="0.25" id="minScore">
</div>
<div class="form-group">
<label for="hintSteps">Hint steps</label>
<input class="form-control" type="number" value="20" min="1" id="hintSteps">
<label for="resolution">Resolution</label>
<input class="form-control" type="number" value="20" min="1" id="resolution">
</div>
<div class="form-group">
<label for="maxResults">Max results</label>

View File

@ -46,7 +46,7 @@
return parseFloat(options.fn(this)).toFixed(precision);
});
$('#minScore,#hintSteps,#walkingDist,#maxResults').change(onSearch);
$('#minScore,#resolution,#walkingDist,#maxResults').change(onSearch);
$('#profileDlg').on('hidden.bs.modal', onSearch);
$('#resetStorage').click(function() {
if (confirm('Are you sure you want to reset your profile?')) {
@ -82,7 +82,7 @@
profile: getProfile(),
walkingDist: parseFloat($('#walkingDist').val()),
minScore: parseFloat($('#minScore').val()),
hintSteps: parseInt($('#hintSteps').val()),
resolution: parseInt($('#resolution').val()),
maxResults: parseInt($('#maxResults').val())
};

View File

@ -39,10 +39,10 @@ type jsonGeoData struct {
type jsonQueryRequest struct {
Features featureMap `json:"features"`
Geo *jsonGeoData `json:"geo"`
HintSteps int `json:"hintSteps"`
MaxResults int `json:"maxResults"`
MinScore float64 `json:"minScore"`
Profile featureMap `json:"profile"`
Resolution int `json:"resolution"`
SortAsc bool `json:"sortAsc"`
SortKey string `json:"sortKey"`
WalkingDist float64 `json:"walkingDist"`