mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Broadcast mouse activity (#1175)
* broadcast mouse activity * move to same MOUSE_LOCATION event * remove key up handler * update tests * Fix border * refactor * rename activity to button Co-authored-by: Panayiotis Lipiridis <lipiridis@gmail.com>
This commit is contained in:
parent
23540eba4c
commit
b97520400a
7 changed files with 116 additions and 14 deletions
|
@ -298,6 +298,26 @@ export function renderScene(
|
|||
if (isOutOfBounds) {
|
||||
context.globalAlpha = 0.2;
|
||||
}
|
||||
|
||||
if (
|
||||
sceneState.remotePointerButton &&
|
||||
sceneState.remotePointerButton[clientId] === "down"
|
||||
) {
|
||||
context.beginPath();
|
||||
context.arc(x, y, 15, 0, 2 * Math.PI, false);
|
||||
context.lineWidth = 3;
|
||||
context.strokeStyle = "#ffffff88";
|
||||
context.stroke();
|
||||
context.closePath();
|
||||
|
||||
context.beginPath();
|
||||
context.arc(x, y, 15, 0, 2 * Math.PI, false);
|
||||
context.lineWidth = 1;
|
||||
context.strokeStyle = stroke;
|
||||
context.stroke();
|
||||
context.closePath();
|
||||
}
|
||||
|
||||
context.beginPath();
|
||||
context.moveTo(x, y);
|
||||
context.lineTo(x + 1, y + 14);
|
||||
|
@ -309,6 +329,7 @@ export function renderScene(
|
|||
context.strokeStyle = strokeStyle;
|
||||
context.fillStyle = fillStyle;
|
||||
context.globalAlpha = globalAlpha;
|
||||
context.closePath();
|
||||
}
|
||||
|
||||
// Paint scrollbars
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue