Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions assets/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,52 @@
height: 100%;
}

/*
Fullscreen with an interaction (poll, quiz, form, ...): the slide stays on
the left and the interaction appears beside it. On a portrait screen there is
no room for two columns, so the interaction goes below the slide instead.
*/
#focus-slot[data-interaction-mode="true"]:fullscreen,
#focus-slot[data-interaction-mode="true"].focus-fallback-fullscreen {
flex-direction: row;
}

#focus-slot[data-interaction-mode="true"]:fullscreen #focus-media,
#focus-slot[data-interaction-mode="true"].focus-fallback-fullscreen #focus-media {
flex: 1 1 0%;
min-width: 0;
height: 100%;
}

#focus-slot[data-interaction-mode="true"]:fullscreen #focus-interaction,
#focus-slot[data-interaction-mode="true"].focus-fallback-fullscreen #focus-interaction {
flex: 0 0 min(38%, 28rem);
height: 100%;
border-left: 1px solid rgb(255 255 255 / 0.1);
}

@media (orientation: portrait) {
#focus-slot[data-interaction-mode="true"]:fullscreen,
#focus-slot[data-interaction-mode="true"].focus-fallback-fullscreen {
flex-direction: column;
}

#focus-slot[data-interaction-mode="true"]:fullscreen #focus-media,
#focus-slot[data-interaction-mode="true"].focus-fallback-fullscreen #focus-media {
flex: 0 0 38%;
width: 100%;
height: auto;
}

#focus-slot[data-interaction-mode="true"]:fullscreen #focus-interaction,
#focus-slot[data-interaction-mode="true"].focus-fallback-fullscreen #focus-interaction {
flex: 1 1 0%;
height: auto;
border-left: 0;
border-top: 1px solid rgb(255 255 255 / 0.1);
}
}

#chat-feed {
scrollbar-width: thin;
scrollbar-color: rgb(75 85 99) transparent;
Expand Down Expand Up @@ -550,3 +596,9 @@
.animate__slow_slow {
--animate-duration: 5s;
}

/* Virtual pointer: the presenter sees the green dot instead of the mouse cursor. */
.pointer-cursor-hidden,
.pointer-cursor-hidden * {
cursor: none !important;
}
22 changes: 22 additions & 0 deletions assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import "moment/locale/ja";
import QRCodeStyling from "qr-code-styling";
import { Presenter } from "./presenter";
import { Manager } from "./manager";
import { PointerSender, PointerOverlay } from "./pointer";
import { AudioCapture } from "./audio_capture";
import DateTimeLocal from "./date_time_local.mjs";
import Split from "split-grid";
Expand Down Expand Up @@ -465,6 +466,27 @@ Hooks.Manager = {
this.manager.update();
},
};
Hooks.PointerSender = {
mounted() {
this.pointer = new PointerSender(this);
this.pointer.init();
},
updated() {
this.pointer.update();
},
destroyed() {
this.pointer.destroy();
},
};
Hooks.PointerOverlay = {
mounted() {
this.pointer = new PointerOverlay(this);
this.pointer.init();
},
destroyed() {
this.pointer.destroy();
},
};
const INTERACTION_DRAG_TYPE = "application/x-claper-interaction";
const isInteractionDrag = (e) =>
e.dataTransfer && Array.from(e.dataTransfer.types).includes(INTERACTION_DRAG_TYPE);
Expand Down
Loading