MCPcopy Create free account
hub / github.com/KDAB/codebrowser / applyTo

Function applyTo

data/codebrowser.js:912–925  ·  view source on GitHub ↗
(func)

Source from the content-addressed store, hash-verified

910 var elemWithTooltip;
911 var isTouchEvent = false;
912 function applyTo(func) { return function(e) {
913 if (!isTouchEvent || this === elemWithTooltip) {
914 return onMouseClick.apply(this, arguments);
915 } else {
916 isTouchEvent = false;
917 elemWithTooltip = this;
918 var oldDelay = tooltip.showDelay;
919 tooltip.showDelay = 1;
920 func.apply(this, arguments);
921 tooltip.showDelay = oldDelay;
922 e.preventDefault()
923 return false;
924 }
925 }; };
926 var code = $(".code");
927 code.on({"mouseenter": onMouseEnterRef, "mouseleave": onMouseLeave, "click": applyTo(onMouseEnterRef) },
928 "[data-ref], .macro");

Callers 2

codebrowser.jsFile · 0.85
refreshHistoryBoxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected