1 | define([ |
---|
2 | "dojo/_base/array", |
---|
3 | "dojo/_base/declare", |
---|
4 | "dojo/_base/window", |
---|
5 | "dijit/_Contained", |
---|
6 | "dijit/_Container", |
---|
7 | "dijit/_WidgetBase" |
---|
8 | ], function(array, declare, win, Contained, Container, WidgetBase){ |
---|
9 | |
---|
10 | /*===== |
---|
11 | var Contained = dijit._Contained; |
---|
12 | var Container = dijit._Container; |
---|
13 | var WidgetBase = dijit._WidgetBase; |
---|
14 | =====*/ |
---|
15 | |
---|
16 | // module: |
---|
17 | // dojox/mobile/RoundRect |
---|
18 | // summary: |
---|
19 | // A simple round rectangle container. |
---|
20 | |
---|
21 | return declare("dojox.mobile.RoundRect", [WidgetBase, Container, Contained], { |
---|
22 | // summary: |
---|
23 | // A simple round rectangle container. |
---|
24 | // description: |
---|
25 | // RoundRect is a simple round rectangle container for any HTML |
---|
26 | // and/or widgets. You can achieve the same appearance by just |
---|
27 | // applying the -webkit-border-radius style to a div tag. However, |
---|
28 | // if you use RoundRect, you can get a round rectangle even on |
---|
29 | // non-CSS3 browsers such as (older) IE. |
---|
30 | |
---|
31 | // shadow: Boolean |
---|
32 | // If true, adds a shadow effect to the container element. |
---|
33 | shadow: false, |
---|
34 | |
---|
35 | buildRendering: function(){ |
---|
36 | this.domNode = this.containerNode = this.srcNodeRef || win.doc.createElement("DIV"); |
---|
37 | this.domNode.className = this.shadow ? "mblRoundRect mblShadow" : "mblRoundRect"; |
---|
38 | }, |
---|
39 | |
---|
40 | resize: function(){ |
---|
41 | // summary: |
---|
42 | // Calls resize() of each child widget. |
---|
43 | array.forEach(this.getChildren(), function(child){ |
---|
44 | if(child.resize){ child.resize(); } |
---|
45 | }); |
---|
46 | } |
---|
47 | }); |
---|
48 | }); |
---|