a:88:{s:9:"#provides";s:24:"dojox.widget.FisheyeList";s:9:"#resource";s:21:"widget/FisheyeList.js";s:9:"#requires";a:4:{i:0;a:3:{i:0;s:6:"common";i:1;s:13:"dijit._Widget";i:2;s:5:"dijit";}i:1;a:3:{i:0;s:6:"common";i:1;s:16:"dijit._Templated";i:2;s:5:"dijit";}i:2;a:3:{i:0;s:6:"common";i:1;s:16:"dijit._Container";i:2;s:5:"dijit";}i:3;a:3:{i:0;s:6:"common";i:1;s:16:"dijit._Contained";i:2;s:5:"dijit";}}s:24:"dojox.widget.FisheyeList";a:7:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:13:"dijit._Widget";}s:4:"call";a:3:{i:0;s:13:"dijit._Widget";i:1;s:16:"dijit._Templated";i:2;s:16:"dijit._Container";}}s:6:"mixins";a:1:{s:9:"prototype";a:2:{i:0;s:26:"dijit._Templated.prototype";i:1;s:26:"dijit._Container.prototype";}}s:7:"summary";s:47:"Menu similar to the fish eye menu on the Mac OS";s:8:"examples";a:1:{i:0;s:426:"
...
";}s:6:"source";s:1169:"dojo.provide("dojox.widget.FisheyeList"); dojo.require("dijit._Widget"); dojo.require("dijit._Templated"); dojo.require("dijit._Container"); dojo.require("dijit._Contained"); dojo.declare("dojox.widget.FisheyeList", [dijit._Widget, dijit._Templated, dijit._Container], { // summary: // Menu similar to the fish eye menu on the Mac OS // example: // |
// | // |
// |
// | ... // |
// constructor: function(){ // // TODO // fix really long labels in vertical mode // this.pos = {'x': -1, 'y': -1}; // current cursor position, relative to the grid // for conservative trigger mode, when triggered, timerScale is gradually increased from 0 to 1 this.timerScale = 1.0;";s:9:"classlike";b:1;}s:29:"dojox.widget.FisheyeList.EDGE";a:3:{s:9:"prototype";s:24:"dojox.widget.FisheyeList";s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:39:"dojox.widget.FisheyeList.templateString";a:2:{s:9:"prototype";s:24:"dojox.widget.FisheyeList";s:7:"summary";s:0:"";}s:44:"dojox.widget.FisheyeList.snarfChildDomOutput";a:2:{s:9:"prototype";s:24:"dojox.widget.FisheyeList";s:7:"summary";s:0:"";}s:34:"dojox.widget.FisheyeList.itemWidth";a:3:{s:9:"prototype";s:24:"dojox.widget.FisheyeList";s:4:"type";s:7:"Integer";s:7:"summary";s:81:"width of menu item (in pixels) in it's dormant state (when the mouse is far away)";}s:35:"dojox.widget.FisheyeList.itemHeight";a:3:{s:9:"prototype";s:24:"dojox.widget.FisheyeList";s:4:"type";s:7:"Integer";s:7:"summary";s:82:"height of menu item (in pixels) in it's dormant state (when the mouse is far away)";}s:37:"dojox.widget.FisheyeList.itemMaxWidth";a:3:{s:9:"prototype";s:24:"dojox.widget.FisheyeList";s:4:"type";s:7:"Integer";s:7:"summary";s:96:"width of menu item (in pixels) in it's fully enlarged state (when the mouse is directly over it)";}s:38:"dojox.widget.FisheyeList.itemMaxHeight";a:3:{s:9:"prototype";s:24:"dojox.widget.FisheyeList";s:4:"type";s:7:"Integer";s:7:"summary";s:97:"height of menu item (in pixels) in it's fully enlarged state (when the mouse is directly over it)";}s:32:"dojox.widget.FisheyeList.imgNode";a:2:{s:9:"prototype";s:24:"dojox.widget.FisheyeList";s:7:"summary";s:0:"";}s:36:"dojox.widget.FisheyeList.orientation";a:3:{s:9:"prototype";s:24:"dojox.widget.FisheyeList";s:4:"type";s:6:"String";s:7:"summary";s:78:"orientation of the menu, either "horizontal" or "vertical"";}s:32:"dojox.widget.FisheyeList.isFixed";a:3:{s:9:"prototype";s:24:"dojox.widget.FisheyeList";s:4:"type";s:7:"Boolean";s:7:"summary";s:89:"toggle to enable additional listener (window scroll) if FisheyeList is in a fixed postion";}s:44:"dojox.widget.FisheyeList.conservativeTrigger";a:3:{s:9:"prototype";s:24:"dojox.widget.FisheyeList";s:4:"type";s:7:"Boolean";s:7:"summary";s:138:"if true, don't start enlarging menu items until mouse is over an image; if false, start enlarging menu items as the mouse moves near them.";}s:36:"dojox.widget.FisheyeList.effectUnits";a:3:{s:9:"prototype";s:24:"dojox.widget.FisheyeList";s:4:"type";s:6:"Number";s:7:"summary";s:94:"controls how much reaction the menu makes, relative to the distance of the mouse from the menu";}s:36:"dojox.widget.FisheyeList.itemPadding";a:3:{s:9:"prototype";s:24:"dojox.widget.FisheyeList";s:4:"type";s:7:"Integer";s:7:"summary";s:43:"padding (in pixels) betweeen each menu item";}s:35:"dojox.widget.FisheyeList.attachEdge";a:3:{s:9:"prototype";s:24:"dojox.widget.FisheyeList";s:4:"type";s:6:"String";s:7:"summary";s:255:"controls the border that the menu items don't expand past; for example, if set to "top", then the menu items will drop downwards as they expand. values "center", "left", "right", "top", "bottom".";}s:34:"dojox.widget.FisheyeList.labelEdge";a:4:{s:9:"prototype";s:24:"dojox.widget.FisheyeList";s:8:"instance";s:24:"dojox.widget.FisheyeList";s:4:"type";s:6:"String";s:7:"summary";s:168:"controls were the labels show up in relation to the menu item icons values "center", "left", "right", "top", "bottom".";}s:35:"dojox.widget.FisheyeList.postCreate";a:4:{s:9:"prototype";s:24:"dojox.widget.FisheyeList";s:4:"type";s:8:"Function";s:6:"source";s:1793:" var e = this.EDGE; dojo.setSelectable(this.domNode, false); var isHorizontal = this.isHorizontal = (this.orientation == 'horizontal'); this.selectedNode = -1; this.isOver = false; this.hitX1 = -1; this.hitY1 = -1; this.hitX2 = -1; this.hitY2 = -1; // // only some edges make sense... // this.anchorEdge = this._toEdge(this.attachEdge, e.CENTER); this.labelEdge = this._toEdge(this.labelEdge, e.TOP); if(this.labelEdge == e.CENTER){ this.labelEdge = e.TOP; } if(isHorizontal){ if(this.anchorEdge == e.LEFT){ this.anchorEdge = e.CENTER; } if(this.anchorEdge == e.RIGHT){ this.anchorEdge = e.CENTER; } if(this.labelEdge == e.LEFT){ this.labelEdge = e.TOP; } if(this.labelEdge == e.RIGHT){ this.labelEdge = e.TOP; } }else{ if(this.anchorEdge == e.TOP){ this.anchorEdge = e.CENTER; } if(this.anchorEdge == e.BOTTOM){ this.anchorEdge = e.CENTER; } if(this.labelEdge == e.TOP){ this.labelEdge = e.LEFT; } if(this.labelEdge == e.BOTTOM){ this.labelEdge = e.LEFT; } } // // figure out the proximity size // var effectUnits = this.effectUnits; this.proximityLeft = this.itemWidth * (effectUnits - 0.5); this.proximityRight = this.itemWidth * (effectUnits - 0.5); this.proximityTop = this.itemHeight * (effectUnits - 0.5); this.proximityBottom = this.itemHeight * (effectUnits - 0.5); if(this.anchorEdge == e.LEFT){ this.proximityLeft = 0; } if(this.anchorEdge == e.RIGHT){ this.proximityRight = 0; } if(this.anchorEdge == e.TOP){ this.proximityTop = 0; } if(this.anchorEdge == e.BOTTOM){ this.proximityBottom = 0; } if(this.anchorEdge == e.CENTER){ this.proximityLeft /= 2; this.proximityRight /= 2; this.proximityTop /= 2; this.proximityBottom /= 2; }";s:7:"summary";s:0:"";}s:32:"dojox.widget.FisheyeList.startup";a:4:{s:9:"prototype";s:24:"dojox.widget.FisheyeList";s:4:"type";s:8:"Function";s:6:"source";s:790:" this.children = this.getChildren(); //original postCreate() --tk this._initializePositioning(); // // in liberal trigger mode, activate menu whenever mouse is close // if(!this.conservativeTrigger){ this._onMouseMoveHandle = dojo.connect(document.documentElement, "onmousemove", this, "_onMouseMove"); } if (this.isFixed){ this._onScrollHandle = dojo.connect(document,"onscroll",this,"_onScroll"); } // Deactivate the menu if mouse is moved off screen (doesn't work for FF?) this._onMouseOutHandle = dojo.connect(document.documentElement, "onmouseout", this, "_onBodyOut"); this._addChildHandle = dojo.connect(this, "addChild", this, "_initializePositioning"); this._onResizeHandle = dojo.connect(window,"onresize", this, "_initializePositioning");";s:7:"summary";s:48:"create our connections and setup our FisheyeList";}s:47:"dojox.widget.FisheyeList._initializePositioning";a:5:{s:9:"prototype";s:24:"dojox.widget.FisheyeList";s:4:"type";s:8:"Function";s:6:"source";s:2241:" this.itemCount = this.children.length; this.barWidth = (this.isHorizontal ? this.itemCount : 1) * this.itemWidth; this.barHeight = (this.isHorizontal ? 1 : this.itemCount) * this.itemHeight; this.totalWidth = this.proximityLeft + this.proximityRight + this.barWidth; this.totalHeight = this.proximityTop + this.proximityBottom + this.barHeight; // // calculate effect ranges for each item // for(var i=0; i c+lhs){ range_lhs = c+lhs; } if(range_rhs > (siz-c+rhs)){ range_rhs = siz-c+rhs; } this.children[i].effectRangeLeft = range_lhs / isz; this.children[i].effectRangeRght = range_rhs / isz; //dojo.debug('effect range for '+i+' is '+range_lhs+'/'+range_rhs); } // // create the bar // this.domNode.style.width = this.barWidth + 'px'; this.domNode.style.height = this.barHeight + 'px'; // // position the items // for(var i=0; i= left && mouse.x <= right && mouse.y >= top && mouse.y <= bottom ); // boolean";s:7:"summary";s:111:"Returns whether the mouse is over the passed element. Node: Must must be display:block (ie, not a <span>)";s:7:"private";b:1;}s:35:"dojox.widget.FisheyeList._onBodyOut";a:6:{s:9:"prototype";s:24:"dojox.widget.FisheyeList";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:5:"Event";}}s:6:"source";s:8855:"dojo.provide("dojox.widget.FisheyeList"); dojo.require("dijit._Widget"); dojo.require("dijit._Templated"); dojo.require("dijit._Container"); dojo.require("dijit._Contained"); dojo.declare("dojox.widget.FisheyeList", [dijit._Widget, dijit._Templated, dijit._Container], { // summary: // Menu similar to the fish eye menu on the Mac OS // example: // |
// | // |
// |
// | ... // |
// constructor: function(){ // // TODO // fix really long labels in vertical mode // this.pos = {'x': -1, 'y': -1}; // current cursor position, relative to the grid // for conservative trigger mode, when triggered, timerScale is gradually increased from 0 to 1 this.timerScale = 1.0; }, EDGE: { CENTER: 0, LEFT: 1, RIGHT: 2, TOP: 3, BOTTOM: 4 }, templateString: '
', snarfChildDomOutput: true, // itemWidth: Integer // width of menu item (in pixels) in it's dormant state (when the mouse is far away) itemWidth: 40, // itemHeight: Integer // height of menu item (in pixels) in it's dormant state (when the mouse is far away) itemHeight: 40, // itemMaxWidth: Integer // width of menu item (in pixels) in it's fully enlarged state (when the mouse is directly over it) itemMaxWidth: 150, // itemMaxHeight: Integer // height of menu item (in pixels) in it's fully enlarged state (when the mouse is directly over it) itemMaxHeight: 150, imgNode: null, // orientation: String // orientation of the menu, either "horizontal" or "vertical" orientation: 'horizontal', // isFixed: Boolean // toggle to enable additional listener (window scroll) if FisheyeList is in a fixed postion isFixed: false, // conservativeTrigger: Boolean // if true, don't start enlarging menu items until mouse is over an image; // if false, start enlarging menu items as the mouse moves near them. conservativeTrigger: false, // effectUnits: Number // controls how much reaction the menu makes, relative to the distance of the mouse from the menu effectUnits: 2, // itemPadding: Integer // padding (in pixels) betweeen each menu item itemPadding: 10, // attachEdge: String // controls the border that the menu items don't expand past; // for example, if set to "top", then the menu items will drop downwards as they expand. // values // "center", "left", "right", "top", "bottom". attachEdge: 'center', // labelEdge: String // controls were the labels show up in relation to the menu item icons // values // "center", "left", "right", "top", "bottom". labelEdge: 'bottom', postCreate: function(){ var e = this.EDGE; dojo.setSelectable(this.domNode, false); var isHorizontal = this.isHorizontal = (this.orientation == 'horizontal'); this.selectedNode = -1; this.isOver = false; this.hitX1 = -1; this.hitY1 = -1; this.hitX2 = -1; this.hitY2 = -1; // // only some edges make sense... // this.anchorEdge = this._toEdge(this.attachEdge, e.CENTER); this.labelEdge = this._toEdge(this.labelEdge, e.TOP); if(this.labelEdge == e.CENTER){ this.labelEdge = e.TOP; } if(isHorizontal){ if(this.anchorEdge == e.LEFT){ this.anchorEdge = e.CENTER; } if(this.anchorEdge == e.RIGHT){ this.anchorEdge = e.CENTER; } if(this.labelEdge == e.LEFT){ this.labelEdge = e.TOP; } if(this.labelEdge == e.RIGHT){ this.labelEdge = e.TOP; } }else{ if(this.anchorEdge == e.TOP){ this.anchorEdge = e.CENTER; } if(this.anchorEdge == e.BOTTOM){ this.anchorEdge = e.CENTER; } if(this.labelEdge == e.TOP){ this.labelEdge = e.LEFT; } if(this.labelEdge == e.BOTTOM){ this.labelEdge = e.LEFT; } } // // figure out the proximity size // var effectUnits = this.effectUnits; this.proximityLeft = this.itemWidth * (effectUnits - 0.5); this.proximityRight = this.itemWidth * (effectUnits - 0.5); this.proximityTop = this.itemHeight * (effectUnits - 0.5); this.proximityBottom = this.itemHeight * (effectUnits - 0.5); if(this.anchorEdge == e.LEFT){ this.proximityLeft = 0; } if(this.anchorEdge == e.RIGHT){ this.proximityRight = 0; } if(this.anchorEdge == e.TOP){ this.proximityTop = 0; } if(this.anchorEdge == e.BOTTOM){ this.proximityBottom = 0; } if(this.anchorEdge == e.CENTER){ this.proximityLeft /= 2; this.proximityRight /= 2; this.proximityTop /= 2; this.proximityBottom /= 2; } }, startup: function(){ // summary: create our connections and setup our FisheyeList this.children = this.getChildren(); //original postCreate() --tk this._initializePositioning(); // // in liberal trigger mode, activate menu whenever mouse is close // if(!this.conservativeTrigger){ this._onMouseMoveHandle = dojo.connect(document.documentElement, "onmousemove", this, "_onMouseMove"); } if (this.isFixed){ this._onScrollHandle = dojo.connect(document,"onscroll",this,"_onScroll"); } // Deactivate the menu if mouse is moved off screen (doesn't work for FF?) this._onMouseOutHandle = dojo.connect(document.documentElement, "onmouseout", this, "_onBodyOut"); this._addChildHandle = dojo.connect(this, "addChild", this, "_initializePositioning"); this._onResizeHandle = dojo.connect(window,"onresize", this, "_initializePositioning"); }, _initializePositioning: function(){ this.itemCount = this.children.length; this.barWidth = (this.isHorizontal ? this.itemCount : 1) * this.itemWidth; this.barHeight = (this.isHorizontal ? 1 : this.itemCount) * this.itemHeight; this.totalWidth = this.proximityLeft + this.proximityRight + this.barWidth; this.totalHeight = this.proximityTop + this.proximityBottom + this.barHeight; // // calculate effect ranges for each item // for(var i=0; i c+lhs){ range_lhs = c+lhs; } if(range_rhs > (siz-c+rhs)){ range_rhs = siz-c+rhs; } this.children[i].effectRangeLeft = range_lhs / isz; this.children[i].effectRangeRght = range_rhs / isz; //dojo.debug('effect range for '+i+' is '+range_lhs+'/'+range_rhs); } // // create the bar // this.domNode.style.width = this.barWidth + 'px'; this.domNode.style.height = this.barHeight + 'px'; // // position the items // for(var i=0; i) node = dojo.byId(node); var mouse = {x: e.pageX, y: e.pageY}; var bb = dojo._getBorderBox(node); var absolute = dojo.coords(node, true); var top = absolute.y; var bottom = top + bb.h; var left = absolute.x; var right = left + bb.w; return (mouse.x >= left && mouse.x <= right && mouse.y >= top && mouse.y <= bottom ); // boolean }, _onBodyOut: function(/*Event*/ e){ // clicking over an object inside of body causes this event to fire; ignore that case if( this._overElement(dojo.body(), e) ){ return; } this._setDormant(e);";s:7:"private";b:1;s:7:"summary";s:0:"";}s:36:"dojox.widget.FisheyeList._setDormant";a:7:{s:9:"prototype";s:24:"dojox.widget.FisheyeList";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:5:"Event";}}s:6:"source";s:275:" if(!this.isOver){ return; } // already dormant? this.isOver = false; if(this.conservativeTrigger){ // user can't re-trigger the menu expansion // until he mouses over a icon again dojo.disconnect(this._onMouseMoveHandle); } this._onGridMouseMove(-1, -1);";s:7:"summary";s:43:"called when mouse moves out of menu's range";s:7:"returns";s:16:"already dormant?";s:7:"private";b:1;}s:35:"dojox.widget.FisheyeList._setActive";a:7:{s:9:"prototype";s:24:"dojox.widget.FisheyeList";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:5:"Event";}}s:6:"source";s:520:" if(this.isOver){ return; } // already activated? this.isOver = true; if(this.conservativeTrigger){ // switch event handlers so that we handle mouse events from anywhere near // the menu this._onMouseMoveHandle = dojo.connect(document.documentElement, "onmousemove", this, "_onMouseMove"); this.timerScale=0.0; // call mouse handler to do some initial necessary calculations/positioning this._onMouseMove(e); // slowly expand the icon size so it isn't jumpy this._expandSlowly(); }";s:7:"summary";s:44:"called when mouse is moved into menu's range";s:7:"returns";s:18:"already activated?";s:7:"private";b:1;}s:37:"dojox.widget.FisheyeList._onMouseMove";a:6:{s:9:"prototype";s:24:"dojox.widget.FisheyeList";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:5:"Event";}}s:6:"source";s:295:" if( (e.pageX >= this.hitX1) && (e.pageX <= this.hitX2) && (e.pageY >= this.hitY1) && (e.pageY <= this.hitY2) ){ if(!this.isOver){ this._setActive(e); } this._onGridMouseMove(e.pageX-this.hitX1, e.pageY-this.hitY1); }else{ if(this.isOver){ this._setDormant(e); } }";s:7:"summary";s:26:"called when mouse is moved";s:7:"private";b:1;}s:34:"dojox.widget.FisheyeList._onScroll";a:5:{s:9:"prototype";s:24:"dojox.widget.FisheyeList";s:4:"type";s:8:"Function";s:6:"source";s:23:" this._calcHitGrid(); ";s:7:"private";b:1;s:7:"summary";s:0:"";}s:34:"dojox.widget.FisheyeList.onResized";a:4:{s:9:"prototype";s:24:"dojox.widget.FisheyeList";s:4:"type";s:8:"Function";s:6:"source";s:22:" this._calcHitGrid();";s:7:"summary";s:0:"";}s:41:"dojox.widget.FisheyeList._onGridMouseMove";a:6:{s:9:"prototype";s:24:"dojox.widget.FisheyeList";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:1:"x";a:1:{s:4:"type";s:0:"";}s:1:"y";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:41:" this.pos = {x:x, y:y}; this._paint();";s:7:"summary";s:54:"called when mouse is moved in the vicinity of the menu";s:7:"private";b:1;}s:31:"dojox.widget.FisheyeList._paint";a:5:{s:9:"prototype";s:24:"dojox.widget.FisheyeList";s:4:"type";s:8:"Function";s:6:"source";s:2334:" var x=this.pos.x; var y=this.pos.y; if(this.itemCount <= 0){ return; } // // figure out our main index // var pos = this.isHorizontal ? x : y; var prx = this.isHorizontal ? this.proximityLeft : this.proximityTop; var siz = this.isHorizontal ? this.itemWidth : this.itemHeight; var sim = this.isHorizontal ? (1.0-this.timerScale)*this.itemWidth + this.timerScale*this.itemMaxWidth : (1.0-this.timerScale)*this.itemHeight + this.timerScale*this.itemMaxHeight ; var cen = ((pos - prx) / siz) - 0.5; var max_off_cen = (sim / siz) - 0.5; if(max_off_cen > this.effectUnits){ max_off_cen = this.effectUnits; } // // figure out our off-axis weighting // var off_weight = 0; if(this.anchorEdge == this.EDGE.BOTTOM){ var cen2 = (y - this.proximityTop) / this.itemHeight; off_weight = (cen2 > 0.5) ? 1 : y / (this.proximityTop + (this.itemHeight / 2)); } if(this.anchorEdge == this.EDGE.TOP){ var cen2 = (y - this.proximityTop) / this.itemHeight; off_weight = (cen2 < 0.5) ? 1 : (this.totalHeight - y) / (this.proximityBottom + (this.itemHeight / 2)); } if(this.anchorEdge == this.EDGE.RIGHT){ var cen2 = (x - this.proximityLeft) / this.itemWidth; off_weight = (cen2 > 0.5) ? 1 : x / (this.proximityLeft + (this.itemWidth / 2)); } if(this.anchorEdge == this.EDGE.LEFT){ var cen2 = (x - this.proximityLeft) / this.itemWidth; off_weight = (cen2 < 0.5) ? 1 : (this.totalWidth - x) / (this.proximityRight + (this.itemWidth / 2)); } if(this.anchorEdge == this.EDGE.CENTER){ if(this.isHorizontal){ off_weight = y / (this.totalHeight); }else{ off_weight = x / (this.totalWidth); } if(off_weight > 0.5){ off_weight = 1 - off_weight; } off_weight *= 2; } // // set the sizes // for(var i=0; i this.itemCount - 1){ main_p = this.itemCount -1; }else{ offset = (cen - main_p) * ((this.isHorizontal ? this.itemWidth : this.itemHeight) - this.children[main_p].sizeMain); } this._positionElementsFrom(main_p, offset);";s:7:"private";b:1;s:7:"summary";s:0:"";}s:33:"dojox.widget.FisheyeList._weighAt";a:7:{s:9:"prototype";s:24:"dojox.widget.FisheyeList";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:3:"cen";a:1:{s:4:"type";s:7:"Integer";}s:1:"i";a:1:{s:4:"type";s:7:"Integer";}}s:6:"source";s:193:" var dist = Math.abs(cen - i); var limit = ((cen - i) > 0) ? this.children[i].effectRangeRght : this.children[i].effectRangeLeft; return (dist > limit) ? 0 : (1 - dist / limit); // Integer";s:7:"returns";s:7:"Integer";s:7:"private";b:1;s:7:"summary";s:0:"";}s:37:"dojox.widget.FisheyeList._setItemSize";a:6:{s:9:"prototype";s:24:"dojox.widget.FisheyeList";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:1:"p";a:1:{s:4:"type";s:0:"";}s:5:"scale";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:1670:" scale *= this.timerScale; var w = Math.round(this.itemWidth + ((this.itemMaxWidth - this.itemWidth ) * scale)); var h = Math.round(this.itemHeight + ((this.itemMaxHeight - this.itemHeight) * scale)); if(this.isHorizontal){ this.children[p].sizeW = w; this.children[p].sizeH = h; this.children[p].sizeMain = w; this.children[p].sizeOff = h; var y = 0; if(this.anchorEdge == this.EDGE.TOP){ y = (this.children[p].cenY - (this.itemHeight / 2)); }else if(this.anchorEdge == this.EDGE.BOTTOM){ y = (this.children[p].cenY - (h - (this.itemHeight / 2))); }else{ y = (this.children[p].cenY - (h / 2)); } this.children[p].usualX = Math.round(this.children[p].cenX - (w / 2)); this.children[p].domNode.style.top = y + 'px'; this.children[p].domNode.style.left = this.children[p].usualX + 'px'; }else{ this.children[p].sizeW = w; this.children[p].sizeH = h; this.children[p].sizeOff = w; this.children[p].sizeMain = h; var x = 0; if(this.anchorEdge == this.EDGE.LEFT){ x = this.children[p].cenX - (this.itemWidth / 2); }else if (this.anchorEdge == this.EDGE.RIGHT){ x = this.children[p].cenX - (w - (this.itemWidth / 2)); }else{ x = this.children[p].cenX - (w / 2); } this.children[p].domNode.style.left = x + 'px'; this.children[p].usualY = Math.round(this.children[p].cenY - (h / 2)); this.children[p].domNode.style.top = this.children[p].usualY + 'px'; } this.children[p].domNode.style.width = w + 'px'; this.children[p].domNode.style.height = h + 'px'; if(this.children[p].svgNode){ this.children[p].svgNode.setSize(w, h); }";s:7:"private";b:1;s:7:"summary";s:0:"";}s:46:"dojox.widget.FisheyeList._positionElementsFrom";a:6:{s:9:"prototype";s:24:"dojox.widget.FisheyeList";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:1:"p";a:1:{s:4:"type";s:0:"";}s:6:"offset";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:934:" var pos = 0; if(this.isHorizontal){ pos = Math.round(this.children[p].usualX + offset); this.children[p].domNode.style.left = pos + 'px'; }else{ pos = Math.round(this.children[p].usualY + offset); this.children[p].domNode.style.top = pos + 'px'; } this._positionLabel(this.children[p]); // position before var bpos = pos; for(var i=p-1; i>=0; i--){ bpos -= this.children[i].sizeMain; if (this.isHorizontal){ this.children[i].domNode.style.left = bpos + 'px'; }else{ this.children[i].domNode.style.top = bpos + 'px'; } this._positionLabel(this.children[i]); } // position after var apos = pos; for(var i=p+1; i // | // |
// |
// | ... // | // constructor: function(){ // // TODO // fix really long labels in vertical mode // this.pos = {'x': -1, 'y': -1}; // current cursor position, relative to the grid // for conservative trigger mode, when triggered, timerScale is gradually increased from 0 to 1 this.timerScale = 1.0; }, EDGE: { CENTER: 0, LEFT: 1, RIGHT: 2, TOP: 3, BOTTOM: 4 }, templateString: '
', snarfChildDomOutput: true, // itemWidth: Integer // width of menu item (in pixels) in it's dormant state (when the mouse is far away) itemWidth: 40, // itemHeight: Integer // height of menu item (in pixels) in it's dormant state (when the mouse is far away) itemHeight: 40, // itemMaxWidth: Integer // width of menu item (in pixels) in it's fully enlarged state (when the mouse is directly over it) itemMaxWidth: 150, // itemMaxHeight: Integer // height of menu item (in pixels) in it's fully enlarged state (when the mouse is directly over it) itemMaxHeight: 150, imgNode: null, // orientation: String // orientation of the menu, either "horizontal" or "vertical" orientation: 'horizontal', // isFixed: Boolean // toggle to enable additional listener (window scroll) if FisheyeList is in a fixed postion isFixed: false, // conservativeTrigger: Boolean // if true, don't start enlarging menu items until mouse is over an image; // if false, start enlarging menu items as the mouse moves near them. conservativeTrigger: false, // effectUnits: Number // controls how much reaction the menu makes, relative to the distance of the mouse from the menu effectUnits: 2, // itemPadding: Integer // padding (in pixels) betweeen each menu item itemPadding: 10, // attachEdge: String // controls the border that the menu items don't expand past; // for example, if set to "top", then the menu items will drop downwards as they expand. // values // "center", "left", "right", "top", "bottom". attachEdge: 'center', // labelEdge: String // controls were the labels show up in relation to the menu item icons // values // "center", "left", "right", "top", "bottom". labelEdge: 'bottom', postCreate: function(){ var e = this.EDGE; dojo.setSelectable(this.domNode, false); var isHorizontal = this.isHorizontal = (this.orientation == 'horizontal'); this.selectedNode = -1; this.isOver = false; this.hitX1 = -1; this.hitY1 = -1; this.hitX2 = -1; this.hitY2 = -1; // // only some edges make sense... // this.anchorEdge = this._toEdge(this.attachEdge, e.CENTER); this.labelEdge = this._toEdge(this.labelEdge, e.TOP); if(this.labelEdge == e.CENTER){ this.labelEdge = e.TOP; } if(isHorizontal){ if(this.anchorEdge == e.LEFT){ this.anchorEdge = e.CENTER; } if(this.anchorEdge == e.RIGHT){ this.anchorEdge = e.CENTER; } if(this.labelEdge == e.LEFT){ this.labelEdge = e.TOP; } if(this.labelEdge == e.RIGHT){ this.labelEdge = e.TOP; } }else{ if(this.anchorEdge == e.TOP){ this.anchorEdge = e.CENTER; } if(this.anchorEdge == e.BOTTOM){ this.anchorEdge = e.CENTER; } if(this.labelEdge == e.TOP){ this.labelEdge = e.LEFT; } if(this.labelEdge == e.BOTTOM){ this.labelEdge = e.LEFT; } } // // figure out the proximity size // var effectUnits = this.effectUnits; this.proximityLeft = this.itemWidth * (effectUnits - 0.5); this.proximityRight = this.itemWidth * (effectUnits - 0.5); this.proximityTop = this.itemHeight * (effectUnits - 0.5); this.proximityBottom = this.itemHeight * (effectUnits - 0.5); if(this.anchorEdge == e.LEFT){ this.proximityLeft = 0; } if(this.anchorEdge == e.RIGHT){ this.proximityRight = 0; } if(this.anchorEdge == e.TOP){ this.proximityTop = 0; } if(this.anchorEdge == e.BOTTOM){ this.proximityBottom = 0; } if(this.anchorEdge == e.CENTER){ this.proximityLeft /= 2; this.proximityRight /= 2; this.proximityTop /= 2; this.proximityBottom /= 2; } }, startup: function(){ // summary: create our connections and setup our FisheyeList this.children = this.getChildren(); //original postCreate() --tk this._initializePositioning(); // // in liberal trigger mode, activate menu whenever mouse is close // if(!this.conservativeTrigger){ this._onMouseMoveHandle = dojo.connect(document.documentElement, "onmousemove", this, "_onMouseMove"); } if (this.isFixed){ this._onScrollHandle = dojo.connect(document,"onscroll",this,"_onScroll"); } // Deactivate the menu if mouse is moved off screen (doesn't work for FF?) this._onMouseOutHandle = dojo.connect(document.documentElement, "onmouseout", this, "_onBodyOut"); this._addChildHandle = dojo.connect(this, "addChild", this, "_initializePositioning"); this._onResizeHandle = dojo.connect(window,"onresize", this, "_initializePositioning"); }, _initializePositioning: function(){ this.itemCount = this.children.length; this.barWidth = (this.isHorizontal ? this.itemCount : 1) * this.itemWidth; this.barHeight = (this.isHorizontal ? 1 : this.itemCount) * this.itemHeight; this.totalWidth = this.proximityLeft + this.proximityRight + this.barWidth; this.totalHeight = this.proximityTop + this.proximityBottom + this.barHeight; // // calculate effect ranges for each item // for(var i=0; i c+lhs){ range_lhs = c+lhs; } if(range_rhs > (siz-c+rhs)){ range_rhs = siz-c+rhs; } this.children[i].effectRangeLeft = range_lhs / isz; this.children[i].effectRangeRght = range_rhs / isz; //dojo.debug('effect range for '+i+' is '+range_lhs+'/'+range_rhs); } // // create the bar // this.domNode.style.width = this.barWidth + 'px'; this.domNode.style.height = this.barHeight + 'px'; // // position the items // for(var i=0; i) node = dojo.byId(node); var mouse = {x: e.pageX, y: e.pageY}; var bb = dojo._getBorderBox(node); var absolute = dojo.coords(node, true); var top = absolute.y; var bottom = top + bb.h; var left = absolute.x; var right = left + bb.w; return (mouse.x >= left && mouse.x <= right && mouse.y >= top && mouse.y <= bottom ); // boolean }, _onBodyOut: function(/*Event*/ e){ // clicking over an object inside of body causes this event to fire; ignore that case if( this._overElement(dojo.body(), e) ){ return; } this._setDormant(e); }, _setDormant: function(/*Event*/ e){ // summary: called when mouse moves out of menu's range if(!this.isOver){ return; } // already dormant? this.isOver = false; if(this.conservativeTrigger){ // user can't re-trigger the menu expansion // until he mouses over a icon again dojo.disconnect(this._onMouseMoveHandle); } this._onGridMouseMove(-1, -1); }, _setActive: function(/*Event*/ e){ // summary: called when mouse is moved into menu's range if(this.isOver){ return; } // already activated? this.isOver = true; if(this.conservativeTrigger){ // switch event handlers so that we handle mouse events from anywhere near // the menu this._onMouseMoveHandle = dojo.connect(document.documentElement, "onmousemove", this, "_onMouseMove"); this.timerScale=0.0; // call mouse handler to do some initial necessary calculations/positioning this._onMouseMove(e); // slowly expand the icon size so it isn't jumpy this._expandSlowly(); } }, _onMouseMove: function(/*Event*/ e){ // summary: called when mouse is moved if( (e.pageX >= this.hitX1) && (e.pageX <= this.hitX2) && (e.pageY >= this.hitY1) && (e.pageY <= this.hitY2) ){ if(!this.isOver){ this._setActive(e); } this._onGridMouseMove(e.pageX-this.hitX1, e.pageY-this.hitY1); }else{ if(this.isOver){ this._setDormant(e); } } }, _onScroll: function(){ this._calcHitGrid(); }, onResized: function(){ this._calcHitGrid(); }, _onGridMouseMove: function(x, y){ // summary: called when mouse is moved in the vicinity of the menu this.pos = {x:x, y:y}; this._paint(); }, _paint: function(){ var x=this.pos.x; var y=this.pos.y; if(this.itemCount <= 0){ return; } // // figure out our main index // var pos = this.isHorizontal ? x : y; var prx = this.isHorizontal ? this.proximityLeft : this.proximityTop; var siz = this.isHorizontal ? this.itemWidth : this.itemHeight; var sim = this.isHorizontal ? (1.0-this.timerScale)*this.itemWidth + this.timerScale*this.itemMaxWidth : (1.0-this.timerScale)*this.itemHeight + this.timerScale*this.itemMaxHeight ; var cen = ((pos - prx) / siz) - 0.5; var max_off_cen = (sim / siz) - 0.5; if(max_off_cen > this.effectUnits){ max_off_cen = this.effectUnits; } // // figure out our off-axis weighting // var off_weight = 0; if(this.anchorEdge == this.EDGE.BOTTOM){ var cen2 = (y - this.proximityTop) / this.itemHeight; off_weight = (cen2 > 0.5) ? 1 : y / (this.proximityTop + (this.itemHeight / 2)); } if(this.anchorEdge == this.EDGE.TOP){ var cen2 = (y - this.proximityTop) / this.itemHeight; off_weight = (cen2 < 0.5) ? 1 : (this.totalHeight - y) / (this.proximityBottom + (this.itemHeight / 2)); } if(this.anchorEdge == this.EDGE.RIGHT){ var cen2 = (x - this.proximityLeft) / this.itemWidth; off_weight = (cen2 > 0.5) ? 1 : x / (this.proximityLeft + (this.itemWidth / 2)); } if(this.anchorEdge == this.EDGE.LEFT){ var cen2 = (x - this.proximityLeft) / this.itemWidth; off_weight = (cen2 < 0.5) ? 1 : (this.totalWidth - x) / (this.proximityRight + (this.itemWidth / 2)); } if(this.anchorEdge == this.EDGE.CENTER){ if(this.isHorizontal){ off_weight = y / (this.totalHeight); }else{ off_weight = x / (this.totalWidth); } if(off_weight > 0.5){ off_weight = 1 - off_weight; } off_weight *= 2; } // // set the sizes // for(var i=0; i this.itemCount - 1){ main_p = this.itemCount -1; }else{ offset = (cen - main_p) * ((this.isHorizontal ? this.itemWidth : this.itemHeight) - this.children[main_p].sizeMain); } this._positionElementsFrom(main_p, offset); }, _weighAt: function(/*Integer*/ cen, /*Integer*/ i){ var dist = Math.abs(cen - i); var limit = ((cen - i) > 0) ? this.children[i].effectRangeRght : this.children[i].effectRangeLeft; return (dist > limit) ? 0 : (1 - dist / limit); // Integer }, _setItemSize: function(p, scale){ scale *= this.timerScale; var w = Math.round(this.itemWidth + ((this.itemMaxWidth - this.itemWidth ) * scale)); var h = Math.round(this.itemHeight + ((this.itemMaxHeight - this.itemHeight) * scale)); if(this.isHorizontal){ this.children[p].sizeW = w; this.children[p].sizeH = h; this.children[p].sizeMain = w; this.children[p].sizeOff = h; var y = 0; if(this.anchorEdge == this.EDGE.TOP){ y = (this.children[p].cenY - (this.itemHeight / 2)); }else if(this.anchorEdge == this.EDGE.BOTTOM){ y = (this.children[p].cenY - (h - (this.itemHeight / 2))); }else{ y = (this.children[p].cenY - (h / 2)); } this.children[p].usualX = Math.round(this.children[p].cenX - (w / 2)); this.children[p].domNode.style.top = y + 'px'; this.children[p].domNode.style.left = this.children[p].usualX + 'px'; }else{ this.children[p].sizeW = w; this.children[p].sizeH = h; this.children[p].sizeOff = w; this.children[p].sizeMain = h; var x = 0; if(this.anchorEdge == this.EDGE.LEFT){ x = this.children[p].cenX - (this.itemWidth / 2); }else if (this.anchorEdge == this.EDGE.RIGHT){ x = this.children[p].cenX - (w - (this.itemWidth / 2)); }else{ x = this.children[p].cenX - (w / 2); } this.children[p].domNode.style.left = x + 'px'; this.children[p].usualY = Math.round(this.children[p].cenY - (h / 2)); this.children[p].domNode.style.top = this.children[p].usualY + 'px'; } this.children[p].domNode.style.width = w + 'px'; this.children[p].domNode.style.height = h + 'px'; if(this.children[p].svgNode){ this.children[p].svgNode.setSize(w, h); } }, _positionElementsFrom: function(p, offset){ var pos = 0; if(this.isHorizontal){ pos = Math.round(this.children[p].usualX + offset); this.children[p].domNode.style.left = pos + 'px'; }else{ pos = Math.round(this.children[p].usualY + offset); this.children[p].domNode.style.top = pos + 'px'; } this._positionLabel(this.children[p]); // position before var bpos = pos; for(var i=p-1; i>=0; i--){ bpos -= this.children[i].sizeMain; if (this.isHorizontal){ this.children[i].domNode.style.left = bpos + 'px'; }else{ this.children[i].domNode.style.top = bpos + 'px'; } this._positionLabel(this.children[i]); } // position after var apos = pos; for(var i=p+1; i // | // |
// |
// | ... // | // constructor: function(){ // // TODO // fix really long labels in vertical mode // this.pos = {'x': -1, 'y': -1}; // current cursor position, relative to the grid // for conservative trigger mode, when triggered, timerScale is gradually increased from 0 to 1 this.timerScale = 1.0; }, EDGE: { CENTER: 0, LEFT: 1, RIGHT: 2, TOP: 3, BOTTOM: 4 }, templateString: '
', snarfChildDomOutput: true, // itemWidth: Integer // width of menu item (in pixels) in it's dormant state (when the mouse is far away) itemWidth: 40, // itemHeight: Integer // height of menu item (in pixels) in it's dormant state (when the mouse is far away) itemHeight: 40, // itemMaxWidth: Integer // width of menu item (in pixels) in it's fully enlarged state (when the mouse is directly over it) itemMaxWidth: 150, // itemMaxHeight: Integer // height of menu item (in pixels) in it's fully enlarged state (when the mouse is directly over it) itemMaxHeight: 150, imgNode: null, // orientation: String // orientation of the menu, either "horizontal" or "vertical" orientation: 'horizontal', // isFixed: Boolean // toggle to enable additional listener (window scroll) if FisheyeList is in a fixed postion isFixed: false, // conservativeTrigger: Boolean // if true, don't start enlarging menu items until mouse is over an image; // if false, start enlarging menu items as the mouse moves near them. conservativeTrigger: false, // effectUnits: Number // controls how much reaction the menu makes, relative to the distance of the mouse from the menu effectUnits: 2, // itemPadding: Integer // padding (in pixels) betweeen each menu item itemPadding: 10, // attachEdge: String // controls the border that the menu items don't expand past; // for example, if set to "top", then the menu items will drop downwards as they expand. // values // "center", "left", "right", "top", "bottom". attachEdge: 'center', // labelEdge: String // controls were the labels show up in relation to the menu item icons // values // "center", "left", "right", "top", "bottom". labelEdge: 'bottom', postCreate: function(){ var e = this.EDGE; dojo.setSelectable(this.domNode, false); var isHorizontal = this.isHorizontal = (this.orientation == 'horizontal'); this.selectedNode = -1; this.isOver = false; this.hitX1 = -1; this.hitY1 = -1; this.hitX2 = -1; this.hitY2 = -1; // // only some edges make sense... // this.anchorEdge = this._toEdge(this.attachEdge, e.CENTER); this.labelEdge = this._toEdge(this.labelEdge, e.TOP); if(this.labelEdge == e.CENTER){ this.labelEdge = e.TOP; } if(isHorizontal){ if(this.anchorEdge == e.LEFT){ this.anchorEdge = e.CENTER; } if(this.anchorEdge == e.RIGHT){ this.anchorEdge = e.CENTER; } if(this.labelEdge == e.LEFT){ this.labelEdge = e.TOP; } if(this.labelEdge == e.RIGHT){ this.labelEdge = e.TOP; } }else{ if(this.anchorEdge == e.TOP){ this.anchorEdge = e.CENTER; } if(this.anchorEdge == e.BOTTOM){ this.anchorEdge = e.CENTER; } if(this.labelEdge == e.TOP){ this.labelEdge = e.LEFT; } if(this.labelEdge == e.BOTTOM){ this.labelEdge = e.LEFT; } } // // figure out the proximity size // var effectUnits = this.effectUnits; this.proximityLeft = this.itemWidth * (effectUnits - 0.5); this.proximityRight = this.itemWidth * (effectUnits - 0.5); this.proximityTop = this.itemHeight * (effectUnits - 0.5); this.proximityBottom = this.itemHeight * (effectUnits - 0.5); if(this.anchorEdge == e.LEFT){ this.proximityLeft = 0; } if(this.anchorEdge == e.RIGHT){ this.proximityRight = 0; } if(this.anchorEdge == e.TOP){ this.proximityTop = 0; } if(this.anchorEdge == e.BOTTOM){ this.proximityBottom = 0; } if(this.anchorEdge == e.CENTER){ this.proximityLeft /= 2; this.proximityRight /= 2; this.proximityTop /= 2; this.proximityBottom /= 2; } }, startup: function(){ // summary: create our connections and setup our FisheyeList this.children = this.getChildren(); //original postCreate() --tk this._initializePositioning(); // // in liberal trigger mode, activate menu whenever mouse is close // if(!this.conservativeTrigger){ this._onMouseMoveHandle = dojo.connect(document.documentElement, "onmousemove", this, "_onMouseMove"); } if (this.isFixed){ this._onScrollHandle = dojo.connect(document,"onscroll",this,"_onScroll"); } // Deactivate the menu if mouse is moved off screen (doesn't work for FF?) this._onMouseOutHandle = dojo.connect(document.documentElement, "onmouseout", this, "_onBodyOut"); this._addChildHandle = dojo.connect(this, "addChild", this, "_initializePositioning"); this._onResizeHandle = dojo.connect(window,"onresize", this, "_initializePositioning"); }, _initializePositioning: function(){ this.itemCount = this.children.length; this.barWidth = (this.isHorizontal ? this.itemCount : 1) * this.itemWidth; this.barHeight = (this.isHorizontal ? 1 : this.itemCount) * this.itemHeight; this.totalWidth = this.proximityLeft + this.proximityRight + this.barWidth; this.totalHeight = this.proximityTop + this.proximityBottom + this.barHeight; // // calculate effect ranges for each item // for(var i=0; i c+lhs){ range_lhs = c+lhs; } if(range_rhs > (siz-c+rhs)){ range_rhs = siz-c+rhs; } this.children[i].effectRangeLeft = range_lhs / isz; this.children[i].effectRangeRght = range_rhs / isz; //dojo.debug('effect range for '+i+' is '+range_lhs+'/'+range_rhs); } // // create the bar // this.domNode.style.width = this.barWidth + 'px'; this.domNode.style.height = this.barHeight + 'px'; // // position the items // for(var i=0; i) node = dojo.byId(node); var mouse = {x: e.pageX, y: e.pageY}; var bb = dojo._getBorderBox(node); var absolute = dojo.coords(node, true); var top = absolute.y; var bottom = top + bb.h; var left = absolute.x; var right = left + bb.w; return (mouse.x >= left && mouse.x <= right && mouse.y >= top && mouse.y <= bottom ); // boolean }, _onBodyOut: function(/*Event*/ e){ // clicking over an object inside of body causes this event to fire; ignore that case if( this._overElement(dojo.body(), e) ){ return; } this._setDormant(e); }, _setDormant: function(/*Event*/ e){ // summary: called when mouse moves out of menu's range if(!this.isOver){ return; } // already dormant? this.isOver = false; if(this.conservativeTrigger){ // user can't re-trigger the menu expansion // until he mouses over a icon again dojo.disconnect(this._onMouseMoveHandle); } this._onGridMouseMove(-1, -1); }, _setActive: function(/*Event*/ e){ // summary: called when mouse is moved into menu's range if(this.isOver){ return; } // already activated? this.isOver = true; if(this.conservativeTrigger){ // switch event handlers so that we handle mouse events from anywhere near // the menu this._onMouseMoveHandle = dojo.connect(document.documentElement, "onmousemove", this, "_onMouseMove"); this.timerScale=0.0; // call mouse handler to do some initial necessary calculations/positioning this._onMouseMove(e); // slowly expand the icon size so it isn't jumpy this._expandSlowly(); } }, _onMouseMove: function(/*Event*/ e){ // summary: called when mouse is moved if( (e.pageX >= this.hitX1) && (e.pageX <= this.hitX2) && (e.pageY >= this.hitY1) && (e.pageY <= this.hitY2) ){ if(!this.isOver){ this._setActive(e); } this._onGridMouseMove(e.pageX-this.hitX1, e.pageY-this.hitY1); }else{ if(this.isOver){ this._setDormant(e); } } }, _onScroll: function(){ this._calcHitGrid(); }, onResized: function(){ this._calcHitGrid(); }, _onGridMouseMove: function(x, y){ // summary: called when mouse is moved in the vicinity of the menu this.pos = {x:x, y:y}; this._paint(); }, _paint: function(){ var x=this.pos.x; var y=this.pos.y; if(this.itemCount <= 0){ return; } // // figure out our main index // var pos = this.isHorizontal ? x : y; var prx = this.isHorizontal ? this.proximityLeft : this.proximityTop; var siz = this.isHorizontal ? this.itemWidth : this.itemHeight; var sim = this.isHorizontal ? (1.0-this.timerScale)*this.itemWidth + this.timerScale*this.itemMaxWidth : (1.0-this.timerScale)*this.itemHeight + this.timerScale*this.itemMaxHeight ; var cen = ((pos - prx) / siz) - 0.5; var max_off_cen = (sim / siz) - 0.5; if(max_off_cen > this.effectUnits){ max_off_cen = this.effectUnits; } // // figure out our off-axis weighting // var off_weight = 0; if(this.anchorEdge == this.EDGE.BOTTOM){ var cen2 = (y - this.proximityTop) / this.itemHeight; off_weight = (cen2 > 0.5) ? 1 : y / (this.proximityTop + (this.itemHeight / 2)); } if(this.anchorEdge == this.EDGE.TOP){ var cen2 = (y - this.proximityTop) / this.itemHeight; off_weight = (cen2 < 0.5) ? 1 : (this.totalHeight - y) / (this.proximityBottom + (this.itemHeight / 2)); } if(this.anchorEdge == this.EDGE.RIGHT){ var cen2 = (x - this.proximityLeft) / this.itemWidth; off_weight = (cen2 > 0.5) ? 1 : x / (this.proximityLeft + (this.itemWidth / 2)); } if(this.anchorEdge == this.EDGE.LEFT){ var cen2 = (x - this.proximityLeft) / this.itemWidth; off_weight = (cen2 < 0.5) ? 1 : (this.totalWidth - x) / (this.proximityRight + (this.itemWidth / 2)); } if(this.anchorEdge == this.EDGE.CENTER){ if(this.isHorizontal){ off_weight = y / (this.totalHeight); }else{ off_weight = x / (this.totalWidth); } if(off_weight > 0.5){ off_weight = 1 - off_weight; } off_weight *= 2; } // // set the sizes // for(var i=0; i this.itemCount - 1){ main_p = this.itemCount -1; }else{ offset = (cen - main_p) * ((this.isHorizontal ? this.itemWidth : this.itemHeight) - this.children[main_p].sizeMain); } this._positionElementsFrom(main_p, offset); }, _weighAt: function(/*Integer*/ cen, /*Integer*/ i){ var dist = Math.abs(cen - i); var limit = ((cen - i) > 0) ? this.children[i].effectRangeRght : this.children[i].effectRangeLeft; return (dist > limit) ? 0 : (1 - dist / limit); // Integer }, _setItemSize: function(p, scale){ scale *= this.timerScale; var w = Math.round(this.itemWidth + ((this.itemMaxWidth - this.itemWidth ) * scale)); var h = Math.round(this.itemHeight + ((this.itemMaxHeight - this.itemHeight) * scale)); if(this.isHorizontal){ this.children[p].sizeW = w; this.children[p].sizeH = h; this.children[p].sizeMain = w; this.children[p].sizeOff = h; var y = 0; if(this.anchorEdge == this.EDGE.TOP){ y = (this.children[p].cenY - (this.itemHeight / 2)); }else if(this.anchorEdge == this.EDGE.BOTTOM){ y = (this.children[p].cenY - (h - (this.itemHeight / 2))); }else{ y = (this.children[p].cenY - (h / 2)); } this.children[p].usualX = Math.round(this.children[p].cenX - (w / 2)); this.children[p].domNode.style.top = y + 'px'; this.children[p].domNode.style.left = this.children[p].usualX + 'px'; }else{ this.children[p].sizeW = w; this.children[p].sizeH = h; this.children[p].sizeOff = w; this.children[p].sizeMain = h; var x = 0; if(this.anchorEdge == this.EDGE.LEFT){ x = this.children[p].cenX - (this.itemWidth / 2); }else if (this.anchorEdge == this.EDGE.RIGHT){ x = this.children[p].cenX - (w - (this.itemWidth / 2)); }else{ x = this.children[p].cenX - (w / 2); } this.children[p].domNode.style.left = x + 'px'; this.children[p].usualY = Math.round(this.children[p].cenY - (h / 2)); this.children[p].domNode.style.top = this.children[p].usualY + 'px'; } this.children[p].domNode.style.width = w + 'px'; this.children[p].domNode.style.height = h + 'px'; if(this.children[p].svgNode){ this.children[p].svgNode.setSize(w, h); } }, _positionElementsFrom: function(p, offset){ var pos = 0; if(this.isHorizontal){ pos = Math.round(this.children[p].usualX + offset); this.children[p].domNode.style.left = pos + 'px'; }else{ pos = Math.round(this.children[p].usualY + offset); this.children[p].domNode.style.top = pos + 'px'; } this._positionLabel(this.children[p]); // position before var bpos = pos; for(var i=p-1; i>=0; i--){ bpos -= this.children[i].sizeMain; if (this.isHorizontal){ this.children[i].domNode.style.left = bpos + 'px'; }else{ this.children[i].domNode.style.top = bpos + 'px'; } this._positionLabel(this.children[i]); } // position after var apos = pos; for(var i=p+1; i' + ' ' + '
' + '', _isNode: function(/* object */wh){ // summary: // checks to see if wh is actually a node. if(typeof Element == "function") { try{ return wh instanceof Element; // boolean }catch(e){} }else{ // best-guess return wh && !isNaN(wh.nodeType); // boolean } }, _hasParent: function(/*Node*/node){ // summary: // returns whether or not node is a child of another node. return Boolean(node && node.parentNode && this._isNode(node.parentNode)); // boolean }, postCreate: function() { // set image if((this.iconSrc.toLowerCase().substring(this.iconSrc.length-4)==".png") && dojo.isIE < 7){ /* we set the id of the new fisheyeListItem to the id of the div defined in the HTML */ if(this._hasParent(this.imgNode) && this.id != ""){ var parent = this.imgNode.parentNode; parent.setAttribute("id", this.id); } this.imgNode.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.iconSrc+"', sizingMethod='scale')"; this.imgNode.src = this._blankGif.toString(); }else{ if(this._hasParent(this.imgNode) && this.id != ""){ var parent = this.imgNode.parentNode; parent.setAttribute("id", this.id); } this.imgNode.src = this.iconSrc; } // Label if(this.lblNode){ this.lblNode.appendChild(document.createTextNode(this.label)); } dojo.setSelectable(this.domNode, false); this.startup();";s:7:"returns";s:51:"already dormant?|already activated?|Integer|boolean";s:7:"summary";s:0:"";}s:36:"dojox.widget.FisheyeListItem.startup";a:4:{s:9:"prototype";s:28:"dojox.widget.FisheyeListItem";s:4:"type";s:8:"Function";s:6:"source";s:33:" this.parent = this.getParent();";s:7:"summary";s:0:"";}s:40:"dojox.widget.FisheyeListItem.onMouseOver";a:5:{s:9:"prototype";s:28:"dojox.widget.FisheyeListItem";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:5:"Event";}}s:6:"source";s:179:" if(!this.parent.isOver){ this.parent._setActive(e); } if(this.label != "" ){ dojo.addClass(this.lblNode, "dojoxFishSelected"); this.parent._positionLabel(this); }";s:7:"summary";s:127:"callback when user moves mouse over this menu item in conservative mode, don't activate the menu until user mouses over an icon";}s:39:"dojox.widget.FisheyeListItem.onMouseOut";a:5:{s:9:"prototype";s:28:"dojox.widget.FisheyeListItem";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:5:"Event";}}s:6:"source";s:54:" dojo.removeClass(this.lblNode, "dojoxFishSelected");";s:7:"summary";s:52:"callback when user moves mouse off of this menu item";}s:36:"dojox.widget.FisheyeListItem.onClick";a:5:{s:9:"prototype";s:28:"dojox.widget.FisheyeListItem";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:5:"Event";}}s:6:"source";s:71:" // summary: user overridable callback when user clicks this menu item";s:7:"summary";s:57:"user overridable callback when user clicks this menu item";}s:49:"dojox.widget.FisheyeListItem.imgNode.style.filter";a:2:{s:8:"instance";s:28:"dojox.widget.FisheyeListItem";s:7:"summary";s:0:"";}s:40:"dojox.widget.FisheyeListItem.imgNode.src";a:2:{s:8:"instance";s:28:"dojox.widget.FisheyeListItem";s:7:"summary";s:0:"";}s:35:"dojox.widget.FisheyeListItem.parent";a:2:{s:8:"instance";s:28:"dojox.widget.FisheyeListItem";s:7:"summary";s:0:"";}s:12:"dojox.widget";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}