webui-aria2/js/libs/dojox/mobile/RoundRect.js.uncompressed.js
2012-05-01 19:52:07 +08:00

50 lines
1.4 KiB
JavaScript

//>>built
define("dojox/mobile/RoundRect", [
"dojo/_base/array",
"dojo/_base/declare",
"dojo/_base/window",
"dijit/_Contained",
"dijit/_Container",
"dijit/_WidgetBase"
], function(array, declare, win, Contained, Container, WidgetBase){
/*=====
var Contained = dijit._Contained;
var Container = dijit._Container;
var WidgetBase = dijit._WidgetBase;
=====*/
// module:
// dojox/mobile/RoundRect
// summary:
// A simple round rectangle container.
return declare("dojox.mobile.RoundRect", [WidgetBase, Container, Contained], {
// summary:
// A simple round rectangle container.
// description:
// RoundRect is a simple round rectangle container for any HTML
// and/or widgets. You can achieve the same appearance by just
// applying the -webkit-border-radius style to a div tag. However,
// if you use RoundRect, you can get a round rectangle even on
// non-CSS3 browsers such as (older) IE.
// shadow: Boolean
// If true, adds a shadow effect to the container element.
shadow: false,
buildRendering: function(){
this.domNode = this.containerNode = this.srcNodeRef || win.doc.createElement("DIV");
this.domNode.className = this.shadow ? "mblRoundRect mblShadow" : "mblRoundRect";
},
resize: function(){
// summary:
// Calls resize() of each child widget.
array.forEach(this.getChildren(), function(child){
if(child.resize){ child.resize(); }
});
}
});
});