|
|
@ -179,6 +179,13 @@ function mousedown(e, state, context) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (state.colorpicking) { |
|
|
|
|
|
|
|
const color_u32 = color_to_u32(state.color_picked.substring(1)); |
|
|
|
|
|
|
|
state.players[state.me].color = color_u32; |
|
|
|
|
|
|
|
fire_event(state, color_event(color_u32)); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (context.active_image) { |
|
|
|
if (context.active_image) { |
|
|
|
// Move selected image with left click
|
|
|
|
// Move selected image with left click
|
|
|
|
const image_event = image_at(state, canvasp.x, canvasp.y); |
|
|
|
const image_event = image_at(state, canvasp.x, canvasp.y); |
|
|
@ -224,6 +231,8 @@ function update_color_picker_color(state, context, canvasp) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
document.querySelector('.picker-preview-inner').style.background = color_under_cursor; |
|
|
|
document.querySelector('.picker-preview-inner').style.background = color_under_cursor; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
state.color_picked = color_under_cursor; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function mousemove(e, state, context) { |
|
|
|
function mousemove(e, state, context) { |
|
|
|