|
|
|
@ -63,7 +63,7 @@ function mousedown(e, state, context) {
@@ -63,7 +63,7 @@ function mousedown(e, state, context) {
|
|
|
|
|
update_dynamic_stroke(state, context, state.me, canvasp); |
|
|
|
|
state.drawing = true; |
|
|
|
|
|
|
|
|
|
window.requestAnimationFrame(() => draw(state, context)); |
|
|
|
|
schedule_draw(state, context); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function mousemove(e, state, context) { |
|
|
|
@ -89,7 +89,7 @@ function mousemove(e, state, context) {
@@ -89,7 +89,7 @@ function mousemove(e, state, context) {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (do_draw) { |
|
|
|
|
window.requestAnimationFrame(() => draw(state, context)); |
|
|
|
|
schedule_draw(state, context); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
@ -120,7 +120,7 @@ function mouseup(e, state, context) {
@@ -120,7 +120,7 @@ function mouseup(e, state, context) {
|
|
|
|
|
|
|
|
|
|
state.drawing = false; |
|
|
|
|
|
|
|
|
|
window.requestAnimationFrame(() => draw(state, context)); |
|
|
|
|
schedule_draw(state, context); |
|
|
|
|
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
@ -151,7 +151,7 @@ function wheel(e, state, context) {
@@ -151,7 +151,7 @@ function wheel(e, state, context) {
|
|
|
|
|
state.canvas.offset.x -= zoom_offset_x; |
|
|
|
|
state.canvas.offset.y -= zoom_offset_y; |
|
|
|
|
|
|
|
|
|
window.requestAnimationFrame(() => draw(state, context)); |
|
|
|
|
schedule_draw(state, context); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function touchstart(e, state) { |
|
|
|
@ -247,7 +247,7 @@ function touchmove(e, state, context) {
@@ -247,7 +247,7 @@ function touchmove(e, state, context) {
|
|
|
|
|
update_dynamic_stroke(state, context, state.me, canvasp); |
|
|
|
|
fire_event(predraw_event(canvasp.x, canvasp.y)); |
|
|
|
|
|
|
|
|
|
window.requestAnimationFrame(() => draw(state, context)); |
|
|
|
|
schedule_draw(state, context); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return; |
|
|
|
@ -307,7 +307,7 @@ function touchmove(e, state, context) {
@@ -307,7 +307,7 @@ function touchmove(e, state, context) {
|
|
|
|
|
state.touch.first_finger_position = first_finger_position; |
|
|
|
|
state.touch.second_finger_position = second_finger_position; |
|
|
|
|
|
|
|
|
|
window.requestAnimationFrame(() => draw(state, context)); |
|
|
|
|
schedule_draw(state, context); |
|
|
|
|
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
@ -383,8 +383,7 @@ async function on_drop(e, state, context) {
@@ -383,8 +383,7 @@ async function on_drop(e, state, context) {
|
|
|
|
|
// await queue_event(event);
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
window.requestAnimationFrame(() => draw(state, context)); |
|
|
|
|
|
|
|
|
|
schedule_draw(state, context); |
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
|
} |