+10
-3
@@ -52,9 +52,16 @@ class Class(Exportable):
|
|||||||
lines.append(' * @param {%s} options Options.\n' % (self.object_literal.extern_name(),))
|
lines.append(' * @param {%s} options Options.\n' % (self.object_literal.extern_name(),))
|
||||||
lines.append(' */\n')
|
lines.append(' */\n')
|
||||||
lines.append('%sExport = function(options) {\n' % (self.name,))
|
lines.append('%sExport = function(options) {\n' % (self.name,))
|
||||||
lines.append(' goog.base(this, {')
|
lines.append(' /** @type {%s} */\n' % (self.object_literal.name,))
|
||||||
lines.extend(','.join('\n %s: options.%s' % (key, key) for key in sorted(self.object_literal.prop_types.keys())))
|
lines.append(' var arg;\n');
|
||||||
lines.append('\n });\n')
|
lines.append(' if (goog.isDefAndNotNull(options)) {\n')
|
||||||
|
lines.append(' arg = {')
|
||||||
|
lines.extend(','.join('\n %s: options.%s' % (key, key) for key in sorted(self.object_literal.prop_types.keys())))
|
||||||
|
lines.append('\n };\n')
|
||||||
|
lines.append(' } else {\n')
|
||||||
|
lines.append(' arg = /** @type {%s} */ (options);\n' % (self.object_literal.name,))
|
||||||
|
lines.append(' }\n')
|
||||||
|
lines.append(' goog.base(this, arg);\n')
|
||||||
lines.append('};\n')
|
lines.append('};\n')
|
||||||
lines.append('goog.inherits(%sExport, %s);\n' % (self.name, self.name))
|
lines.append('goog.inherits(%sExport, %s);\n' % (self.name, self.name))
|
||||||
lines.append('goog.exportSymbol(\n')
|
lines.append('goog.exportSymbol(\n')
|
||||||
|
|||||||
@@ -129,7 +129,7 @@
|
|||||||
@exportObjectLiteral ol.source.SourceOptions
|
@exportObjectLiteral ol.source.SourceOptions
|
||||||
@exportObjectLiteralProperty ol.source.SourceOptions.attributions Array.<ol.Attribution>|undefined
|
@exportObjectLiteralProperty ol.source.SourceOptions.attributions Array.<ol.Attribution>|undefined
|
||||||
@exportObjectLiteralProperty ol.source.SourceOptions.extent ol.Extent|undefined
|
@exportObjectLiteralProperty ol.source.SourceOptions.extent ol.Extent|undefined
|
||||||
@exportObjectLiteralProperty ol.source.SourceOptions.projection ol.Projection|undefined
|
@exportObjectLiteralProperty ol.source.SourceOptions.projection ol.ProjectionLike
|
||||||
|
|
||||||
@exportObjectLiteral ol.source.StamenOptions
|
@exportObjectLiteral ol.source.StamenOptions
|
||||||
@exportObjectLiteralProperty ol.source.StamenOptions.layer string
|
@exportObjectLiteralProperty ol.source.StamenOptions.layer string
|
||||||
|
|||||||
@@ -8,14 +8,6 @@ goog.require('ol.Extent');
|
|||||||
goog.require('ol.projection');
|
goog.require('ol.projection');
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @typedef {{attributions: (Array.<ol.Attribution>|undefined),
|
|
||||||
* extent: (ol.Extent|undefined),
|
|
||||||
* projection: ol.ProjectionLike}}
|
|
||||||
*/
|
|
||||||
ol.source.SourceOptions;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
|
|||||||
Reference in New Issue
Block a user