MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / constructor

Method constructor

static/settings.ts:152–166  ·  view source on GitHub ↗
(elem: JQuery, name: string, sliderSettings: SliderSettings)

Source from the content-addressed store, hash-verified

150 private min: number;
151
152 constructor(elem: JQuery, name: string, sliderSettings: SliderSettings) {
153 super(elem, name);
154
155 this.formatter = sliderSettings.formatter;
156 this.display = sliderSettings.display;
157
158 this.max = sliderSettings.max || 100;
159 this.min = sliderSettings.min || 1;
160
161 elem.prop('max', this.max)
162 .prop('min', this.min)
163 .prop('step', sliderSettings.step || 1);
164
165 elem.on('change', this.updateDisplay.bind(this));
166 }
167
168 override putUi(value: number) {
169 this.elem.val(value);

Callers

nothing calls this directly

Calls 1

onMethod · 0.45

Tested by

no test coverage detected