Sha256: 9067437440ed8d0f2b3ac2a37698c5b5d6c7a66e383be3405603b8ed358773d6

Contents?: true

Size: 1.6 KB

Versions: 4

Compression:

Stored size: 1.6 KB

Contents

//>>built
define("dojox/drawing/ui/Tooltip",["dojo","../util/oo","../plugins/_Plugin","../manager/_registry"],function(_1,oo,_2,_3){
var _4=null;
var _5=oo.declare(_2,function(_6){
this.createDom();
},{show:function(_7,_8){
this.domNode.innerHTML=_8;
var dx=30;
var px=_7.data.x+_7.data.width;
var py=_7.data.y+_7.data.height;
var x=px+this.mouse.origin.x+dx;
var y=py+this.mouse.origin.y+dx;
_1.style(this.domNode,{display:"inline",left:x+"px",top:y+"px"});
var _9=_1.marginBox(this.domNode);
this.createShape(x-this.mouse.origin.x,y-this.mouse.origin.y,_9.w,_9.h);
},createShape:function(x,y,w,h){
this.balloon&&this.balloon.destroy();
var r=5,x2=x+w,y2=y+h,_a=[];
var _b=function(){
for(var i=0;i<arguments.length;i++){
_a.push(arguments[i]);
}
};
_b({x:x,y:y+5},{t:"Q",x:x,y:y},{x:x+r,y:y});
_b({t:"L",x:x2-r,y:y});
_b({t:"Q",x:x2,y:y},{x:x2,y:y+r});
_b({t:"L",x:x2,y:y2-r});
_b({t:"Q",x:x2,y:y2},{x:x2-r,y:y2});
_b({t:"L",x:x+r,y:y2});
_b({t:"Q",x:x,y:y2},{x:x,y:y2-r});
_b({t:"L",x:x,y:y+r});
this.balloon=this.drawing.addUI("path",{points:_a});
},createDom:function(){
this.domNode=_1.create("span",{"class":"drawingTooltip"},document.body);
_1.style(this.domNode,{display:"none",position:"absolute"});
}});
var _c=oo.declare(_2,function(_d){
if(!_4){
_4=new _5(_d);
}
if(_d.stencil){
}else{
if(this.button){
this.connect(this.button,"onOver",this,"onOver");
this.connect(this.button,"onOut",this,"onOut");
}
}
},{width:300,height:200,onOver:function(){
_4.show(this.button,this.data.text);
},onOut:function(){
}});
_1.setObject("dojox.drawing.ui.Tooltip",_c);
_3.register({name:"dojox.drawing.ui.Tooltip"},"stencil");
return _c;
});

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dojox-rails-0.14.0 vendor/assets/javascripts/dojox/drawing/ui/Tooltip.js
dojox-rails-0.13.0 vendor/assets/javascripts/dojox/drawing/ui/Tooltip.js
dojox-rails-0.12.0 vendor/assets/javascripts/dojox/drawing/ui/Tooltip.js
dojox-rails-0.11.0 vendor/assets/javascripts/drawing/ui/Tooltip.js