MCPcopy Create free account
hub / github.com/apache/cloudstack / controlbarHandleMouseDown

Function controlbarHandleMouseDown

systemvm/agent/noVNC/app/ui.js:754–778  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

752 },
753
754 controlbarHandleMouseDown(e) {
755 if ((e.type == "mousedown") && (e.button != 0)) return;
756
757 const ptr = getPointerEvent(e);
758
759 const handle = document.getElementById("noVNC_control_bar_handle");
760 const bounds = handle.getBoundingClientRect();
761
762 // Touch events have implicit capture
763 if (e.type === "mousedown") {
764 setCapture(handle);
765 }
766
767 UI.controlbarGrabbed = true;
768 UI.controlbarDrag = false;
769
770 UI.showControlbarHint(true);
771
772 UI.controlbarMouseDownClientY = ptr.clientY;
773 UI.controlbarMouseDownOffsetY = ptr.clientY - bounds.top;
774 e.preventDefault();
775 e.stopPropagation();
776 UI.keepControlbar();
777 UI.activateControlbar();
778 },
779
780 toggleExpander(e) {
781 if (this.classList.contains("noVNC_open")) {

Callers

nothing calls this directly

Calls 2

getPointerEventFunction · 0.90
setCaptureFunction · 0.90

Tested by

no test coverage detected