Browse Source

Unstuck from picker mode on mousemove with no ctrl.

master
Aleksey Olokhtonov 3 days ago
parent
commit
26ec2216ce
  1. 6
      README.txt
  2. 2
      client/config.js
  3. 18
      client/webgl_listeners.js

6
README.txt

@ -109,6 +109,8 @@ Shiplist: @@ -109,6 +109,8 @@ Shiplist:
- offline-only version
- select and manupulate curves with selection tool
- deduplicate pictures
- Color picker should work for ruler
- Show previous color in color picker preview
- No lag while downloading images
- Show previous color in color picker preview
- Color picker should work for ruler
- Color picker precision and pick order seems off
+ Stuck in color picker mode when mouse leaves screen

2
client/config.js

@ -6,7 +6,7 @@ const config = { @@ -6,7 +6,7 @@ const config = {
ws_reconnect_timeout: 2000,
brush_preview_timeout: 1000,
second_finger_timeout: 500,
debug_print: true,
debug_print: false,
draw_bvh: false,
draw_fullnodes: false,
zoom_delta: 0.05,

18
client/webgl_listeners.js

@ -6,8 +6,7 @@ function init_listeners(state, context) { @@ -6,8 +6,7 @@ function init_listeners(state, context) {
context.canvas.addEventListener('pointerdown', (e) => pointerdown(e, state, context));
context.canvas.addEventListener('pointermove', (e) => pointermove(e, state, context));
context.canvas.addEventListener('pointerup', (e) => pointerup(e, state, context));
context.canvas.addEventListener('pointercancel', (e) => pointerup(e, state, context));
//context.canvas.addEventListener('pointerleave', (e) => pointerup(e, state, context));
context.canvas.addEventListener('pointercancel', (e) => pointercancel(e, state, context));
context.canvas.addEventListener('pointerleave', (e) => pointerleave(e, state, context));
context.canvas.addEventListener('contextmenu', cancel);
context.canvas.addEventListener('wheel', (e) => wheel(e, state, context));
@ -170,7 +169,7 @@ function keydown(e, state, context) { @@ -170,7 +169,7 @@ function keydown(e, state, context) {
function keyup(e, state, context) {
if (config.debug_print) {
console.debug('keydown', e.code);
console.debug('keyup', e.code);
}
if (e.code === 'Space' && state.spacedown) {
@ -361,7 +360,11 @@ function pointermove(e, state, context) { @@ -361,7 +360,11 @@ function pointermove(e, state, context) {
}
if (state.colorpicking) {
update_color_picker_color(state, context, canvasp);
if (!e.ctrlKey) {
exit_picker_mode(state);
} else {
update_color_picker_color(state, context, canvasp);
}
}
if (state.zooming) {
@ -590,8 +593,11 @@ function pointerleave(e, state, context) { @@ -590,8 +593,11 @@ function pointerleave(e, state, context) {
context.canvas.classList.remove('movemode');
}
//exit_picker_mode(state);
// something else?
// exit_picker_mode(state);
}
function pointercancel(e, state, context) {
console.log('CANCEL');
}
function update_cursor(state) {

Loading…
Cancel
Save