MCPcopy
hub / github.com/paperwm/PaperWM / isVisible

Method isVisible

tiling.js:829–841  ·  view source on GitHub ↗
(metaWindow, margin = 0)

Source from the content-addressed store, hash-verified

827
828 // Space.prototype.isVisible = function
829 isVisible(metaWindow, margin = 0) {
830 let clone = metaWindow.clone;
831 let x = clone.x + this.cloneContainer.x;
832 let workArea = this.workArea();
833 let min = workArea.x;
834
835 if (x - margin + clone.width < min ||
836 x + margin > min + workArea.width) {
837 return false;
838 } else {
839 return true;
840 }
841 }
842
843 isFullyVisible(metaWindow) {
844 let clone = metaWindow.clone;

Callers 3

ensuredXFunction · 0.80
ensureViewportFunction · 0.80
actionFunction · 0.80

Calls 1

workAreaMethod · 0.95

Tested by

no test coverage detected