Skip to content

Commit 137ec7d

Browse files
francoisluusdsmilkov
authored andcommitted
Projector: Inspector-panel neighbors slider editable (#733)
Make the neighbors slider editable in the inspector panel of the projector. This allows for finer-grained control on neighborhood size when selecting groups, which becomes important during interactive supervision.
1 parent ecd1f11 commit 137ec7d

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

Diff for: tensorboard/plugins/projector/vz_projector/vz-projector-inspector-panel.html

+9-3
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,14 @@
165165
}
166166

167167
#nn-slider {
168-
margin: 0 -12px 0 10px;
168+
margin: 0 -12px 0 0px;
169+
--paper-slider-input: {
170+
width: 66px
171+
};
172+
--paper-input-container-input-webkit-spinner: {
173+
-webkit-appearance: none;
174+
margin: 0;
175+
};
169176
}
170177

171178
.euclidean {
@@ -220,8 +227,7 @@
220227
<paper-tooltip position="bottom" animation-delay="0" fit-to-visible-bounds>
221228
The number of neighbors (in the original space) to show when clicking on a point.
222229
</paper-tooltip>
223-
<paper-slider id="nn-slider" pin min="5" max="1000" value="100"></paper-slider>
224-
<span class="nn-count"></span>
230+
<paper-slider id="nn-slider" pin min="5" max="999" value="100" editable></paper-slider>
225231
</div>
226232
</div>
227233
<div class="distance">

Diff for: tensorboard/plugins/projector/vz_projector/vz-projector-inspector-panel.ts

-2
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,6 @@ export class InspectorPanel extends PolymerClass {
303303
const numNNInput = this.$$('#nn-slider') as HTMLInputElement;
304304
const updateNumNN = () => {
305305
this.numNN = +numNNInput.value;
306-
(this.querySelector('.num-nn .nn-count') as HTMLSpanElement).innerText =
307-
'' + this.numNN;
308306
if (this.selectedPointIndices != null) {
309307
this.projectorEventContext.notifySelectionChanged(
310308
[this.selectedPointIndices[0]]);

0 commit comments

Comments
 (0)