Skip to content

Commit d3181c2

Browse files
committed
dojox/drawing: Fix api doc formatting, in particular moving class level summary/description of oo.declare() classes into prototype section, so the doc parser will pick them up. Refs #13101 !strict.
1 parent f13a8c4 commit d3181c2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+634
-537
lines changed

drawing/Drawing.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function(dojo, defaults, registry, keys, Mouse, Canvas, Undo, Anchors, Stencil,
1313
// a Dijit to keep the file size light. But if Dijit is available, Drawing
1414
// will register itself with it and can be accessed dijit.byId('myDrawing')
1515
//
16-
// NOTES:
16+
// NOTES:
1717
// Although not Drawing and Toolbar, all other objects are created with a custom
1818
// declare. See dojox.drawing.util.oo
1919
//
@@ -68,7 +68,7 @@ function(dojo, defaults, registry, keys, Mouse, Canvas, Undo, Anchors, Stencil,
6868
// | plugins="[{'name':'dojox.drawing.plugins.drawing.Grid', 'options':{gap:100}}]">
6969
// | </div>
7070
//
71-
// example:
71+
// example:
7272
// | <div dojoType="dojox.drawing.Toolbar" drawingId="drawing" class="drawingToolbar vertical">
7373
// | <div tool="dojox.drawing.tools.Line" selected="false">Line</div>
7474
// | <div tool="dojox.drawing.tools.Rect" selected="false">Rect</div>
@@ -105,7 +105,7 @@ function(dojo, defaults, registry, keys, Mouse, Canvas, Undo, Anchors, Stencil,
105105
// summary:
106106
// Drawing is not a Dijit. This is the master method.
107107
// NOTE:
108-
// props is always null since this is not a real widget
108+
// props is always null since this is not a real widget
109109
// Will change when Drawing can be created programmatically.
110110

111111
var def = dojo.attr(node, "defaults");
@@ -205,7 +205,7 @@ function(dojo, defaults, registry, keys, Mouse, Canvas, Undo, Anchors, Stencil,
205205

206206
getShapeProps: function(/* Object */data, mode){
207207
// summary:
208-
// The common objects that are mixed into
208+
// The common objects that are mixed into
209209
// a new Stencil. Mostly internal, but could be used.
210210

211211
var surface = data.stencilType;
@@ -233,8 +233,8 @@ function(dojo, defaults, registry, keys, Mouse, Canvas, Undo, Anchors, Stencil,
233233

234234
initPlugins: function(){
235235
// summary:
236-
// Called from Toolbar after a plugin has been loaded
237-
// The call to this coming from toobar is a bit funky as the timing
236+
// Called from Toolbar after a plugin has been loaded
237+
// The call to this coming from toobar is a bit funky as the timing
238238
// of IE for canvas load is different than other browsers
239239
if(!this.canvas || !this.canvas.surfaceReady){
240240
var c = dojo.connect(this, "onSurfaceReady", this, function(){
@@ -415,7 +415,7 @@ function(dojo, defaults, registry, keys, Mouse, Canvas, Undo, Anchors, Stencil,
415415
changeDefaults: function(/*Object*/newStyle,/*Boolean*/value){
416416
// summary:
417417
// Change the defaults so that all Stencils from this
418-
// point on will use the newly changed style.
418+
// point on will use the newly changed style.
419419
// newStyle: Object
420420
// An object that represents one of the objects in
421421
// drawing.style that will be mixed in. Not all

drawing/annotations/Angle.js

+11-14
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
11
define(["dojo", "../util/oo", "../util/positioning"],
22
function(dojo, oo, positioning){
33

4-
// summary:
5-
// When initiated, an HTML box will hover near the Stencil,
6-
// displaying it's angle while drawn or modified. Currently
7-
// only works with Vector, Line, Arrow, and Axes.
8-
// description:
9-
// Annotation is positioned with dojox.drawing.util.positioning.angle
10-
// That method should be overwritten for custom placement.
11-
// Called internally.
12-
134
//dojox.drawing.annotations.Angle =
145
return oo.declare(
15-
// TODO: currently always on
16-
176
function(/*Object*/ options){
187
// options: Object
198
// One key value: the stencil that called this.
@@ -31,6 +20,15 @@ return oo.declare(
3120
]);
3221
},
3322
{
23+
// summary:
24+
// When initiated, an HTML box will hover near the Stencil,
25+
// displaying it's angle while drawn or modified. Currently
26+
// only works with Vector, Line, Arrow, and Axes.
27+
// description:
28+
// Annotation is positioned with dojox.drawing.util.positioning.angle
29+
// That method should be overwritten for custom placement.
30+
// Called internally.
31+
3432
type:"dojox.drawing.tools.custom",
3533
angle:0,
3634

@@ -75,7 +73,7 @@ return oo.declare(
7573
},
7674

7775
getAngleNode: function(){
78-
// summary:
76+
// summary:
7977
// Gets or creates HTMLNode used for display
8078
if(!this._angleNode){
8179
this._angleNode = dojo.create("span", null, dojo.body());
@@ -86,7 +84,7 @@ return oo.declare(
8684
},
8785

8886
hideAngle: function(){
89-
// summary:
87+
// summary:
9088
// Turns display off.
9189

9290
if(this._angleNode && dojo.style(this._angleNode, "opacity")>0.9){
@@ -102,6 +100,5 @@ return oo.declare(
102100

103101
}
104102
}
105-
106103
);
107104
});

drawing/annotations/Arrow.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
define(["../util/oo", "../stencil/Path"],
22
function(oo, Path){
33

4-
// summary:
5-
// An annotation called internally to put an arrowhead
6-
// on ether end of a Line. Initiated in Arrow (and Vector)
7-
// with the optional params: arrowStart and arrowEnd. Both
8-
// default true for Axes.
9-
10-
//dojox.drawing.annotations.Arrow =
4+
//dojox.drawing.annotations.Arrow =
115
return oo.declare(
126

137
Path,
@@ -31,6 +25,12 @@ return oo.declare(
3125

3226
},
3327
{
28+
// summary:
29+
// An annotation called internally to put an arrowhead
30+
// on ether end of a Line. Initiated in Arrow (and Vector)
31+
// with the optional params: arrowStart and arrowEnd. Both
32+
// default true for Axes.
33+
3434
idx1:0,
3535
idx2:1,
3636

drawing/annotations/BoxShadow.js

+18-18
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,6 @@
11
define(["dojo", "dojo/_base/Color", "../util/oo"],
22
function(dojo, Color, oo){
33

4-
// summary:
5-
// Creates a box shadow under solid objects. Can change the
6-
// shadow direction, color, size, and intensity. Can center
7-
// the shadow and make it a Glow.
8-
// description:
9-
// This is a pseudo shadow, created by duplicating the
10-
// original stencil and increasing the line weight while
11-
// reducing the opacity. Therefore it will not work with
12-
// text. Also won't look very good if the Stencil has no
13-
// fill or is transparent. Can't do knockouts or inner
14-
// shadows. Currently can't do paths - while doable, it
15-
// will most likely choke IE into certain death.
16-
174
return oo.declare(
185
function(/*Object*/options){
196
this.stencil = options.stencil;
@@ -32,7 +19,7 @@ return oo.declare(
3219
// lineWidths that overlap to make the shadow. Generally you want a
3320
// bigger 'size' than 'mult'. The defaults are good for a shadow, but
3421
// you will want to increase them when making a glow.
35-
// TODO: Make this more clear or use other properties.
22+
// TODO: Make this more clear or use other properties.
3623
size:6,
3724

3825
// mult: Number
@@ -41,7 +28,7 @@ return oo.declare(
4128
// lineWidths that overlap to make the shadow. Generally you want a
4229
// bigger 'size' than 'mult'. The defaults are good for a shadow, but
4330
// you will want to increase them when making a glow.
44-
// TODO: Make this more clear or use other properties.
31+
// TODO: Make this more clear or use other properties.
4532
mult:4,
4633

4734
// alpha: Float
@@ -50,7 +37,7 @@ return oo.declare(
5037
// dark and . is black. Higher numbers also give a sharper edge.
5138
alpha:.05,
5239

53-
// place: String
40+
// place: String
5441
// Tells the position of the shadow:
5542
// B: bottom
5643
// T: top
@@ -61,10 +48,10 @@ return oo.declare(
6148
// be used by itself.
6249
place:"BR",
6350

64-
// color: String
51+
// color: String
6552
// The color of the shadow or glow.
6653
color:"#646464"
67-
}
54+
};
6855

6956
delete options.stencil;
7057
this.options = dojo.mixin(shadowDefaults, options);
@@ -98,6 +85,19 @@ return oo.declare(
9885
}
9986
},
10087
{
88+
// summary:
89+
// Creates a box shadow under solid objects. Can change the
90+
// shadow direction, color, size, and intensity. Can center
91+
// the shadow and make it a Glow.
92+
// description:
93+
// This is a pseudo shadow, created by duplicating the
94+
// original stencil and increasing the line weight while
95+
// reducing the opacity. Therefore it will not work with
96+
// text. Also won't look very good if the Stencil has no
97+
// fill or is transparent. Can't do knockouts or inner
98+
// shadows. Currently can't do paths - while doable, it
99+
// will most likely choke IE into certain death.
100+
101101
showing:true,
102102
render: function(){
103103
if(this.container){

drawing/annotations/Label.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@ function(exports, lang, oo, Text){
44
// TODO: why not just return Label?
55

66
exports.Label = oo.declare(
7-
// summary:
8-
// An annotation called internally to label an Stencil.
9-
// description:
10-
// Annotation is positioned with dojox.drawing.util.positioning.label
11-
// That method should be overwritten for custom placement. Or,
12-
// add a 'setLabelCustom' method to the Stencil and it will be used.
13-
147
Text,
158
function(/*Object*/options){
169
// options: Object
@@ -29,6 +22,13 @@ exports.Label = oo.declare(
2922
this.connect(this.master, "attr", this, "beforeAttr");
3023
}
3124
},{
25+
// summary:
26+
// An annotation called internally to label an Stencil.
27+
// description:
28+
// Annotation is positioned with dojox.drawing.util.positioning.label
29+
// That method should be overwritten for custom placement. Or,
30+
// add a 'setLabelCustom' method to the Stencil and it will be used.
31+
3232
_align:"start",
3333
drawingType:"label",
3434

drawing/defaults.js

+26-26
Original file line numberDiff line numberDiff line change
@@ -29,29 +29,29 @@ define({
2929
currentHit:null,
3030

3131
// angleSnap: Number
32-
// Line, arrows, vector and axes will all snap to this angle on mouse up
33-
// shown angle also reflects the snap
34-
// currently cannot accept less than 1 degree
32+
// Line, arrows, vector and axes will all snap to this angle on mouse up
33+
// shown angle also reflects the snap
34+
// currently cannot accept less than 1 degree
3535
angleSnap:1,
3636

3737
// zAxis: Boolean
38-
// If true, draw current object in z-direction.
38+
// If true, draw current object in z-direction.
3939
// zAxisEnabled: Boolean
40-
// If true, render axes with Z-axis included, allow objects drawn in z-direction.
40+
// If true, render axes with Z-axis included, allow objects drawn in z-direction.
4141
// If false the z-axis button will not show up.
4242
zAxis: false,
4343
zAxisEnabled: true,
4444
zAngle: 225,
4545

4646
// renderHitLines: Boolean
4747
// If true, renders a second, larger layer for lines to make
48-
// them more easily clickable.
48+
// them more easily clickable.
4949
renderHitLines: true,
5050

5151
// renderHitLayer:
52-
// If true, renders a second layer for each Stencil, one
53-
// acting as a 'hit' object for a wider mouse-click area.
54-
// It also doubles as a hilight. If true, overrides
52+
// If true, renders a second layer for each Stencil, one
53+
// acting as a 'hit' object for a wider mouse-click area.
54+
// It also doubles as a hilight. If true, overrides
5555
// renderHitLines setting.
5656
renderHitLayer:true,
5757

@@ -64,9 +64,9 @@ define({
6464

6565
norm:{
6666
// summary:
67-
// Normal style of all shapes
68-
// will get overridden by
69-
// above andes styles
67+
// Normal style of all shapes
68+
// will get overridden by
69+
// above andes styles
7070
width:1,
7171
color:"#000000",
7272
style:"Solid",
@@ -76,17 +76,17 @@ define({
7676

7777
selected:{
7878
// summary:
79-
// Selected style of all shapes
80-
// styles not shown will used from
79+
// Selected style of all shapes
80+
// styles not shown will used from
8181
// norm
8282
width:6,
8383
color:"#00FF00"
8484
},
8585

8686
highlighted:{
8787
// summary:
88-
// Highlighted style of all shapes
89-
// NOT CURRENTLY BEING USED
88+
// Highlighted style of all shapes
89+
// NOT CURRENTLY BEING USED
9090
width:6,
9191
color:"#FF00FF",
9292
style:"Solid",
@@ -96,7 +96,7 @@ define({
9696

9797
disabled:{
9898
// summary:
99-
// Disabled or "locked" or "fade" style of all shapes
99+
// Disabled or "locked" or "fade" style of all shapes
100100
width:1,
101101
color:"#666666",
102102
style:"solid",
@@ -139,7 +139,7 @@ define({
139139

140140
anchors:{
141141
// summary:
142-
// Style for the anchor resize-points
142+
// Style for the anchor resize-points
143143
size:10,
144144
width:2,
145145
color:"#999",
@@ -151,16 +151,16 @@ define({
151151
},
152152
arrows:{
153153
// summary:
154-
// Size of arrows on vectors.
155-
// length is in pixels
156-
// width is actually an angle
157-
// but is close to pixels in size
154+
// Size of arrows on vectors.
155+
// length is in pixels
156+
// width is actually an angle
157+
// but is close to pixels in size
158158
length:30,
159159
width:16
160160
},
161161
text:{
162162
// summary:
163-
// Style of text
163+
// Style of text
164164
minWidth:100,
165165
deleteEmptyCreate:true,
166166
deleteEmptyModify:true,
@@ -172,7 +172,7 @@ define({
172172
},
173173
textDisabled:{
174174
// summary:
175-
// Style of disabled text
175+
// Style of disabled text
176176
size:"18px",
177177
family:"sans-serif",
178178
weight:"normal",
@@ -181,7 +181,7 @@ define({
181181

182182
textMode:{
183183
// summary:
184-
// These styles apply to the containing
184+
// These styles apply to the containing
185185
// text box (edit mode), and not the text itself
186186
create:{
187187
width:2,
@@ -250,7 +250,7 @@ define({
250250
// summary:
251251
// Each shape gets its own copy
252252
// of these styles so that instances
253-
// do not change each other's styles
253+
// do not change each other's styles
254254

255255
var cpy = function(obj){
256256
if(typeof(obj)!="object" || obj===null || obj===undefined){

0 commit comments

Comments
 (0)