Files
wekan/client/components/cards/whiteboard.css
T
Lauri Ojansivu 390007e380 Whiteboard: a card's drawing full screen, that several people draw on at once.
Card menu -> Drawing -> Open as whiteboard opens the drawing under the header
bar, over the opened card, with the drawing's and Red Strings' own tools -
the seven colours and four widths, Undo, Clear and Save picture. The 800 x
500 drawing is scaled to the screen, so a line lands in the same place on a
phone and on a 55" screen; Escape or x closes it.

Several people draw at the same time: each line is sent when the pen lifts
as one atomic $push into that drawing (cards.whiteboardAddStroke), with its
own id and its author, and the card's publication brings it to everyone who
has the drawing open; the line stays drawn locally until it comes back.
Undo and Clear take away only the caller's own lines, Save picture writes
only the drawing's PNG, so nothing anybody else is drawing is overwritten.
Who may draw is who may edit the card; the others watch. A Board Settings /
Card row, Whiteboard, hides it on a board, and the Admin Panel's Card fields
everywhere. The drawing popup's PNG upload is shared with Save picture.
Translated in every language.

Thanks to xet7 !
2026-10-17 16:57:12 +03:00

54 lines
1.2 KiB
CSS

/* The whiteboard (whiteboard.jade): under the header bar, the rest of the window. */
.card-whiteboard {
position: fixed;
inset-inline-start: 0;
inset-inline-end: 0;
bottom: 0;
/* Above an opened card (cardDetails.css, 2001) - the whiteboard is that
card's drawing, full screen - and below the header bar by position. */
z-index: 2050;
display: flex;
flex-direction: column;
background: #f4f5f7;
}
.card-whiteboard-toolbar {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 6px;
padding: 6px max(10px, env(safe-area-inset-left, 0px));
background: #fff;
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
.card-whiteboard-title {
font-weight: bold;
margin-inline-end: 8px;
min-width: 0;
overflow-wrap: anywhere;
}
.card-whiteboard-toolbar button {
margin: 0;
padding: 4px 12px;
}
.card-whiteboard-message {
font-size: 0.9em;
color: #555;
}
.card-whiteboard-close {
margin-inline-start: auto;
font-size: 1.4em;
padding: 0 6px;
color: #333;
cursor: pointer;
}
.card-whiteboard-surface {
flex: 1 1 auto;
width: 100%;
min-height: 0;
touch-action: none;
padding-bottom: env(safe-area-inset-bottom, 0px);
}
.card-whiteboard-surface.can-draw {
cursor: crosshair;
}