docs: Improve documentation.
Add a data type to the quadFeature to make it easier to explain what is
required.
Fix a typo.
MODIFY
src/quadFeature.js
src/quadFeature.js
@@ -2,17 +2,27 @@ var $ = require('jquery');
var inherit = require('./inherit');
var feature = require('./feature');
+/**
+ * Quad position specification
+ *
+ * @typedef {object} geo.quadFeature.position
+ * @property {geo.geoPosition} [ul] Upper left coordinate.
+ * @property {geo.geoPosition} [ur] Upper right coordinate.
+ * @property {geo.geoPosition} [ll] Lower left coordinate.
+ * @property {geo.geoPosition} [lr] Lower right coordinate.
+ */
+
/**
* Quad feature specification.
*
* @typedef {geo.feature.spec} geo.quadFeature.spec
* @extends geo.feature.spec
- * @property {object|function} [position] Position of the quad. Default is
- * (data). The position is an object which specifies the corners of the
- * quad: ll, lr, ur, ul. At least two opposite corners must be specified.
- * The corners do not have to physically correspond to the order specified,
- * but rather correspond to that part of an image or video (if there is one).
- * If a corner is unspecified, it will use the x coordinate from one adjacent
+ * @property {geo.quadFeature.position|function} [position] Position of the
+ * quad. Default is (data). The position specifies the corners of the quad:
+ * ll, lr, ur, ul. At least two opposite corners must be specified. The
+ * corners do not have to physically correspond to the order specified, but
+ * rather correspond to that part of an image or video (if there is one). If
+ * a corner is unspecified, it will use the x coordinate from one adjacent
* corner, the y coordinate from the other adjacent corner, and the average
* z value of those two corners. For instance, if ul is unspecified, it is
* {x: ll.x, y: ur.y}. Note that each quad is rendered as a pair of

MODIFY
src/tileLayer.js
src/tileLayer.js
@@ -43,7 +43,7 @@ var featureLayer = require('./featureLayer');
* If this is a string, a template url with {x}, {y}, {z}, and {s} as
* template variables. {s} picks one of the subdomains parameter and may
* contain a comma-separated list of subdomains.
- * @property {string|string[]} [subdomain="abc"] Subdomains to use in template
+ * @property {string|string[]} [subdomains="abc"] Subdomains to use in template
* url strings. If a string, this is converted to a list before being passed
* to a url function.
* @property {string} [baseUrl=null] If defined, use the old-style base url

MODIFY
tutorials/common/tutorials.js
tutorials/common/tutorials.js
@@ -100,7 +100,8 @@ function process_block(selector) {
code[format].push('');
}
val = $('.CodeMirror', block).length ? $('.CodeMirror', block)[0].CodeMirror.getValue() : $('textarea', block).val();
- code[format][step] = val.trim();
+ val = val.trim().replace(/ [ ]*\n/g, '\n');
+ code[format][step] = val;
});
$.each(code, function (key, list) {
var processed = '';
@@ -283,7 +284,8 @@ function start_keeper(alwaysKeep) {
defaultSrc = $('textarea', block).attr('defaultvalue'),
key = 'src' + (block.attr('step') !== '1' ? block.attr('step') : '');
- var src = $('.CodeMirror', block).length ? $('.CodeMirror', block)[0].CodeMirror.getValue() : $('textarea', block).val().trim();
+ var src = $('.CodeMirror', block).length ? $('.CodeMirror', block)[0].CodeMirror.getValue() : $('textarea', block).val();
+ src = src.trim().replace(/ [ ]*\n/g, '\n');
if (src !== defaultSrc) {
var comp = btoa(pako.deflate(src, {to: 'string', level: 9, raw: true}));
/* instead of using regular base64, convert /, +, and = to ., -, and _

docs: Improve documentation.

Add a data type to the quadFeature to make it easier to explain what is
required.

Fix a typo.