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

Method _shouldShowCursor

systemvm/agent/noVNC/core/util/cursor.js:206–225  ·  view source on GitHub ↗
(target)

Source from the content-addressed store, hash-verified

204 // (i.e. are we over the target, or a child of the target without a
205 // different cursor set)
206 _shouldShowCursor(target) {
207 if (!target) {
208 return false;
209 }
210 // Easy case
211 if (target === this._target) {
212 return true;
213 }
214 // Other part of the DOM?
215 if (!this._target.contains(target)) {
216 return false;
217 }
218 // Has the child its own cursor?
219 // FIXME: How can we tell that a sub element has an
220 // explicit "cursor: none;"?
221 if (window.getComputedStyle(target).cursor !== 'none') {
222 return false;
223 }
224 return true;
225 }
226
227 _updateVisibility(target) {
228 // When the cursor target has capture we want to show the cursor.

Callers 1

_updateVisibilityMethod · 0.95

Calls 1

containsMethod · 0.45

Tested by

no test coverage detected