Opened 7 years ago

Closed 7 years ago

#16937 closed defect (fixed)

GFX API doc errors

Reported by: bill Owned by: bill
Priority: undecided Milestone: 1.9
Component: DojoX GFX Version: 1.8.3
Keywords: Cc:
Blocked By: Blocking:

Description

The API doc parser is crashing due to errors in GFX:

ERR: dojox/gfx/_gfxBidiSupport.js:261:9 TypeError: Cannot call method 'mixinProperties' of undefined
    at [object Object].<anonymous> (/ws/docparse/lib/callHandler/dojo.js:195:16)
    at [object Object].match (/ws/docparse/dojo/AdapterRegistry.js:75:21)
    at Object.CallExpression (/ws/docparse/lib/esprimaParser.js:359:29)
    at read (/ws/docparse/lib/esprimaParser.js:239:27)
    at Object.ExpressionStatement (/ws/docparse/lib/esprimaParser.js:28:11)
    at read (/ws/docparse/lib/esprimaParser.js:239:27)
    at readStatements (/ws/docparse/lib/esprimaParser.js:38:4)
    at read (/ws/docparse/lib/esprimaParser.js:231:11)
    at Object.BlockStatement (/ws/docparse/lib/esprimaParser.js:330:5)
    at read (/ws/docparse/lib/esprimaParser.js:239:27)

_gfxBidiSupport calls:

lang.extend(g.TextPath, {  ...

g.TextPath? is defined by shape.js:

g.TextPath = g.path.TextPath;

However, g.path.TextPath? is not defined, because although path.js does define TextPath?, shape.js doesn't require path.js, at least not directly. The code above is also wrong because it has nothing to do with the shape.js file, so it shouldn't be there.

The other issue is that shape.js defines g.Text and then immediately redefines it to something else:

/*=====
 lang.extend(shape.Surface, shape.Container);
 lang.extend(shape.Surface, shape.Creator);

 g.Group = declare(shape.Shape, {
	// summary:
	//		a group shape, which can be used
	//		to logically group shapes (e.g, to propagate matricies)
});
lang.extend(g.Group, shape.Container);
lang.extend(g.Group, shape.Creator);

g.Rect     = shape.Rect;
g.Circle   = shape.Circle;
g.Ellipse  = shape.Ellipse;
g.Line     = shape.Line;
g.Polyline = shape.Polyline;
g.Text     = shape.Text;
g.Surface  = shape.Surface;

g.Path = g.path.Path;
g.TextPath = g.path.TextPath;
=====*/

Change History (2)

comment:1 Changed 7 years ago by bill

Milestone: tbd1.9
Owner: changed from Eugene Lazutkin to bill
Status: newassigned

comment:2 Changed 7 years ago by bill

Resolution: fixed
Status: assignedclosed

In [31061]:

Fix API doc errors in GFX. g.TextPath? was not defined because path.js wasn't getting pulled in. Fixes #16937 !strict.

Note: See TracTickets for help on using tickets.