Sha256: 2210410348004b532573b16af2de6e895d8949511365d0557075474d996ed96b
Contents?: true
Size: 1.61 KB
Versions: 10
Compression:
Stored size: 1.61 KB
Contents
require.def("domplate/infoTip",["domplate/domplate","core/lib","core/trace"],function(e,b){with(e){e=b.extend({listeners:[],maxWidth:100,maxHeight:80,infoTipMargin:10,infoTipWindowPadding:25,tags:domplate({infoTipTag:DIV({"class":"infoTip"})}),initialize:function(){if(!$.browser.msie){var a=$("body");a.bind("mouseover",b.bind(this.onMouseMove,this));a.bind("mouseout",b.bind(this.onMouseOut,this));a.bind("mousemove",b.bind(this.onMouseMove,this));return this.infoTip=this.tags.infoTipTag.append({}, b.getBody(document))}},showInfoTip:function(a,c,f,g,d,i){var h=b.getOverflowParent(c);if(b.dispatch2(this.listeners,"showInfoTip",[a,c,f+(h?h.scrollLeft:0),g,d,i])){d=a.ownerDocument.documentElement;c=d.clientWidth;d=d.clientHeight;if(f+a.offsetWidth+this.infoTipMargin>c-this.infoTipWindowPadding){a.style.left="auto";a.style.right=c-f+this.infoTipMargin+"px"}else{a.style.left=f+this.infoTipMargin+"px";a.style.right="auto"}a.style.top=g+a.offsetHeight+this.infoTipMargin>d?Math.max(0,d-(a.offsetHeight+ this.infoTipMargin))+"px":g+this.infoTipMargin+"px";a.style.bottom="auto";a.setAttribute("active","true")}else this.hideInfoTip(a)},hideInfoTip:function(a){a&&a.removeAttribute("active")},onMouseOut:function(a){a.relatedTarget||this.hideInfoTip(this.infoTip)},onMouseMove:function(a){this.infoTip.setAttribute("multiline",false);this.showInfoTip(this.infoTip,a.target,a.clientX,a.clientY,a.rangeParent,a.rangeOffset)},populateTimingInfoTip:function(a,c){this.tags.colorTag.replace({rgbValue:c},a);return true}, addListener:function(a){this.listeners.push(a)},removeListener:function(a){b.remove(this.listeners,a)}});e.initialize();return e}});
Version data entries
10 entries across 10 versions & 1 rubygems