MCPcopy Create free account
hub / github.com/bqplot/bqplot / set_scale_promise

Method set_scale_promise

js/src/Axis.ts:772–788  ·  view source on GitHub ↗
(model: ScaleModel)

Source from the content-addressed store, hash-verified

770 }
771
772 set_scale_promise(model: ScaleModel) {
773 // Sets the child scale
774 if (this.axis_scale) {
775 this.axis_scale.remove();
776 }
777 // @ts-ignore
778 return this.create_child_view(model).then((view: Scale) => {
779 // Trigger the displayed event of the child view.
780 this.displayed.then(() => {
781 view.trigger('displayed');
782 });
783 this.axis_scale = view;
784 this.axis_scale.on('domain_changed', this.redraw_axisline, this);
785 this.axis_scale.on('highlight_axis', this.highlight, this);
786 this.axis_scale.on('unhighlight_axis', this.unhighlight, this);
787 });
788 }
789
790 update_scale(old, scale) {
791 // Called when the child scale changes

Callers 2

renderMethod · 0.95
update_scaleMethod · 0.95

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected