MCPcopy
hub / github.com/1j01/jspaint / pointerdown

Function pointerdown

src/tools.js:164–174  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

162 y_max: -Infinity,
163
164 pointerdown() {
165 this.x_min = pointer.x;
166 this.x_max = pointer.x + 1;
167 this.y_min = pointer.y;
168 this.y_max = pointer.y + 1;
169 this.points = [];
170 this.preview_canvas = make_canvas(main_canvas.width, main_canvas.height);
171
172 // End prior selection, drawing it to the canvas
173 deselect();
174 },
175 paint(_ctx, _x, _y) {
176 // Constrain the pointer to the canvas
177 pointer.x = Math.min(main_canvas.width, pointer.x);

Callers

nothing calls this directly

Calls 14

make_canvasFunction · 0.90
deselectFunction · 0.90
undoableFunction · 0.90
get_icon_for_toolFunction · 0.90
draw_noncontiguous_fillFunction · 0.90
draw_fillFunction · 0.90
set_magnificationFunction · 0.90
localizeFunction · 0.85
widthMethod · 0.80
heightMethod · 0.80
pushMethod · 0.80

Tested by

no test coverage detected