Sha256: f1c726dd68a5050b8f20186e34faa36d899db235175837f04d4d7acf364645c2
Contents?: true
Size: 1.22 KB
Versions: 10
Compression:
Stored size: 1.22 KB
Contents
require.def("domplate/toolTip",["domplate/domplate","core/lib","core/trace"],function(d,a){with(d){var e=null;d=function(){this.element=null};d.prototype=domplate({tag:DIV({"class":"toolTip"},DIV()),show:function(c,b){e&&e.hide();this.target=c;this.addListeners();c=a.getBody(document);this.element=this.tag.append({options:b},c,this);b=a.getElementBox(this.target);this.element.style.top=b.top+b.height+"px";this.element.style.left=b.left+b.width+"px";this.element.style.display="block";e=this;return this.element}, hide:function(){if(this.element){this.removeListeners();this.element.parentNode.removeChild(this.element);e=this.element=null}},addListeners:function(){this.onMouseEvent=a.bind(this.onMouseEvent,this);$(document).bind("mousemove mouseover mousedown click mouseout",this.onMouseEvent,true)},removeListeners:function(){$(document).unbind("mousemove mouseover mousedown click mouseout",this.onMouseEvent,this,true)},onMouseEvent:function(c){var b=a.fixEvent(c);if(!a.getAncestorByClass(b.target,"toolTip")){var g= c.clientX,h=c.clientY,f=a.getElementBox(this.element);if(c.type!="click"&&c.type!="mousedown")f=a.inflateRect(f,10,10);a.pointInRect(f,g,h)||a.isAncestor(b.target,this.target)||this.hide();a.cancelEvent(b)}}});return d}});
Version data entries
10 entries across 10 versions & 1 rubygems