MCPcopy Index your code
hub / github.com/bqplot/bqplot / set_scale_views

Function set_scale_views

js/src/Mark.ts:120–146  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

118 abstract set_ranges();
119
120 set_scale_views() {
121 // first, if this.scales was already defined, unregister from the
122 // old ones.
123 for (const key in this.scales) {
124 this.stopListening(this.scales[key]);
125 }
126
127 const scale_models = this.model.getScales();
128 const that = this;
129 const scale_promises = {};
130 _.each(scale_models, (model: widgets.WidgetModel, key) => {
131 scale_promises[key] = that.create_child_view(model);
132 });
133
134 return (
135 widgets
136 .resolvePromisesDict(scale_promises)
137 // @ts-ignore: TODO Should find a proper type for scale_promises
138 .then((scales: MarkScales) => {
139 that.scales = scales;
140 that.set_positional_scales();
141 that.initialize_additional_scales();
142 that.set_ranges();
143 that.trigger('mark_scales_updated');
144 })
145 );
146 }
147
148 set_positional_scales() {
149 // Positional scales are special in that they trigger a full redraw

Callers

nothing calls this directly

Calls 4

getScalesMethod · 0.45
set_positional_scalesMethod · 0.45
set_rangesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…