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

Method render

js/src/FastIntervalSelector.ts:25–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23
24export class FastIntervalSelector extends BaseXSelector {
25 render() {
26 super.render();
27 this.freeze_but_move = true;
28 this.freeze_dont_move = false;
29 this.active = false;
30 this.dirty = false;
31 this.size = this.model.get('size');
32
33 const that = this;
34 const scale_creation_promise = this.create_scales();
35 Promise.all([this.mark_views_promise, scale_creation_promise]).then(() => {
36 //container for mouse events
37 that.background = that.d3el
38 .append('rect')
39 .attr('x', 0)
40 .attr('y', 0)
41 .attr('width', that.width)
42 .attr('height', that.height)
43 .attr('class', 'selector selectormouse')
44 .attr('pointer-events', 'all')
45 .attr('visibility', 'hidden');
46
47 that.background
48 .on('mousemove', _.bind(that.mousemove, that))
49 .on('click', _.bind(that.click, that))
50 .on('dblclick', _.bind(that.dblclick, that));
51
52 that.rect = that.d3el
53 .append('rect')
54 .attr('class', 'selector intsel')
55 .attr('x', 0)
56 .attr('y', 0)
57 .attr('width', that.size)
58 .attr('height', that.height)
59 .attr('pointer-events', 'none')
60 .attr('display', 'none');
61
62 that.color_change();
63 that.selected_changed();
64 that.create_listeners();
65 });
66 }
67
68 create_listeners() {
69 super.create_listeners();

Callers

nothing calls this directly

Calls 3

color_changeMethod · 0.45
selected_changedMethod · 0.45
create_listenersMethod · 0.45

Tested by

no test coverage detected