Compare commits
12 Commits
v3.0.0-bet
...
release-2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
363efcf3db | ||
|
|
34b3da4d78 | ||
|
|
c7105a410a | ||
|
|
9dfabad733 | ||
|
|
a5a63727f5 | ||
|
|
8034d2d280 | ||
|
|
6bf55d5a43 | ||
|
|
526298ea2e | ||
|
|
d9847bbb37 | ||
|
|
168f79482b | ||
|
|
b8064015f6 | ||
|
|
d4d843e57f |
6
.gitignore
vendored
@@ -1,6 +0,0 @@
|
|||||||
*.pyc
|
|
||||||
/build
|
|
||||||
/examples/*.html.png
|
|
||||||
/examples/example-list.js
|
|
||||||
/examples/example-list.xml
|
|
||||||
/node_modules/
|
|
||||||
13
.travis.yml
@@ -1,13 +0,0 @@
|
|||||||
before_install:
|
|
||||||
- "sudo pip install http://closure-linter.googlecode.com/files/closure_linter-latest.tar.gz"
|
|
||||||
- "sudo pip install regex"
|
|
||||||
- "git clone --depth=50 https://github.com/jsdoc3/jsdoc build/jsdoc"
|
|
||||||
- "git clone https://code.google.com/p/glsl-unit/ build/glsl-unit"
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
- "./build.py plovr"
|
|
||||||
- "./build.py serve-integration-test &"
|
|
||||||
- "rm src/ol/renderer/webgl/*shader.js"
|
|
||||||
- "sleep 3"
|
|
||||||
|
|
||||||
script: "./build.py JSDOC=build/jsdoc/jsdoc integration-test"
|
|
||||||
57
AUTHORS.md
@@ -1,57 +0,0 @@
|
|||||||
OpenLayers contributors:
|
|
||||||
|
|
||||||
* Antoine Abt
|
|
||||||
* Mike Adair
|
|
||||||
* Jeff Adams
|
|
||||||
* Seb Benthall
|
|
||||||
* Bruno Binet
|
|
||||||
* Stéphane Brunner
|
|
||||||
* Howard Butler
|
|
||||||
* Bertil Chaupis
|
|
||||||
* John Cole
|
|
||||||
* Tim Coulter
|
|
||||||
* Robert Coup
|
|
||||||
* Jeff Dege
|
|
||||||
* Roald de Wit
|
|
||||||
* Schuyler Erle
|
|
||||||
* Christian López Espínola
|
|
||||||
* John Frank
|
|
||||||
* Sean Gilles
|
|
||||||
* Pierre Giraud
|
|
||||||
* Ivan Grcic
|
|
||||||
* Andreas Hocevar
|
|
||||||
* Marc Jansen
|
|
||||||
* Ian Johnson
|
|
||||||
* Frédéric Junod
|
|
||||||
* Eric Lemoine
|
|
||||||
* Philip Lindsay
|
|
||||||
* Martijn van Oosterhout
|
|
||||||
* David Overstrom
|
|
||||||
* Tom Payne
|
|
||||||
* Corey Puffault
|
|
||||||
* Peter William Robins
|
|
||||||
* Gregers Rygg
|
|
||||||
* Tim Schaub
|
|
||||||
* Christopher Schmidt
|
|
||||||
* Cameron Shorter
|
|
||||||
* Pedro Simonetti
|
|
||||||
* Paul Spencer
|
|
||||||
* Paul Smith
|
|
||||||
* Glen Stampoultzis
|
|
||||||
* James Stembridge
|
|
||||||
* Erik Uzureau
|
|
||||||
* Bart van den Eijnden
|
|
||||||
* Ivan Willig
|
|
||||||
* Thomas Wood
|
|
||||||
* Bill Woodall
|
|
||||||
* Steve Woodbridge
|
|
||||||
* David Zwarg
|
|
||||||
|
|
||||||
Some portions of OpenLayers are used under the Apache 2.0 license, available
|
|
||||||
in doc/licenses/APACHE-2.0.txt.
|
|
||||||
|
|
||||||
Some portions of OpenLayers are used under the MIT license, availabie in
|
|
||||||
doc/licenses/MIT-LICENSE.txt.
|
|
||||||
|
|
||||||
Some portions of OpenLayers are Copyright 2001 Robert Penner, and are used
|
|
||||||
under the BSD license, available in doc/licenses/BSD-LICENSE.txt
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# Contributing to OpenLayers 3
|
|
||||||
|
|
||||||
Thanks for your interest in contributing to OpenLayers 3.
|
|
||||||
|
|
||||||
## Contributing Code
|
|
||||||
|
|
||||||
Our preferred means of receiving contributions is through [pull
|
|
||||||
requests](https://help.github.com/articles/using-pull-requests).
|
|
||||||
|
|
||||||
See the [Developer
|
|
||||||
Guide](https://github.com/openlayers/ol3/wiki/Developer-Guide) to get started
|
|
||||||
with OpenLayers 3 development. This guide provides information you should know
|
|
||||||
before creating pull requests.
|
|
||||||
|
|
||||||
Note that, before accepting a contribution, we ask that you provide us
|
|
||||||
a Contributor License Agreement. If you are making your contribution as part of
|
|
||||||
work for your employer, please follow the guidelines on submitting a [Corporate
|
|
||||||
Contributor License Agreement](http://www.openlayers.org/ccla.txt). If you are
|
|
||||||
making your contribution as an individual, you can submit a digital [Individual
|
|
||||||
Contributor License
|
|
||||||
Agreement](https://docs.google.com/spreadsheet/viewform?formkey=dGNNVUJEMXF2dERTU0FXM3JjNVBQblE6MQ).
|
|
||||||
27
LICENSE.md
@@ -1,27 +0,0 @@
|
|||||||
Copyright 2005-2013 OpenLayers Contributors. All rights reserved. See
|
|
||||||
AUTHORS.md for full list.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
|
||||||
are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice, this
|
|
||||||
list of conditions and the following disclaimer.
|
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimer in the documentation and/or
|
|
||||||
other materials provided with the distribution.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY OPENLAYERS CONTRIBUTORS ``AS IS'' AND ANY EXPRESS
|
|
||||||
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
|
||||||
SHALL COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
||||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
||||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
||||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
|
||||||
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
|
||||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
The views and conclusions contained in the software and documentation are those
|
|
||||||
of the authors and should not be interpreted as representing official policies,
|
|
||||||
either expressed or implied, of OpenLayers Contributors.
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# OpenLayers 3
|
|
||||||
|
|
||||||
[](http://travis-ci.org/#!/openlayers/ol3)
|
|
||||||
|
|
||||||
Welcome to [OpenLayers 3](http://ol3js.org/)!
|
|
||||||
|
|
||||||
Check out the [hosted examples](http://ol3js.org/en/master/examples/) or poke around the evolving [API docs](http://ol3js.org/en/master/apidoc/).
|
|
||||||
|
|
||||||
Please see our guide on [contributing](CONTRIBUTING.md) if you're interested in getting involved.
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
{
|
|
||||||
"opts": {
|
|
||||||
"recurse": true,
|
|
||||||
"template": "apidoc/template"
|
|
||||||
},
|
|
||||||
"tags": {
|
|
||||||
"allowUnknownTags": true
|
|
||||||
},
|
|
||||||
"source": {
|
|
||||||
"includePattern": ".+\\.js(doc)?$",
|
|
||||||
"excludePattern": "(^|\\/|\\\\)_"
|
|
||||||
},
|
|
||||||
"plugins": [
|
|
||||||
"plugins/markdown",
|
|
||||||
"apidoc/plugins/inheritdoc",
|
|
||||||
"apidoc/plugins/exports"
|
|
||||||
],
|
|
||||||
"markdown": {
|
|
||||||
"parser": "gfm"
|
|
||||||
},
|
|
||||||
"templates": {
|
|
||||||
"cleverLinks": false,
|
|
||||||
"monospaceLinks": false,
|
|
||||||
"default": {
|
|
||||||
"outputSourceFiles": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"jsVersion": 180
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
Finding your way around
|
|
||||||
-----------------------
|
|
||||||
See the class list to the right and especially take a look at {@link ol.Map} and {@link ol.layer.Layer} because those are the central objects.
|
|
||||||
|
|
||||||
In general every use of OpenLayers starts by initializing a map, then adding the required layers. Controls and interactions can be added to change the behavior of the map.
|
|
||||||
|
|
||||||
Projections
|
|
||||||
-----------
|
|
||||||
A {@link ol.proj.Projection} defines which point on earth is represented by a pair of coordinates.
|
|
||||||
Coordinates within OpenLayers can be used in various projections where some common projections are always supported,
|
|
||||||
others can be used via [Proj4js](http://trac.osgeo.org/proj4js/).
|
|
||||||
|
|
||||||
Maps and Layers
|
|
||||||
---------------
|
|
||||||
A map in OpenLayers is essentially a staple of layers that is viewed from the top. Layers are responsible for retieving data and displaying it.
|
|
||||||
|
|
||||||
Contributing
|
|
||||||
------------
|
|
||||||
See [CONTRIBUTING.md](https://github.com/openlayers/ol3/blob/master/CONTRIBUTING.md) for instructions
|
|
||||||
on building and testing OpenLayers. The file does also describes how to commit your changes to OpenLayers.
|
|
||||||
@@ -1,94 +0,0 @@
|
|||||||
/*
|
|
||||||
* This plugin parses goog.exportSymbol and goog.exportProperty calls to build
|
|
||||||
* a list of API symbols and properties. Everything else is marked undocumented,
|
|
||||||
* which will remove it from the docs.
|
|
||||||
*/
|
|
||||||
|
|
||||||
var api = [];
|
|
||||||
|
|
||||||
function collectExports(source) {
|
|
||||||
var i, ii, symbol, property;
|
|
||||||
var syms = source.match(/goog\.exportSymbol\([^\)]*\)/g);
|
|
||||||
if (syms) {
|
|
||||||
i = 0; ii = syms.length;
|
|
||||||
for (; i < ii; ++i) {
|
|
||||||
symbol = syms[i].match(/'([^']*)'/)[1];
|
|
||||||
api.push(symbol);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var props = source.match(/goog\.exportProperty\([^\)]*\)/g);
|
|
||||||
if (props) {
|
|
||||||
i = 0; ii = props.length;
|
|
||||||
for (; i < ii; ++i) {
|
|
||||||
property = props[i].match(/[^,]*,[^,]*,\r?\n? *([^\)]*)\)/)[1]
|
|
||||||
.replace('.prototype.', '#');
|
|
||||||
api.push(property);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var encoding = env.conf.encoding || 'utf8';
|
|
||||||
var fs = require('jsdoc/fs');
|
|
||||||
collectExports(fs.readFileSync('build/src/external/src/exports.js', encoding));
|
|
||||||
collectExports(fs.readFileSync('build/src/external/src/types.js', encoding));
|
|
||||||
|
|
||||||
|
|
||||||
exports.handlers = {
|
|
||||||
|
|
||||||
beforeParse: function(e) {
|
|
||||||
if (/\.js$/.test(e.filename)) {
|
|
||||||
collectExports(e.source);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
newDoclet: function(e) {
|
|
||||||
if (api.indexOf(e.doclet.longname) > -1) {
|
|
||||||
// Add params of API symbols to the API
|
|
||||||
var names, name;
|
|
||||||
var params = e.doclet.params;
|
|
||||||
if (params) {
|
|
||||||
for (var i = 0, ii = params.length; i < ii; ++i) {
|
|
||||||
names = params[i].type.names;
|
|
||||||
if (names) {
|
|
||||||
for (var j = 0, jj=names.length; j < jj; ++j) {
|
|
||||||
name = names[j];
|
|
||||||
if (api.indexOf(name) === -1) {
|
|
||||||
api.push(name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
function filter(e) {
|
|
||||||
if (e.doclet) {
|
|
||||||
var fqn = e.doclet.longname;
|
|
||||||
if (fqn) {
|
|
||||||
e.doclet.undocumented = (api.indexOf(fqn) === -1);
|
|
||||||
// Remove parents that are not part of the API
|
|
||||||
var parent;
|
|
||||||
var parents = e.doclet.augments;
|
|
||||||
if (parents) {
|
|
||||||
for (var i = parents.length - 1; i >= 0; --i) {
|
|
||||||
parent = parents[i];
|
|
||||||
if (api.indexOf(parent) === -1) {
|
|
||||||
parents.splice(i, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.nodeVisitor = {
|
|
||||||
|
|
||||||
visitNode: function(node, e, parser, currentSourceName) {
|
|
||||||
// filter out non-API symbols before the addDocletRef finisher is called
|
|
||||||
e.finishers.unshift(filter);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
/*
|
|
||||||
* This is a hack to prevent inheritDoc and override tags from entirely removing
|
|
||||||
* documentation of the method that inherits the documentation.
|
|
||||||
*
|
|
||||||
* TODO: Remove this hack when https://github.com/jsdoc3/jsdoc/issues/53
|
|
||||||
* is addressed.
|
|
||||||
*/
|
|
||||||
exports.nodeVisitor = {
|
|
||||||
|
|
||||||
visitNode: function(node, e, parser, currentSourceName) {
|
|
||||||
if (/@(inheritDoc|override)(\n|\r)/.test(e.comment)) {
|
|
||||||
e.preventDefault = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
The default template for JSDoc 3 uses: [the Taffy Database library](http://taffydb.com/) and the [Underscore Template library](http://documentcloud.github.com/underscore/#template).
|
|
||||||
@@ -1,392 +0,0 @@
|
|||||||
/*global env: true */
|
|
||||||
var template = require('jsdoc/template'),
|
|
||||||
fs = require('fs'),
|
|
||||||
path = require('path'),
|
|
||||||
taffy = require('taffydb').taffy,
|
|
||||||
helper = require('jsdoc/util/templateHelper'),
|
|
||||||
scopeToPunc = helper.scopeToPunc,
|
|
||||||
hasOwnProp = Object.prototype.hasOwnProperty,
|
|
||||||
data,
|
|
||||||
view,
|
|
||||||
outdir = env.opts.destination;
|
|
||||||
|
|
||||||
|
|
||||||
function find(spec) {
|
|
||||||
return helper.find(data, spec);
|
|
||||||
}
|
|
||||||
|
|
||||||
function tutoriallink(tutorial) {
|
|
||||||
return helper.toTutorial(tutorial, null, { tag: 'em', classname: 'disabled', prefix: 'Tutorial: ' });
|
|
||||||
}
|
|
||||||
|
|
||||||
function getAncestorLinks(doclet) {
|
|
||||||
return helper.getAncestorLinks(data, doclet);
|
|
||||||
}
|
|
||||||
|
|
||||||
var linkto = helper.linkto;
|
|
||||||
|
|
||||||
var htmlsafe = helper.htmlsafe;
|
|
||||||
|
|
||||||
function hashToLink(doclet, hash) {
|
|
||||||
if ( !/^(#.+)/.test(hash) ) { return hash; }
|
|
||||||
|
|
||||||
var url = helper.createLink(doclet);
|
|
||||||
|
|
||||||
url = url.replace(/(#.+|$)/, hash);
|
|
||||||
return '<a href="' + url + '">' + hash + '</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
function addSignatureParams(f) {
|
|
||||||
var params = helper.getSignatureParams(f, 'optional');
|
|
||||||
|
|
||||||
f.signature = (f.signature || '') + '('+params.join(', ')+')';
|
|
||||||
}
|
|
||||||
|
|
||||||
function addSignatureReturns(f) {
|
|
||||||
var returnTypes = helper.getSignatureReturns(f);
|
|
||||||
|
|
||||||
f.signature = '<span class="signature">'+(f.signature || '') + '</span>' + '<span class="type-signature">'+(returnTypes.length? ' → {'+returnTypes.join('|')+'}' : '')+'</span>';
|
|
||||||
}
|
|
||||||
|
|
||||||
function addSignatureTypes(f) {
|
|
||||||
var types = helper.getSignatureTypes(f);
|
|
||||||
|
|
||||||
f.signature = (f.signature || '') + '<span class="type-signature">'+(types.length? ' :'+types.join('|') : '')+'</span>';
|
|
||||||
}
|
|
||||||
|
|
||||||
function addAttribs(f) {
|
|
||||||
var attribs = helper.getAttribs(f);
|
|
||||||
|
|
||||||
f.attribs = '<span class="type-signature">'+htmlsafe(attribs.length? '<'+attribs.join(', ')+'> ' : '')+'</span>';
|
|
||||||
}
|
|
||||||
|
|
||||||
function generate(title, docs, filename) {
|
|
||||||
var docData = {
|
|
||||||
title: title,
|
|
||||||
docs: docs
|
|
||||||
};
|
|
||||||
|
|
||||||
var outpath = path.join(outdir, filename),
|
|
||||||
html = view.render('container.tmpl', docData);
|
|
||||||
|
|
||||||
html = helper.resolveLinks(html); // turn {@link foo} into <a href="foodoc.html">foo</a>
|
|
||||||
|
|
||||||
fs.writeFileSync(outpath, html, 'utf8');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create the navigation sidebar.
|
|
||||||
* @param {object} members The members that will be used to create the sidebar.
|
|
||||||
* @param {array<object>} members.classes
|
|
||||||
* @param {array<object>} members.externals
|
|
||||||
* @param {array<object>} members.globals
|
|
||||||
* @param {array<object>} members.mixins
|
|
||||||
* @param {array<object>} members.modules
|
|
||||||
* @param {array<object>} members.namespaces
|
|
||||||
* @param {array<object>} members.tutorials
|
|
||||||
* @return {string} The HTML for the navigation sidebar.
|
|
||||||
*/
|
|
||||||
function buildNav(members) {
|
|
||||||
var nav = '<h2><a href="index.html">Index</a></h2>',
|
|
||||||
seen = {};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sorts elements by their qualified names (property longname).
|
|
||||||
* See https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/sort
|
|
||||||
* @param {object} a
|
|
||||||
* @param {object} b
|
|
||||||
* @return {number}
|
|
||||||
*/
|
|
||||||
function byLongName(a, b){
|
|
||||||
if(a.longname===b.longname){
|
|
||||||
return 0;
|
|
||||||
} else if(a.longname < b.longname){
|
|
||||||
return -1;
|
|
||||||
} else {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (members.modules.length) {
|
|
||||||
nav += '<h3>Modules</h3><ul>';
|
|
||||||
members.modules.sort(byLongName).forEach(function(m) {
|
|
||||||
if ( !hasOwnProp.call(seen, m.longname) ) {
|
|
||||||
nav += '<li>'+linkto(m.longname, m.longname)+'</li>';
|
|
||||||
}
|
|
||||||
seen[m.longname] = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
nav += '</ul>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (members.externals.length) {
|
|
||||||
nav += '<h3>Externals</h3><ul>';
|
|
||||||
members.externals.sort(byLongName).forEach(function(e) {
|
|
||||||
if ( !hasOwnProp.call(seen, e.longname) ) {
|
|
||||||
nav += '<li>'+linkto( e.longname, e.name.replace(/(^"|"$)/g, '') )+'</li>';
|
|
||||||
}
|
|
||||||
seen[e.longname] = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
nav += '</ul>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (members.classes.length) {
|
|
||||||
var moduleClasses = 0;
|
|
||||||
members.classes.sort(byLongName).forEach(function(c) {
|
|
||||||
var moduleSameName = find({kind: 'module', longname: c.longname});
|
|
||||||
if (moduleSameName.length) {
|
|
||||||
c.name = c.name.replace('module:', 'require("')+'")';
|
|
||||||
moduleClasses++;
|
|
||||||
moduleSameName[0].module = c;
|
|
||||||
}
|
|
||||||
if (moduleClasses !== -1 && moduleClasses < members.classes.length) {
|
|
||||||
nav += '<h3>Classes</h3><ul>';
|
|
||||||
moduleClasses = -1;
|
|
||||||
}
|
|
||||||
if ( !hasOwnProp.call(seen, c.longname) ) {
|
|
||||||
nav += '<li>'+linkto(c.longname, c.longname)+'</li>';
|
|
||||||
}
|
|
||||||
seen[c.longname] = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
nav += '</ul>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (members.namespaces.length) {
|
|
||||||
nav += '<h3>Namespaces</h3><ul>';
|
|
||||||
members.namespaces.sort(byLongName).forEach(function(n) {
|
|
||||||
if ( !hasOwnProp.call(seen, n.longname) ) {
|
|
||||||
nav += '<li>'+linkto(n.longname, n.longname)+'</li>';
|
|
||||||
}
|
|
||||||
seen[n.longname] = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
nav += '</ul>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (members.mixins.length) {
|
|
||||||
nav += '<h3>Mixins</h3><ul>';
|
|
||||||
members.mixins.sort(byLongName).forEach(function(m) {
|
|
||||||
if ( !hasOwnProp.call(seen, m.longname) ) {
|
|
||||||
nav += '<li>'+linkto(m.longname, m.longname)+'</li>';
|
|
||||||
}
|
|
||||||
seen[m.longname] = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
nav += '</ul>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (members.tutorials.length) {
|
|
||||||
nav += '<h3>Tutorials</h3><ul>';
|
|
||||||
members.tutorials.sort(byLongName).forEach(function(t) {
|
|
||||||
nav += '<li>'+tutoriallink(t.name)+'</li>';
|
|
||||||
});
|
|
||||||
|
|
||||||
nav += '</ul>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (members.globals.length) {
|
|
||||||
nav += '<h3>Global</h3><ul>';
|
|
||||||
members.globals.sort(byLongName).forEach(function(g) {
|
|
||||||
if ( g.kind !== 'typedef' && !hasOwnProp.call(seen, g.longname) ) {
|
|
||||||
nav += '<li>'+linkto(g.longname, g.longname)+'</li>';
|
|
||||||
}
|
|
||||||
seen[g.longname] = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
nav += '</ul>';
|
|
||||||
}
|
|
||||||
|
|
||||||
return nav;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
@param {TAFFY} taffyData See <http://taffydb.com/>.
|
|
||||||
@param {object} opts
|
|
||||||
@param {Tutorial} tutorials
|
|
||||||
*/
|
|
||||||
exports.publish = function(taffyData, opts, tutorials) {
|
|
||||||
data = taffyData;
|
|
||||||
|
|
||||||
var templatePath = opts.template;
|
|
||||||
view = new template.Template(templatePath + '/tmpl');
|
|
||||||
|
|
||||||
// set up templating
|
|
||||||
view.layout = 'layout.tmpl';
|
|
||||||
|
|
||||||
// set up tutorials for helper
|
|
||||||
helper.setTutorials(tutorials);
|
|
||||||
|
|
||||||
data = helper.prune(data);
|
|
||||||
data.sort('longname, version, since');
|
|
||||||
|
|
||||||
data().each(function(doclet) {
|
|
||||||
doclet.attribs = '';
|
|
||||||
|
|
||||||
if (doclet.examples) {
|
|
||||||
doclet.examples = doclet.examples.map(function(example) {
|
|
||||||
var caption, code;
|
|
||||||
|
|
||||||
if (example.match(/^\s*<caption>([\s\S]+?)<\/caption>(\s*[\n\r])([\s\S]+)$/i)) {
|
|
||||||
caption = RegExp.$1;
|
|
||||||
code = RegExp.$3;
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
caption: caption || '',
|
|
||||||
code: code || example
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (doclet.see) {
|
|
||||||
doclet.see.forEach(function(seeItem, i) {
|
|
||||||
doclet.see[i] = hashToLink(doclet, seeItem);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// update outdir if necessary, then create outdir
|
|
||||||
var packageInfo = ( find({kind: 'package'}) || [] ) [0];
|
|
||||||
if (packageInfo && packageInfo.name) {
|
|
||||||
outdir = path.join(outdir, packageInfo.name, packageInfo.version);
|
|
||||||
}
|
|
||||||
fs.mkPath(outdir);
|
|
||||||
|
|
||||||
// copy static files to outdir
|
|
||||||
var fromDir = path.join(templatePath, 'static'),
|
|
||||||
staticFiles = fs.ls(fromDir, 3);
|
|
||||||
|
|
||||||
staticFiles.forEach(function(fileName) {
|
|
||||||
var toDir = fs.toDir( fileName.replace(fromDir, outdir) );
|
|
||||||
fs.mkPath(toDir);
|
|
||||||
fs.copyFileSync(fileName, toDir);
|
|
||||||
});
|
|
||||||
|
|
||||||
data().each(function(doclet) {
|
|
||||||
var url = helper.createLink(doclet);
|
|
||||||
helper.registerLink(doclet.longname, url);
|
|
||||||
});
|
|
||||||
|
|
||||||
data().each(function(doclet) {
|
|
||||||
var url = helper.longnameToUrl[doclet.longname];
|
|
||||||
|
|
||||||
if (url.indexOf('#') > -1) {
|
|
||||||
doclet.id = helper.longnameToUrl[doclet.longname].split(/#/).pop();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
doclet.id = doclet.name;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (doclet.kind === 'function' || doclet.kind === 'class') {
|
|
||||||
addSignatureParams(doclet);
|
|
||||||
addSignatureReturns(doclet);
|
|
||||||
addAttribs(doclet);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// do this after the urls have all been generated
|
|
||||||
data().each(function(doclet) {
|
|
||||||
doclet.ancestors = getAncestorLinks(doclet);
|
|
||||||
|
|
||||||
doclet.signature = '';
|
|
||||||
|
|
||||||
if (doclet.kind === 'member') {
|
|
||||||
addSignatureTypes(doclet);
|
|
||||||
addAttribs(doclet);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (doclet.kind === 'constant') {
|
|
||||||
addSignatureTypes(doclet);
|
|
||||||
addAttribs(doclet);
|
|
||||||
doclet.kind = 'member';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var members = helper.getMembers(data);
|
|
||||||
members.tutorials = tutorials.children;
|
|
||||||
|
|
||||||
// add template helpers
|
|
||||||
view.find = find;
|
|
||||||
view.linkto = linkto;
|
|
||||||
view.tutoriallink = tutoriallink;
|
|
||||||
view.htmlsafe = htmlsafe;
|
|
||||||
|
|
||||||
// once for all
|
|
||||||
view.nav = buildNav(members);
|
|
||||||
|
|
||||||
for (var longname in helper.longnameToUrl) {
|
|
||||||
if ( hasOwnProp.call(helper.longnameToUrl, longname) ) {
|
|
||||||
// reuse 'members', which speeds things up a bit
|
|
||||||
var classes = taffy(members.classes);
|
|
||||||
classes = helper.find(classes, {longname: longname});
|
|
||||||
if (classes.length) {
|
|
||||||
generate('Class: ' + classes[0].longname, classes, helper.longnameToUrl[longname]);
|
|
||||||
}
|
|
||||||
|
|
||||||
var modules = taffy(members.modules);
|
|
||||||
modules = helper.find(modules, {longname: longname});
|
|
||||||
if (modules.length) {
|
|
||||||
generate('Module: ' + modules[0].longname, modules, helper.longnameToUrl[longname]);
|
|
||||||
}
|
|
||||||
|
|
||||||
var namespaces = taffy(members.namespaces);
|
|
||||||
namespaces = helper.find(namespaces, {longname: longname});
|
|
||||||
if (namespaces.length) {
|
|
||||||
generate('Namespace: ' + namespaces[0].longname, namespaces, helper.longnameToUrl[longname]);
|
|
||||||
}
|
|
||||||
|
|
||||||
var mixins = taffy(members.mixins);
|
|
||||||
mixins = helper.find(mixins, {longname: longname});
|
|
||||||
if (mixins.length) {
|
|
||||||
generate('Mixin: ' + mixins[0].longname, mixins, helper.longnameToUrl[longname]);
|
|
||||||
}
|
|
||||||
|
|
||||||
var externals = taffy(members.externals);
|
|
||||||
externals = helper.find(externals, {longname: longname});
|
|
||||||
if (externals.length) {
|
|
||||||
generate('External: ' + externals[0].longname, externals, helper.longnameToUrl[longname]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (members.globals.length) { generate('Global', members.globals, 'global.html'); }
|
|
||||||
|
|
||||||
// index page displays information from package.json and lists files
|
|
||||||
var files = find({kind: 'file'}),
|
|
||||||
packages = find({kind: 'package'});
|
|
||||||
|
|
||||||
generate('Index',
|
|
||||||
packages.concat(
|
|
||||||
[{kind: 'mainpage', readme: opts.readme, longname: (opts.mainpagetitle) ? opts.mainpagetitle : 'Main Page'}]
|
|
||||||
).concat(files),
|
|
||||||
'index.html');
|
|
||||||
|
|
||||||
// TODO: move the tutorial functions to templateHelper.js
|
|
||||||
function generateTutorial(title, tutorial, filename) {
|
|
||||||
var tutorialData = {
|
|
||||||
title: title,
|
|
||||||
header: tutorial.title,
|
|
||||||
content: tutorial.parse(),
|
|
||||||
children: tutorial.children
|
|
||||||
};
|
|
||||||
|
|
||||||
var tutorialPath = path.join(outdir, filename),
|
|
||||||
html = view.render('tutorial.tmpl', tutorialData);
|
|
||||||
|
|
||||||
// yes, you can use {@link} in tutorials too!
|
|
||||||
html = helper.resolveLinks(html); // turn {@link foo} into <a href="foodoc.html">foo</a>
|
|
||||||
|
|
||||||
fs.writeFileSync(tutorialPath, html, 'utf8');
|
|
||||||
}
|
|
||||||
|
|
||||||
// tutorials can have only one parent so there is no risk for loops
|
|
||||||
function saveChildren(node) {
|
|
||||||
node.children.forEach(function(child) {
|
|
||||||
generateTutorial('Tutorial: ' + child.title, child, helper.tutorialToUrl(child.name));
|
|
||||||
saveChildren(child);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
saveChildren(tutorials);
|
|
||||||
};
|
|
||||||
@@ -1,202 +0,0 @@
|
|||||||
|
|
||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright [yyyy] [name of copyright owner]
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n"]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com",
|
|
||||||
/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]);
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
|
|
||||||
(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=
|
|
||||||
[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c<i;++c){var j=f[c];if(/\\[bdsw]/i.test(j))a.push(j);else{var j=m(j),d;c+2<i&&"-"===f[c+1]?(d=m(f[c+2]),c+=2):d=j;b.push([j,d]);d<65||j>122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;c<b.length;++c)i=b[c],i[0]<=j[1]+1?j[1]=Math.max(j[1],i[1]):f.push(j=i);b=["["];o&&b.push("^");b.push.apply(b,a);for(c=0;c<
|
|
||||||
f.length;++c)i=f[c],b.push(e(i[0])),i[1]>i[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c<b;++c){var j=f[c];j==="("?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&j<=i&&(d[j]=-1)}for(c=1;c<d.length;++c)-1===d[c]&&(d[c]=++t);for(i=c=0;c<b;++c)j=f[c],j==="("?(++i,d[i]===void 0&&(f[c]="(?:")):"\\"===j.charAt(0)&&
|
|
||||||
(j=+j.substring(1))&&j<=i&&(f[c]="\\"+d[i]);for(i=c=0;c<b;++c)"^"===f[c]&&"^"!==f[c+1]&&(f[c]="");if(a.ignoreCase&&s)for(c=0;c<b;++c)j=f[c],a=j.charAt(0),j.length>=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p<d;++p){var g=a[p];if(g.ignoreCase)l=!0;else if(/[a-z]/i.test(g.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){s=!0;l=!1;break}}for(var r=
|
|
||||||
{b:8,t:9,n:10,v:11,f:12,r:13},n=[],p=0,d=a.length;p<d;++p){g=a[p];if(g.global||g.multiline)throw Error(""+g);n.push("(?:"+y(g)+")")}return RegExp(n.join("|"),l?"gi":"g")}function M(a){function m(a){switch(a.nodeType){case 1:if(e.test(a.className))break;for(var g=a.firstChild;g;g=g.nextSibling)m(g);g=a.nodeName;if("BR"===g||"LI"===g)h[s]="\n",t[s<<1]=y++,t[s++<<1|1]=a;break;case 3:case 4:g=a.nodeValue,g.length&&(g=p?g.replace(/\r\n?/g,"\n"):g.replace(/[\t\n\r ]+/g," "),h[s]=g,t[s<<1]=y,y+=g.length,
|
|
||||||
t[s++<<1|1]=a)}}var e=/(?:^|\s)nocode(?:\s|$)/,h=[],y=0,t=[],s=0,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);m(a);return{a:h.join("").replace(/\n$/,""),c:t}}function B(a,m,e,h){m&&(a={a:m,d:a},e(a),h.push.apply(h,a.e))}function x(a,m){function e(a){for(var l=a.d,p=[l,"pln"],d=0,g=a.a.match(y)||[],r={},n=0,z=g.length;n<z;++n){var f=g[n],b=r[f],o=void 0,c;if(typeof b===
|
|
||||||
"string")c=!1;else{var i=h[f.charAt(0)];if(i)o=f.match(i[1]),b=i[0];else{for(c=0;c<t;++c)if(i=m[c],o=f.match(i[1])){b=i[0];break}o||(b="pln")}if((c=b.length>=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m),
|
|
||||||
l=[],p={},d=0,g=e.length;d<g;++d){var r=e[d],n=r[3];if(n)for(var k=n.length;--k>=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
|
|
||||||
q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/,
|
|
||||||
q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g,
|
|
||||||
"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a),
|
|
||||||
a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e}
|
|
||||||
for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g<d.length;++g)e(d[g]);m===(m|0)&&d[0].setAttribute("value",
|
|
||||||
m);var r=s.createElement("OL");r.className="linenums";for(var n=Math.max(0,m-1|0)||0,g=0,z=d.length;g<z;++g)l=d[g],l.className="L"+(g+n)%10,l.firstChild||l.appendChild(s.createTextNode("\xa0")),r.appendChild(l);a.appendChild(r)}function k(a,m){for(var e=m.length;--e>=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*</.test(m)?"default-markup":"default-code";return A[a]}function E(a){var m=
|
|
||||||
a.g;try{var e=M(a.h),h=e.a;a.a=h;a.c=e.c;a.d=0;C(m,h)(a);var k=/\bMSIE\b/.test(navigator.userAgent),m=/\n/g,t=a.a,s=t.length,e=0,l=a.c,p=l.length,h=0,d=a.e,g=d.length,a=0;d[g]=s;var r,n;for(n=r=0;n<g;)d[n]!==d[n+2]?(d[r++]=d[n++],d[r++]=d[n++]):n+=2;g=r;for(n=r=0;n<g;){for(var z=d[n],f=d[n+1],b=n+2;b+2<=g&&d[b+1]===f;)b+=2;d[r++]=z;d[r++]=f;n=b}for(d.length=r;h<p;){var o=l[h+2]||s,c=d[a+2]||s,b=Math.min(o,c),i=l[h+1],j;if(i.nodeType!==1&&(j=t.substring(e,b))){k&&(j=j.replace(m,"\r"));i.nodeValue=
|
|
||||||
j;var u=i.ownerDocument,v=u.createElement("SPAN");v.className=d[a+1];var x=i.parentNode;x.replaceChild(v,i);v.appendChild(i);e<o&&(l[h+1]=i=u.createTextNode(t.substring(b,o)),x.insertBefore(i,v.nextSibling))}e=b;e>=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
|
|
||||||
"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],
|
|
||||||
H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
|
|
||||||
J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+
|
|
||||||
I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),
|
|
||||||
["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",
|
|
||||||
/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),
|
|
||||||
["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",
|
|
||||||
hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p<h.length&&l.now()<e;p++){var n=h[p],k=n.className;if(k.indexOf("prettyprint")>=0){var k=k.match(g),f,b;if(b=
|
|
||||||
!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p<h.length?setTimeout(m,
|
|
||||||
250):a&&a()}for(var e=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],h=[],k=0;k<e.length;++k)for(var t=0,s=e[k].length;t<s;++t)h.push(e[k][t]);var e=q,l=Date;l.now||(l={now:function(){return+new Date}});var p=0,d,g=/\blang(?:uage)?-([\w.]+)(?!\S)/;m()};window.PR={createSimpleLexer:x,registerLangHandler:k,sourceDecorator:u,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",
|
|
||||||
PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})();
|
|
||||||
@@ -1,285 +0,0 @@
|
|||||||
html
|
|
||||||
{
|
|
||||||
overflow: auto;
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
body
|
|
||||||
{
|
|
||||||
font: 14px "DejaVu Sans Condensed", "Liberation Sans", "Nimbus Sans L", Tahoma, Geneva, "Helvetica Neue", Helvetica, Arial, sans serif;
|
|
||||||
line-height: 130%;
|
|
||||||
color: #000;
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #444;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:visited {
|
|
||||||
color: #444;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:active {
|
|
||||||
color: #444;
|
|
||||||
}
|
|
||||||
|
|
||||||
header
|
|
||||||
{
|
|
||||||
display: block;
|
|
||||||
padding: 6px 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.class-description {
|
|
||||||
font-style: italic;
|
|
||||||
font-family: Palatino, 'Palatino Linotype', serif;
|
|
||||||
font-size: 130%;
|
|
||||||
line-height: 140%;
|
|
||||||
margin-bottom: 1em;
|
|
||||||
margin-top: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
#main {
|
|
||||||
float: left;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
section
|
|
||||||
{
|
|
||||||
display: block;
|
|
||||||
|
|
||||||
background-color: #fff;
|
|
||||||
padding: 12px 24px;
|
|
||||||
border-bottom: 1px solid #ccc;
|
|
||||||
margin-right: 240px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.variation {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.optional:after {
|
|
||||||
content: "opt";
|
|
||||||
font-size: 60%;
|
|
||||||
color: #aaa;
|
|
||||||
font-style: italic;
|
|
||||||
font-weight: lighter;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav
|
|
||||||
{
|
|
||||||
display: block;
|
|
||||||
float: left;
|
|
||||||
margin-left: -230px;
|
|
||||||
margin-top: 28px;
|
|
||||||
width: 220px;
|
|
||||||
border-left: 1px solid #ccc;
|
|
||||||
padding-left: 9px;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav ul {
|
|
||||||
font-family: 'Lucida Grande', 'Lucida Sans Unicode', arial, sans-serif;
|
|
||||||
font-size: 100%;
|
|
||||||
line-height: 17px;
|
|
||||||
padding:0;
|
|
||||||
margin:0;
|
|
||||||
list-style-type:none;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav h2 a, nav h2 a:visited {
|
|
||||||
color: #A35A00;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav h3 {
|
|
||||||
margin-top: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav li {
|
|
||||||
margin-top: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav a {
|
|
||||||
color: #5C5954;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav a:visited {
|
|
||||||
color: #5C5954;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav a:active {
|
|
||||||
color: #5C5954;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer {
|
|
||||||
display: block;
|
|
||||||
padding: 6px;
|
|
||||||
margin-top: 12px;
|
|
||||||
font-style: italic;
|
|
||||||
font-size: 90%;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1
|
|
||||||
{
|
|
||||||
font-size: 200%;
|
|
||||||
font-weight: bold;
|
|
||||||
letter-spacing: -0.01em;
|
|
||||||
margin: 6px 0 9px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2
|
|
||||||
{
|
|
||||||
font-size: 170%;
|
|
||||||
font-weight: bold;
|
|
||||||
letter-spacing: -0.01em;
|
|
||||||
margin: 6px 0 3px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
h3
|
|
||||||
{
|
|
||||||
font-size: 150%;
|
|
||||||
font-weight: bold;
|
|
||||||
letter-spacing: -0.01em;
|
|
||||||
margin-top: 16px;
|
|
||||||
margin: 6px 0 3px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
h4
|
|
||||||
{
|
|
||||||
font-size: 130%;
|
|
||||||
font-weight: bold;
|
|
||||||
letter-spacing: -0.01em;
|
|
||||||
margin-top: 16px;
|
|
||||||
margin: 18px 0 3px 0;
|
|
||||||
color: #A35A00;
|
|
||||||
}
|
|
||||||
|
|
||||||
h5, .container-overview .subsection-title
|
|
||||||
{
|
|
||||||
font-size: 120%;
|
|
||||||
font-weight: bold;
|
|
||||||
letter-spacing: -0.01em;
|
|
||||||
margin: 8px 0 3px -16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h6
|
|
||||||
{
|
|
||||||
font-size: 100%;
|
|
||||||
letter-spacing: -0.01em;
|
|
||||||
margin: 6px 0 3px 0;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.protected {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
dt.tag-source, dd.tag-source {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ancestors { color: #999; }
|
|
||||||
.ancestors a
|
|
||||||
{
|
|
||||||
color: #999 !important;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.important
|
|
||||||
{
|
|
||||||
font-weight: bold;
|
|
||||||
color: #950B02;
|
|
||||||
}
|
|
||||||
|
|
||||||
.yes-def {
|
|
||||||
text-indent: -1000px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.type-signature {
|
|
||||||
color: #aaa;
|
|
||||||
}
|
|
||||||
|
|
||||||
.name, .signature {
|
|
||||||
font-family: Consolas, "Lucida Console", Monaco, monospace;
|
|
||||||
}
|
|
||||||
|
|
||||||
.details { margin-top: 14px; }
|
|
||||||
.details dt { width:110px; float:left; border-left: 2px solid #DDD; padding-left: 10px; padding-top: 6px; }
|
|
||||||
.details dd { margin-left: 50px; }
|
|
||||||
.details ul { margin: 0; }
|
|
||||||
.details ul { list-style-type: none; }
|
|
||||||
.details li { margin-left: 30px; padding-top: 6px; }
|
|
||||||
|
|
||||||
.description {
|
|
||||||
margin-bottom: 1em;
|
|
||||||
margin-left: -16px;
|
|
||||||
margin-top: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.code-caption
|
|
||||||
{
|
|
||||||
font-style: italic;
|
|
||||||
font-family: Palatino, 'Palatino Linotype', serif;
|
|
||||||
font-size: 107%;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.prettyprint
|
|
||||||
{
|
|
||||||
border: 1px solid #ddd;
|
|
||||||
width: 80%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.prettyprint code
|
|
||||||
{
|
|
||||||
font-family: Consolas, 'Lucida Console', Monaco, monospace;
|
|
||||||
font-size: 100%;
|
|
||||||
line-height: 18px;
|
|
||||||
display: block;
|
|
||||||
padding: 4px 12px;
|
|
||||||
margin: 0;
|
|
||||||
background-color: #fff;
|
|
||||||
color: #000;
|
|
||||||
border-left: 3px #ddd solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
.params, .props
|
|
||||||
{
|
|
||||||
border-spacing: 0;
|
|
||||||
border: 0;
|
|
||||||
border-collapse: collapse;
|
|
||||||
}
|
|
||||||
|
|
||||||
.params .name, .props .name, .name code {
|
|
||||||
color: #A35A00;
|
|
||||||
font-family: Consolas, 'Lucida Console', Monaco, monospace;
|
|
||||||
font-size: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.params td, .params th, .props td, .props th
|
|
||||||
{
|
|
||||||
border: 1px solid #ddd;
|
|
||||||
margin: 0px;
|
|
||||||
text-align: left;
|
|
||||||
vertical-align: top;
|
|
||||||
padding: 4px 6px;
|
|
||||||
display: table-cell;
|
|
||||||
}
|
|
||||||
|
|
||||||
.params thead tr, .props thead tr
|
|
||||||
{
|
|
||||||
background-color: #ddd;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.params .params thead tr, .props .props thead tr
|
|
||||||
{
|
|
||||||
background-color: #fff;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.params th, .props th { border-right: 1px solid #aaa; }
|
|
||||||
.params thead .last, .props thead .last { border-right: 1px solid #ddd; }
|
|
||||||
|
|
||||||
.disabled {
|
|
||||||
color: #454545;
|
|
||||||
}
|
|
||||||
@@ -1,111 +0,0 @@
|
|||||||
/* JSDoc prettify.js theme */
|
|
||||||
|
|
||||||
/* plain text */
|
|
||||||
.pln {
|
|
||||||
color: #000000;
|
|
||||||
font-weight: normal;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* string content */
|
|
||||||
.str {
|
|
||||||
color: #006400;
|
|
||||||
font-weight: normal;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* a keyword */
|
|
||||||
.kwd {
|
|
||||||
color: #000000;
|
|
||||||
font-weight: bold;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* a comment */
|
|
||||||
.com {
|
|
||||||
font-weight: normal;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* a type name */
|
|
||||||
.typ {
|
|
||||||
color: #000000;
|
|
||||||
font-weight: normal;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* a literal value */
|
|
||||||
.lit {
|
|
||||||
color: #006400;
|
|
||||||
font-weight: normal;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* punctuation */
|
|
||||||
.pun {
|
|
||||||
color: #000000;
|
|
||||||
font-weight: bold;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* lisp open bracket */
|
|
||||||
.opn {
|
|
||||||
color: #000000;
|
|
||||||
font-weight: bold;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* lisp close bracket */
|
|
||||||
.clo {
|
|
||||||
color: #000000;
|
|
||||||
font-weight: bold;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* a markup tag name */
|
|
||||||
.tag {
|
|
||||||
color: #006400;
|
|
||||||
font-weight: normal;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* a markup attribute name */
|
|
||||||
.atn {
|
|
||||||
color: #006400;
|
|
||||||
font-weight: normal;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* a markup attribute value */
|
|
||||||
.atv {
|
|
||||||
color: #006400;
|
|
||||||
font-weight: normal;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* a declaration */
|
|
||||||
.dec {
|
|
||||||
color: #000000;
|
|
||||||
font-weight: bold;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* a variable name */
|
|
||||||
.var {
|
|
||||||
color: #000000;
|
|
||||||
font-weight: normal;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* a function name */
|
|
||||||
.fun {
|
|
||||||
color: #000000;
|
|
||||||
font-weight: bold;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Specify class=linenums on a pre to get line numbering */
|
|
||||||
ol.linenums {
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
@@ -1,132 +0,0 @@
|
|||||||
/* Tomorrow Theme */
|
|
||||||
/* Original theme - https://github.com/chriskempson/tomorrow-theme */
|
|
||||||
/* Pretty printing styles. Used with prettify.js. */
|
|
||||||
/* SPAN elements with the classes below are added by prettyprint. */
|
|
||||||
/* plain text */
|
|
||||||
.pln {
|
|
||||||
color: #4d4d4c; }
|
|
||||||
|
|
||||||
@media screen {
|
|
||||||
/* string content */
|
|
||||||
.str {
|
|
||||||
color: #718c00; }
|
|
||||||
|
|
||||||
/* a keyword */
|
|
||||||
.kwd {
|
|
||||||
color: #8959a8; }
|
|
||||||
|
|
||||||
/* a comment */
|
|
||||||
.com {
|
|
||||||
color: #8e908c; }
|
|
||||||
|
|
||||||
/* a type name */
|
|
||||||
.typ {
|
|
||||||
color: #4271ae; }
|
|
||||||
|
|
||||||
/* a literal value */
|
|
||||||
.lit {
|
|
||||||
color: #f5871f; }
|
|
||||||
|
|
||||||
/* punctuation */
|
|
||||||
.pun {
|
|
||||||
color: #4d4d4c; }
|
|
||||||
|
|
||||||
/* lisp open bracket */
|
|
||||||
.opn {
|
|
||||||
color: #4d4d4c; }
|
|
||||||
|
|
||||||
/* lisp close bracket */
|
|
||||||
.clo {
|
|
||||||
color: #4d4d4c; }
|
|
||||||
|
|
||||||
/* a markup tag name */
|
|
||||||
.tag {
|
|
||||||
color: #c82829; }
|
|
||||||
|
|
||||||
/* a markup attribute name */
|
|
||||||
.atn {
|
|
||||||
color: #f5871f; }
|
|
||||||
|
|
||||||
/* a markup attribute value */
|
|
||||||
.atv {
|
|
||||||
color: #3e999f; }
|
|
||||||
|
|
||||||
/* a declaration */
|
|
||||||
.dec {
|
|
||||||
color: #f5871f; }
|
|
||||||
|
|
||||||
/* a variable name */
|
|
||||||
.var {
|
|
||||||
color: #c82829; }
|
|
||||||
|
|
||||||
/* a function name */
|
|
||||||
.fun {
|
|
||||||
color: #4271ae; } }
|
|
||||||
/* Use higher contrast and text-weight for printable form. */
|
|
||||||
@media print, projection {
|
|
||||||
.str {
|
|
||||||
color: #060; }
|
|
||||||
|
|
||||||
.kwd {
|
|
||||||
color: #006;
|
|
||||||
font-weight: bold; }
|
|
||||||
|
|
||||||
.com {
|
|
||||||
color: #600;
|
|
||||||
font-style: italic; }
|
|
||||||
|
|
||||||
.typ {
|
|
||||||
color: #404;
|
|
||||||
font-weight: bold; }
|
|
||||||
|
|
||||||
.lit {
|
|
||||||
color: #044; }
|
|
||||||
|
|
||||||
.pun, .opn, .clo {
|
|
||||||
color: #440; }
|
|
||||||
|
|
||||||
.tag {
|
|
||||||
color: #006;
|
|
||||||
font-weight: bold; }
|
|
||||||
|
|
||||||
.atn {
|
|
||||||
color: #404; }
|
|
||||||
|
|
||||||
.atv {
|
|
||||||
color: #060; } }
|
|
||||||
/* Style */
|
|
||||||
/*
|
|
||||||
pre.prettyprint {
|
|
||||||
background: white;
|
|
||||||
font-family: Menlo, Monaco, Consolas, monospace;
|
|
||||||
font-size: 12px;
|
|
||||||
line-height: 1.5;
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
padding: 10px; }
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Specify class=linenums on a pre to get line numbering */
|
|
||||||
ol.linenums {
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 0; }
|
|
||||||
|
|
||||||
/* IE indents via margin-left */
|
|
||||||
li.L0,
|
|
||||||
li.L1,
|
|
||||||
li.L2,
|
|
||||||
li.L3,
|
|
||||||
li.L4,
|
|
||||||
li.L5,
|
|
||||||
li.L6,
|
|
||||||
li.L7,
|
|
||||||
li.L8,
|
|
||||||
li.L9 {
|
|
||||||
/* */ }
|
|
||||||
|
|
||||||
/* Alternate shading for lines */
|
|
||||||
li.L1,
|
|
||||||
li.L3,
|
|
||||||
li.L5,
|
|
||||||
li.L7,
|
|
||||||
li.L9 {
|
|
||||||
/* */ }
|
|
||||||
@@ -1,143 +0,0 @@
|
|||||||
<?js
|
|
||||||
var self = this;
|
|
||||||
docs.forEach(function(doc, i) {
|
|
||||||
?>
|
|
||||||
|
|
||||||
<?js if (doc.kind === 'mainpage' || (doc.kind === 'package')) { ?>
|
|
||||||
<?js= self.partial('mainpage.tmpl', doc) ?>
|
|
||||||
<?js } else { ?>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
|
|
||||||
<header>
|
|
||||||
<h2><?js if (doc.ancestors && doc.ancestors.length) { ?>
|
|
||||||
<span class="ancestors"><?js= doc.ancestors.join('') ?></span>
|
|
||||||
<?js } ?>
|
|
||||||
<?js= doc.longname ?>
|
|
||||||
<?js if (doc.variation) { ?>
|
|
||||||
<sup class="variation"><?js= doc.variation ?></sup>
|
|
||||||
<?js } ?></h2>
|
|
||||||
<?js if (doc.classdesc) { ?>
|
|
||||||
<div class="class-description"><?js= doc.classdesc ?></div>
|
|
||||||
<?js } ?>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<article>
|
|
||||||
<div class="container-overview">
|
|
||||||
<?js if (doc.kind === 'module' && doc.module) { ?>
|
|
||||||
<?js= self.partial('method.tmpl', doc.module) ?>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js if (doc.kind === 'class') { ?>
|
|
||||||
<?js= self.partial('method.tmpl', doc) ?>
|
|
||||||
<?js } else { ?>
|
|
||||||
<?js if (doc.description) { ?>
|
|
||||||
<div class="description"><?js= doc.description ?></div>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js= self.partial('details.tmpl', doc) ?>
|
|
||||||
|
|
||||||
<?js if (doc.examples && doc.examples.length) { ?>
|
|
||||||
<h3>Example<?js= doc.examples.length > 1? 's':'' ?></h3>
|
|
||||||
<?js= self.partial('examples.tmpl', doc.examples) ?>
|
|
||||||
<?js } ?>
|
|
||||||
<?js } ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?js if (doc.augments && doc.augments.length) { ?>
|
|
||||||
<h3 class="subsection-title">Extends</h3>
|
|
||||||
|
|
||||||
<ul><?js doc.augments.forEach(function(a) { ?>
|
|
||||||
<li><?js= self.linkto(a, a) ?></li>
|
|
||||||
<?js }); ?></ul>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js if (doc.mixes && doc.mixes.length) { ?>
|
|
||||||
<h3 class="subsection-title">Mixes In</h3>
|
|
||||||
|
|
||||||
<ul><?js doc.mixes.forEach(function(a) { ?>
|
|
||||||
<li><?js= self.linkto(a, a) ?></li>
|
|
||||||
<?js }); ?></ul>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js if (doc.requires && doc.requires.length) { ?>
|
|
||||||
<h3 class="subsection-title">Requires</h3>
|
|
||||||
|
|
||||||
<ul><?js doc.requires.forEach(function(r) { ?>
|
|
||||||
<li><?js= self.linkto(r, r) ?></li>
|
|
||||||
<?js }); ?></ul>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js
|
|
||||||
var classes = self.find({kind: 'class', memberof: doc.longname});
|
|
||||||
if (doc.kind !== 'globalobj' && classes && classes.length) {
|
|
||||||
?>
|
|
||||||
<h3 class="subsection-title">Classes</h3>
|
|
||||||
|
|
||||||
<dl><?js classes.forEach(function(c) { ?>
|
|
||||||
<dt><?js= self.linkto(c.longname, c.longname) ?></dt>
|
|
||||||
<dd><?js if (c.summary) { ?><?js= c.summary ?><?js } ?></dd>
|
|
||||||
<?js }); ?></dl>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js
|
|
||||||
var namespaces = self.find({kind: 'namespace', memberof: doc.longname});
|
|
||||||
if (doc.kind !== 'globalobj' && namespaces && namespaces.length) {
|
|
||||||
?>
|
|
||||||
<h3 class="subsection-title">Namespaces</h3>
|
|
||||||
|
|
||||||
<dl><?js namespaces.forEach(function(n) { ?>
|
|
||||||
<dt><a href="namespaces.html#<?js= n.longname ?>"><?js= self.linkto(n.longname, n.longname) ?></a></dt>
|
|
||||||
<dd><?js if (n.summary) { ?><?js= n.summary ?><?js } ?></dd>
|
|
||||||
<?js }); ?></dl>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js
|
|
||||||
var members = self.find({kind: 'member', memberof: title === 'Globals'? {isUndefined: true} : doc.longname});
|
|
||||||
if (members && members.length && members.forEach) {
|
|
||||||
?>
|
|
||||||
<h3 class="subsection-title">Members</h3>
|
|
||||||
|
|
||||||
<dl><?js members.forEach(function(p) { ?>
|
|
||||||
<?js= self.partial('members.tmpl', p) ?>
|
|
||||||
<?js }); ?></dl>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js
|
|
||||||
var methods = self.find({kind: 'function', memberof: title === 'Globals'? {isUndefined: true} : doc.longname});
|
|
||||||
if (methods && methods.length && methods.forEach) {
|
|
||||||
?>
|
|
||||||
<h3 class="subsection-title">Methods</h3>
|
|
||||||
|
|
||||||
<dl><?js methods.forEach(function(m) { ?>
|
|
||||||
<?js= self.partial('method.tmpl', m) ?>
|
|
||||||
<?js }); ?></dl>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js
|
|
||||||
var typedefs = self.find({kind: 'typedef', memberof: doc.longname});
|
|
||||||
if (typedefs && typedefs.length && typedefs.forEach) {
|
|
||||||
?>
|
|
||||||
<h3 class="subsection-title">TypeDefs</h3>
|
|
||||||
|
|
||||||
<dl><?js typedefs.forEach(function(e) { ?>
|
|
||||||
<?js= self.partial('members.tmpl', e) ?>
|
|
||||||
<?js }); ?></dl>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js
|
|
||||||
var events = self.find({kind: 'event', memberof: doc.longname});
|
|
||||||
if (events && events.length && events.forEach) {
|
|
||||||
?>
|
|
||||||
<h3 class="subsection-title">Events</h3>
|
|
||||||
|
|
||||||
<dl><?js events.forEach(function(e) { ?>
|
|
||||||
<?js= self.partial('method.tmpl', e) ?>
|
|
||||||
<?js }); ?></dl>
|
|
||||||
<?js } ?>
|
|
||||||
</article>
|
|
||||||
|
|
||||||
</section>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js }); ?>
|
|
||||||
@@ -1,96 +0,0 @@
|
|||||||
<?js
|
|
||||||
var data = obj;
|
|
||||||
var self = this;
|
|
||||||
?>
|
|
||||||
<dl class="details">
|
|
||||||
<?js
|
|
||||||
var properties = data.properties;
|
|
||||||
if (properties && properties.length && properties.forEach) {
|
|
||||||
?>
|
|
||||||
|
|
||||||
<h5 class="subsection-title">Properties:</h5>
|
|
||||||
|
|
||||||
<dl><?js= this.partial('properties.tmpl', properties) ?></dl>
|
|
||||||
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js if (data.version) {?>
|
|
||||||
<dt class="tag-version">Version:</dt>
|
|
||||||
<dd class="tag-version"><ul class="dummy"><li><?js= version ?></li></ul></dd>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js if (data.since) {?>
|
|
||||||
<dt class="tag-since">Since:</dt>
|
|
||||||
<dd class="tag-since"><ul class="dummy"><li><?js= since ?></dd>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js if (data.inherited && data.inherits) { ?>
|
|
||||||
<dt class="inherited-from">Inherited From:</dt>
|
|
||||||
<dd class="inherited-from"><ul class="dummy"><li>
|
|
||||||
<?js= this.linkto(data.inherits, this.htmlsafe(data.inherits)) ?>
|
|
||||||
</li></dd>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js if (data.deprecated) { ?>
|
|
||||||
<dt class="important tag-deprecated">Deprecated:</dt><?js
|
|
||||||
if (data.deprecated === true) { ?><dd class="yes-def tag-deprecated"><ul class="dummy"><li>Yes</li></ul></dd><?js }
|
|
||||||
else { ?><dd><ul class="dummy"><li><?js= data.deprecated ?></li><ul></dd><?js }
|
|
||||||
?>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js if (data.author && author.length) {?>
|
|
||||||
<dt class="tag-author">Author:</dt>
|
|
||||||
<dd class="tag-author">
|
|
||||||
<ul><?js author.forEach(function(a) { ?>
|
|
||||||
<li><?js= a ?></li>
|
|
||||||
<?js }); ?></ul>
|
|
||||||
</dd>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js if (data.copyright) {?>
|
|
||||||
<dt class="tag-copyright">Copyright:</dt>
|
|
||||||
<dd class="tag-copyright"><ul class="dummy"><li><?js= copyright ?></li></ul></dd>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js if (data.license) {?>
|
|
||||||
<dt class="tag-license">License:</dt>
|
|
||||||
<dd class="tag-license"><ul class="dummy"><li><?js= license ?></li></ul></dd>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js if (data.defaultvalue) {?>
|
|
||||||
<dt class="tag-default">Default Value:</dt>
|
|
||||||
<dd class="tag-default"><ul class="dummy"><li><?js= data.defaultvalue ?></li></ul></dd>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js if (data.meta) {?>
|
|
||||||
<dt class="tag-source">Source:</dt>
|
|
||||||
<dd class="tag-source"><ul class="dummy"><li><?js= meta.filename ?>, line <?js= meta.lineno ?></li></ul></dd>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js if (data.tutorials && tutorials.length) {?>
|
|
||||||
<dt class="tag-tutorial">Tutorials:</dt>
|
|
||||||
<dd class="tag-tutorial">
|
|
||||||
<ul><?js tutorials.forEach(function(t) { ?>
|
|
||||||
<li><?js= self.tutoriallink(t) ?></li>
|
|
||||||
<?js }); ?></ul>
|
|
||||||
</dd>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js if (data.see && see.length) {?>
|
|
||||||
<dt class="tag-see">See:</dt>
|
|
||||||
<dd class="tag-see">
|
|
||||||
<ul><?js see.forEach(function(s) { ?>
|
|
||||||
<li><?js= self.linkto(s) ?></li>
|
|
||||||
<?js }); ?></ul>
|
|
||||||
</dd>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js if (data.todo && todo.length) {?>
|
|
||||||
<dt class="tag-todo">To Do:</dt>
|
|
||||||
<dd class="tag-todo">
|
|
||||||
<ul><?js todo.forEach(function(t) { ?>
|
|
||||||
<li><?js= t ?></li>
|
|
||||||
<?js }); ?></ul>
|
|
||||||
</dd>
|
|
||||||
<?js } ?>
|
|
||||||
</dl>
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
<?js var data = obj; ?>
|
|
||||||
<pre><code><?js= data ?></code></pre>
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
<?js
|
|
||||||
var data = obj;
|
|
||||||
data.forEach(function(example) {
|
|
||||||
if (example.caption) {
|
|
||||||
?>
|
|
||||||
<p class="code-caption"><?js= example.caption ?></p>
|
|
||||||
<?js } ?>
|
|
||||||
<pre class="prettyprint"><code><?js= example.code ?></code></pre>
|
|
||||||
<?js
|
|
||||||
});
|
|
||||||
?>
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
<?js
|
|
||||||
var data = obj;
|
|
||||||
if (data.description) {
|
|
||||||
?>
|
|
||||||
<div class="param-desc">
|
|
||||||
<?js= description ?>
|
|
||||||
</div>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js if (data.type && data.type.names) {?>
|
|
||||||
<dl>
|
|
||||||
<dt>
|
|
||||||
Type
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
<?js= this.partial('type.tmpl', data.type.names) ?>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<?js } ?>
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
<?js var data = obj; ?>
|
|
||||||
<li>
|
|
||||||
<?js= data ?>
|
|
||||||
</li>
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>OpenLayers 3 API Documentation - <?js= title ?></title>
|
|
||||||
|
|
||||||
<script src="scripts/prettify/prettify.js"> </script>
|
|
||||||
<script src="scripts/prettify/lang-css.js"> </script>
|
|
||||||
<!--[if lt IE 9]>
|
|
||||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
||||||
<![endif]-->
|
|
||||||
<link type="text/css" rel="stylesheet" href="styles/prettify-jsdoc.css">
|
|
||||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
|
||||||
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap.min.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="../resources/layout.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
|
||||||
<div class="navbar-inner">
|
|
||||||
<div class="container">
|
|
||||||
<a class="brand" href="/"><img src="../resources/logo.png"> OpenLayers 3</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="main">
|
|
||||||
<?js= content ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<nav>
|
|
||||||
<?js= this.nav ?>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<br clear="both">
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3</a>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
<script> prettyPrint(); </script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
<?js
|
|
||||||
var data = obj;
|
|
||||||
var self = this;
|
|
||||||
?>
|
|
||||||
|
|
||||||
<?js if (data.kind === 'package') { ?>
|
|
||||||
<h3><?js= data.name ?> <?js= data.version ?></h3>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js if (data.readme) { ?>
|
|
||||||
<section>
|
|
||||||
<article><?js= data.readme ?></article>
|
|
||||||
</section>
|
|
||||||
<?js } ?>
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
<?js var data = obj; ?>
|
|
||||||
<dt class="<?js= data.access ?>">
|
|
||||||
<h4 class="name" id="<?js= id ?>"><?js= data.attribs + name + data.signature ?></h4>
|
|
||||||
|
|
||||||
<?js if (data.summary) { ?>
|
|
||||||
<p class="summary"><?js= summary ?></p>
|
|
||||||
<?js } ?>
|
|
||||||
</dt>
|
|
||||||
<dd class="<?js= data.access ?>">
|
|
||||||
<?js if (data.description) { ?>
|
|
||||||
<div class="description">
|
|
||||||
<?js= data.description ?>
|
|
||||||
</div>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js= this.partial('details.tmpl', data) ?>
|
|
||||||
|
|
||||||
<?js if (data.examples && examples.length) { ?>
|
|
||||||
<h5>Example<?js= examples.length > 1? 's':'' ?></h5>
|
|
||||||
<?js= this.partial('examples.tmpl', examples) ?>
|
|
||||||
<?js } ?>
|
|
||||||
</dd>
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
<?js
|
|
||||||
var data = obj;
|
|
||||||
var self = this;
|
|
||||||
?>
|
|
||||||
<dt>
|
|
||||||
<h4 class="name" id="<?js= id ?>"><?js= data.attribs + (kind == 'class'? 'new ':'') + name + data.signature ?></h4>
|
|
||||||
|
|
||||||
<?js if (data.summary) { ?>
|
|
||||||
<p class="summary"><?js= summary ?></p>
|
|
||||||
<?js } ?>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
|
|
||||||
<?js if (data.description) { ?>
|
|
||||||
<div class="description">
|
|
||||||
<?js= data.description ?>
|
|
||||||
</div>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js if (kind === 'event' && data.type && data.type.names) {?>
|
|
||||||
<h5>Type:</h5>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<?js= self.partial('type.tmpl', data.type.names) ?>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js if (data['this']) { ?>
|
|
||||||
<h5>This:</h5>
|
|
||||||
<ul><li><?js= this.linkto(data['this'], data['this']) ?></li></ul>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js if (data.params && params.length) { ?>
|
|
||||||
<h5>Parameters:</h5>
|
|
||||||
<?js= this.partial('params.tmpl', params) ?>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js= this.partial('details.tmpl', data) ?>
|
|
||||||
|
|
||||||
<?js if (data.fires && fires.length) { ?>
|
|
||||||
<h5>Fires:</h5>
|
|
||||||
<ul><?js fires.forEach(function(f) { ?>
|
|
||||||
<?js= self.partial('fires.tmpl', self.linkto(f) ) ?>
|
|
||||||
<?js }); ?></ul>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js if (data.exceptions && exceptions.length) { ?>
|
|
||||||
<h5>Throws:</h5>
|
|
||||||
<?js if (exceptions.length > 1) { ?><ul><?js
|
|
||||||
exceptions.forEach(function(r) { ?>
|
|
||||||
<li><?js= self.partial('exceptions.tmpl', r) ?></li>
|
|
||||||
<?js });
|
|
||||||
?></ul><?js } else {
|
|
||||||
exceptions.forEach(function(r) { ?>
|
|
||||||
<?js= self.partial('exceptions.tmpl', r) ?>
|
|
||||||
<?js });
|
|
||||||
} } ?>
|
|
||||||
|
|
||||||
<?js if (data.returns && returns.length) { ?>
|
|
||||||
<h5>Returns:</h5>
|
|
||||||
<?js if (returns.length > 1) { ?><ul><?js
|
|
||||||
returns.forEach(function(r) { ?>
|
|
||||||
<li><?js= self.partial('returns.tmpl', r) ?></li>
|
|
||||||
<?js });
|
|
||||||
?></ul><?js } else {
|
|
||||||
returns.forEach(function(r) { ?>
|
|
||||||
<?js= self.partial('returns.tmpl', r) ?>
|
|
||||||
<?js });
|
|
||||||
} } ?>
|
|
||||||
|
|
||||||
<?js if (data.examples && examples.length) { ?>
|
|
||||||
<h5>Example<?js= examples.length > 1? 's':'' ?></h5>
|
|
||||||
<?js= this.partial('examples.tmpl', examples) ?>
|
|
||||||
<?js } ?>
|
|
||||||
</dd>
|
|
||||||
@@ -1,108 +0,0 @@
|
|||||||
<?js
|
|
||||||
var params = obj;
|
|
||||||
|
|
||||||
/* sort subparams under their parent params (like opts.classname) */
|
|
||||||
var parentParam = null;
|
|
||||||
params.forEach(function(param, i) {
|
|
||||||
if (!param) { return; }
|
|
||||||
if ( parentParam && param.name && param.name.indexOf(parentParam.name + '.') === 0 ) {
|
|
||||||
param.name = param.name.substr(parentParam.name.length+1);
|
|
||||||
parentParam.subparams = parentParam.subparams || [];
|
|
||||||
parentParam.subparams.push(param);
|
|
||||||
params[i] = null;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
parentParam = param;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
/* determine if we need extra columns, "attributes" and "default" */
|
|
||||||
params.hasAttributes = false;
|
|
||||||
params.hasDefault = false;
|
|
||||||
params.hasName = false;
|
|
||||||
|
|
||||||
params.forEach(function(param) {
|
|
||||||
if (!param) { return; }
|
|
||||||
|
|
||||||
if (param.optional || param.nullable) {
|
|
||||||
params.hasAttributes = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (param.name) {
|
|
||||||
params.hasName = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof param.defaultvalue !== 'undefined') {
|
|
||||||
params.hasDefault = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
?>
|
|
||||||
|
|
||||||
<table class="params">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<?js if (params.hasName) {?>
|
|
||||||
<th>Name</th>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<th>Type</th>
|
|
||||||
|
|
||||||
<?js if (params.hasAttributes) {?>
|
|
||||||
<th>Argument</th>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js if (params.hasDefault) {?>
|
|
||||||
<th>Default</th>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<th class="last">Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
<?js
|
|
||||||
var self = this;
|
|
||||||
params.forEach(function(param) {
|
|
||||||
if (!param) { return; }
|
|
||||||
?>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<?js if (params.hasName) {?>
|
|
||||||
<td class="name"><code><?js= param.name.replace(/^opt_/, "") ?></code></td>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<td class="type">
|
|
||||||
<?js if (param.type && param.type.names) {?>
|
|
||||||
<?js= self.partial('type.tmpl', param.type.names) ?>
|
|
||||||
<?js } ?>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<?js if (params.hasAttributes) {?>
|
|
||||||
<td class="attributes">
|
|
||||||
<?js if (param.optional) { ?>
|
|
||||||
<optional><br>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js if (param.nullable) { ?>
|
|
||||||
<nullable><br>
|
|
||||||
<?js } ?>
|
|
||||||
</td>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js if (params.hasDefault) {?>
|
|
||||||
<td class="default">
|
|
||||||
<?js if (typeof param.defaultvalue !== 'undefined') { ?>
|
|
||||||
<?js= self.htmlsafe(param.defaultvalue) ?>
|
|
||||||
<?js } ?>
|
|
||||||
</td>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<td class="description last"><?js= (param.optional ? "(Optional) " : "") + param.description ?><?js if (param.subparams) { ?>
|
|
||||||
<h6>Properties</h6>
|
|
||||||
<?js= self.partial('params.tmpl', param.subparams) ?>
|
|
||||||
<?js } ?></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<?js }); ?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
@@ -1,107 +0,0 @@
|
|||||||
<?js
|
|
||||||
var props = obj;
|
|
||||||
|
|
||||||
/* sort subprops under their parent props (like opts.classname) */
|
|
||||||
var parentProp = null;
|
|
||||||
props.forEach(function(prop, i) {
|
|
||||||
if (!prop) { return; }
|
|
||||||
if ( parentProp && prop.name.indexOf(parentProp.name + '.') === 0 ) {
|
|
||||||
prop.name = prop.name.substr(parentProp.name.length+1);
|
|
||||||
parentProp.subprops = parentProp.subprops || [];
|
|
||||||
parentProp.subprops.push(prop);
|
|
||||||
props[i] = null;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
parentProp = prop;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
/* determine if we need extra columns, "attributes" and "default" */
|
|
||||||
props.hasAttributes = false;
|
|
||||||
props.hasDefault = false;
|
|
||||||
props.hasName = false;
|
|
||||||
|
|
||||||
props.forEach(function(prop) {
|
|
||||||
if (!prop) { return; }
|
|
||||||
|
|
||||||
if (prop.optional || prop.nullable) {
|
|
||||||
props.hasAttributes = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (prop.name) {
|
|
||||||
props.hasName = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof prop.defaultvalue !== 'undefined') {
|
|
||||||
props.hasDefault = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
?>
|
|
||||||
|
|
||||||
<table class="props">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<?js if (props.hasName) {?>
|
|
||||||
<th>Name</th>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<th>Type</th>
|
|
||||||
|
|
||||||
<?js if (props.hasAttributes) {?>
|
|
||||||
<th>Argument</th>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js if (props.hasDefault) {?>
|
|
||||||
<th>Default</th>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<th class="last">Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
<?js
|
|
||||||
var self = this;
|
|
||||||
props.forEach(function(prop) {
|
|
||||||
if (!prop) { return; }
|
|
||||||
?>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<?js if (props.hasName) {?>
|
|
||||||
<td class="name"><code><?js= prop.name ?></code></td>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<td class="type">
|
|
||||||
<?js if (prop.type && prop.type.names) {?>
|
|
||||||
<?js= self.partial('type.tmpl', prop.type.names) ?>
|
|
||||||
<?js } ?>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<?js if (props.hasAttributes) {?>
|
|
||||||
<td class="attributes">
|
|
||||||
<?js if (prop.optional) { ?>
|
|
||||||
<optional><br>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js if (prop.nullable) { ?>
|
|
||||||
<nullable><br>
|
|
||||||
<?js } ?>
|
|
||||||
</td>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js if (props.hasDefault) {?>
|
|
||||||
<td class="default">
|
|
||||||
<?js if (typeof prop.defaultvalue !== 'undefined') { ?>
|
|
||||||
<?js= self.htmlsafe(prop.defaultvalue) ?>
|
|
||||||
<?js } ?>
|
|
||||||
</td>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<td class="description last"><?js= prop.description ?><?js if (prop.subprops) { ?>
|
|
||||||
<h6>Properties</h6><?js= self.partial('properties.tmpl', prop.subprops) ?>
|
|
||||||
<?js } ?></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<?js }); ?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
<?js
|
|
||||||
var data = obj;
|
|
||||||
if (data.description) {
|
|
||||||
?>
|
|
||||||
<div class="param-desc">
|
|
||||||
<?js= description ?>
|
|
||||||
</div>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<?js if (data.type && data.type.names) {?>
|
|
||||||
<dl>
|
|
||||||
<dt>
|
|
||||||
Type
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
<?js= this.partial('type.tmpl', data.type.names) ?>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<?js } ?>
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<?js
|
|
||||||
var data = obj;
|
|
||||||
?>
|
|
||||||
<section>
|
|
||||||
<article>
|
|
||||||
<pre class="prettyprint source"><code><?js= data.code ?></code></pre>
|
|
||||||
</article>
|
|
||||||
</section>
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
<section>
|
|
||||||
|
|
||||||
<header>
|
|
||||||
<?js if (children.length > 0) { ?>
|
|
||||||
<ul><?js
|
|
||||||
var self = this;
|
|
||||||
children.forEach(function(t) { ?>
|
|
||||||
<li><?js= self.tutoriallink(t.name) ?></li>
|
|
||||||
<?js }); ?></ul>
|
|
||||||
<?js } ?>
|
|
||||||
|
|
||||||
<h2><?js= header ?></h2>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<article>
|
|
||||||
<?js= content ?>
|
|
||||||
</article>
|
|
||||||
|
|
||||||
</section>
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
<?js
|
|
||||||
var data = obj;
|
|
||||||
var self = this;
|
|
||||||
data.forEach(function(name, i) { ?>
|
|
||||||
<span class="param-type"><?js= self.linkto(name, self.htmlsafe(name)) ?></span>
|
|
||||||
<?js if (i < data.length-1) { ?>|<?js } ?>
|
|
||||||
<?js }); ?>
|
|
||||||
127
art/arrows.svg
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://web.resource.org/cc/"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="18.000000px"
|
||||||
|
height="18.000000px"
|
||||||
|
id="svg2"
|
||||||
|
sodipodi:version="0.32"
|
||||||
|
inkscape:version="0.42"
|
||||||
|
sodipodi:docbase="/Users/phil/Documents/work/metacarta/2svn.openlayers.net/follower/code/b-edits-1/openlayers/assets/ui_elements"
|
||||||
|
sodipodi:docname="pan_icons.svg"
|
||||||
|
inkscape:export-filename="/Users/phil/Documents/work/metacarta/2svn.openlayers.net/follower/code/b-edits-1/openlayers/assets/ui_elements/zoom-minus-mini.png"
|
||||||
|
inkscape:export-xdpi="90.000000"
|
||||||
|
inkscape:export-ydpi="90.000000">
|
||||||
|
<defs
|
||||||
|
id="defs4" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="1.0000000"
|
||||||
|
inkscape:cx="9.0000000"
|
||||||
|
inkscape:cy="9.0000000"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
inkscape:window-width="1226"
|
||||||
|
inkscape:window-height="800"
|
||||||
|
inkscape:window-x="42"
|
||||||
|
inkscape:window-y="22" />
|
||||||
|
<metadata
|
||||||
|
id="metadata7">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="background"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1">
|
||||||
|
<g
|
||||||
|
id="g2110">
|
||||||
|
<path
|
||||||
|
transform="matrix(0.000000,-1.003160,1.003160,0.000000,-2.844000e-2,18.02844)"
|
||||||
|
d="M 17.971654 9.0000000 A 8.9716539 8.9716539 0 1 1 0.028346062,9.0000000 A 8.9716539 8.9716539 0 1 1 17.971654 9.0000000 z"
|
||||||
|
sodipodi:ry="8.9716539"
|
||||||
|
sodipodi:rx="8.9716539"
|
||||||
|
sodipodi:cy="9.0000000"
|
||||||
|
sodipodi:cx="9.0000000"
|
||||||
|
id="path2059"
|
||||||
|
style="fill:#00008b;fill-opacity:1.0000000;stroke:none;stroke-width:39.984146;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
|
||||||
|
sodipodi:type="arc" />
|
||||||
|
<rect
|
||||||
|
transform="matrix(0.000000,-1.000000,1.000000,0.000000,0.000000,0.000000)"
|
||||||
|
y="4.3599998e-06"
|
||||||
|
x="-9.0000048"
|
||||||
|
height="18.000000"
|
||||||
|
width="9.0000000"
|
||||||
|
id="rect2061"
|
||||||
|
style="fill:#00008b;fill-opacity:1.0000000;stroke:none;stroke-width:39.984146;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer4"
|
||||||
|
inkscape:label="zoom"
|
||||||
|
style="display:inline">
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-size:18.000000px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125.00000%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1.0000000;stroke:#ffffff;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1.0000000;font-family:Helvetica"
|
||||||
|
x="3.7485352"
|
||||||
|
y="-3.4077148"
|
||||||
|
id="text2114"
|
||||||
|
sodipodi:linespacing="125.00000%"
|
||||||
|
transform="scale(1.000000,-1.000000)"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan2118"
|
||||||
|
x="3.7485352"
|
||||||
|
y="-3.4077148">−</tspan></text>
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer2"
|
||||||
|
inkscape:label="overlay"
|
||||||
|
style="display:none">
|
||||||
|
<path
|
||||||
|
style="font-size:12.000000px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125.00000%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Verdana"
|
||||||
|
d="M 2.9678210,9.0332227 C 2.9678314,9.5015070 3.1752531,9.8938504 3.5900866,10.210254 C 3.6463464,10.254553 3.9451742,10.453889 4.4865710,10.808262 L 8.1568835,13.247754 C 8.2693886,13.323691 8.4240759,13.393300 8.6209460,13.456582 C 8.8107943,13.519862 9.0041535,13.551503 9.2010240,13.551504 C 9.5736843,13.551503 9.8936056,13.431269 10.160789,13.190801 C 10.427980,12.950332 10.561574,12.659238 10.561572,12.317520 C 10.561574,11.861896 10.322511,11.488536 9.8443836,11.197442 L 8.5998522,10.428575 L 14.548408,10.428575 C 15.026535,10.428577 15.406221,10.298849 15.687470,10.039395 C 15.968721,9.7799443 16.109345,9.4318977 16.109345,8.9952540 C 16.109345,8.5396330 15.961690,8.1915865 15.666377,7.9511133 C 15.364034,7.7106494 14.980831,7.5904152 14.516767,7.5904102 L 8.6314928,7.5904102 L 9.9920390,6.7076368 C 10.160793,6.5937365 10.290871,6.4481897 10.382274,6.2709962 C 10.466652,6.0874870 10.508840,5.8913153 10.508837,5.6824805 C 10.508840,5.3281127 10.378761,5.0338552 10.118602,4.7997070 C 9.8584498,4.5655745 9.5279814,4.4485043 9.1271961,4.4484962 C 8.7615757,4.4485043 8.4029823,4.5624104 8.0514147,4.7902149 L 3.9697741,7.5239649 C 3.6393151,7.7454540 3.4002529,7.9542820 3.2525866,8.1504493 C 3.0627532,8.3972503 2.9678314,8.6756875 2.9678210,8.9857618 L 2.9678210,9.0332227"
|
||||||
|
id="text2082"
|
||||||
|
sodipodi:nodetypes="csccsssscccssscccssssccscc" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer3"
|
||||||
|
inkscape:label="pan triangle"
|
||||||
|
style="display:none">
|
||||||
|
<path
|
||||||
|
sodipodi:type="star"
|
||||||
|
style="fill:#ffffff;fill-opacity:1.0000000;stroke:none;stroke-width:39.984146;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
|
||||||
|
id="path2107"
|
||||||
|
sodipodi:sides="3"
|
||||||
|
sodipodi:cx="6.8031497"
|
||||||
|
sodipodi:cy="5.1874018"
|
||||||
|
sodipodi:r1="5.0880113"
|
||||||
|
sodipodi:r2="2.5440056"
|
||||||
|
sodipodi:arg1="1.0471976"
|
||||||
|
sodipodi:arg2="2.0943951"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
inkscape:rounded="0.0000000"
|
||||||
|
inkscape:randomized="0.0000000"
|
||||||
|
d="M 9.3471551,9.5937489 L 5.5311469,7.3905753 L 1.7151384,5.1874015 L 5.5311469,2.9842283 L 9.3471555,0.78105489 L 9.3471553,5.1874018 L 9.3471551,9.5937489 z "
|
||||||
|
transform="matrix(0.000000,-1.331000,1.331000,0.000000,2.038879,16.92102)" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 6.3 KiB |
128
art/layer-switcher-maximize.svg
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://web.resource.org/cc/"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="18.000000px"
|
||||||
|
height="18.000000px"
|
||||||
|
id="svg2"
|
||||||
|
sodipodi:version="0.32"
|
||||||
|
inkscape:version="0.43"
|
||||||
|
sodipodi:docbase="/home/sderle/projects/openlayers/layerswitcher/art"
|
||||||
|
sodipodi:docname="layer-switcher-maximize.svg"
|
||||||
|
inkscape:export-filename="/Users/phil/Documents/work/metacarta/2svn.openlayers.net/follower/code/b-edits-1/openlayers/assets/ui_elements/zoom-minus-mini.png"
|
||||||
|
inkscape:export-xdpi="90.000000"
|
||||||
|
inkscape:export-ydpi="90.000000">
|
||||||
|
<defs
|
||||||
|
id="defs4" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="16"
|
||||||
|
inkscape:cx="9"
|
||||||
|
inkscape:cy="9"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="layer4"
|
||||||
|
inkscape:window-width="1226"
|
||||||
|
inkscape:window-height="800"
|
||||||
|
inkscape:window-x="42"
|
||||||
|
inkscape:window-y="25" />
|
||||||
|
<metadata
|
||||||
|
id="metadata7">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="background"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1">
|
||||||
|
<g
|
||||||
|
id="g2110"
|
||||||
|
transform="matrix(-7.849624e-17,1,-1,-7.849624e-17,18,0)">
|
||||||
|
<path
|
||||||
|
transform="matrix(0,-1.00316,1.00316,0,-2.844e-2,18.02844)"
|
||||||
|
d="M 17.971654 9 A 8.9716539 8.9716539 0 1 1 0.028346062,9 A 8.9716539 8.9716539 0 1 1 17.971654 9 z"
|
||||||
|
sodipodi:ry="8.9716539"
|
||||||
|
sodipodi:rx="8.9716539"
|
||||||
|
sodipodi:cy="9"
|
||||||
|
sodipodi:cx="9"
|
||||||
|
id="path2059"
|
||||||
|
style="fill:#00008b;fill-opacity:1;stroke:none;stroke-width:39.98414612;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
sodipodi:type="arc" />
|
||||||
|
<rect
|
||||||
|
transform="matrix(0,-1,1,0,0,0)"
|
||||||
|
y="4.3599998e-06"
|
||||||
|
x="-9.0000048"
|
||||||
|
height="18"
|
||||||
|
width="9"
|
||||||
|
id="rect2061"
|
||||||
|
style="fill:#00008b;fill-opacity:1;stroke:none;stroke-width:39.98414612;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer4"
|
||||||
|
inkscape:label="zoom"
|
||||||
|
style="display:inline">
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;display:inline;font-family:Helvetica"
|
||||||
|
x="1.5214844"
|
||||||
|
y="-3.2949219"
|
||||||
|
id="text2114"
|
||||||
|
sodipodi:linespacing="125%"
|
||||||
|
transform="scale(1,-1)"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan2118"
|
||||||
|
x="1.5214844"
|
||||||
|
y="-3.2949219">+</tspan></text>
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer2"
|
||||||
|
inkscape:label="overlay"
|
||||||
|
style="display:none">
|
||||||
|
<path
|
||||||
|
style="font-size:12.000000px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125.00000%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Verdana"
|
||||||
|
d="M 2.9678210,9.0332227 C 2.9678314,9.5015070 3.1752531,9.8938504 3.5900866,10.210254 C 3.6463464,10.254553 3.9451742,10.453889 4.4865710,10.808262 L 8.1568835,13.247754 C 8.2693886,13.323691 8.4240759,13.393300 8.6209460,13.456582 C 8.8107943,13.519862 9.0041535,13.551503 9.2010240,13.551504 C 9.5736843,13.551503 9.8936056,13.431269 10.160789,13.190801 C 10.427980,12.950332 10.561574,12.659238 10.561572,12.317520 C 10.561574,11.861896 10.322511,11.488536 9.8443836,11.197442 L 8.5998522,10.428575 L 14.548408,10.428575 C 15.026535,10.428577 15.406221,10.298849 15.687470,10.039395 C 15.968721,9.7799443 16.109345,9.4318977 16.109345,8.9952540 C 16.109345,8.5396330 15.961690,8.1915865 15.666377,7.9511133 C 15.364034,7.7106494 14.980831,7.5904152 14.516767,7.5904102 L 8.6314928,7.5904102 L 9.9920390,6.7076368 C 10.160793,6.5937365 10.290871,6.4481897 10.382274,6.2709962 C 10.466652,6.0874870 10.508840,5.8913153 10.508837,5.6824805 C 10.508840,5.3281127 10.378761,5.0338552 10.118602,4.7997070 C 9.8584498,4.5655745 9.5279814,4.4485043 9.1271961,4.4484962 C 8.7615757,4.4485043 8.4029823,4.5624104 8.0514147,4.7902149 L 3.9697741,7.5239649 C 3.6393151,7.7454540 3.4002529,7.9542820 3.2525866,8.1504493 C 3.0627532,8.3972503 2.9678314,8.6756875 2.9678210,8.9857618 L 2.9678210,9.0332227"
|
||||||
|
id="text2082"
|
||||||
|
sodipodi:nodetypes="csccsssscccssscccssssccscc" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer3"
|
||||||
|
inkscape:label="pan triangle"
|
||||||
|
style="display:none">
|
||||||
|
<path
|
||||||
|
sodipodi:type="star"
|
||||||
|
style="fill:#ffffff;fill-opacity:1.0000000;stroke:none;stroke-width:39.984146;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
|
||||||
|
id="path2107"
|
||||||
|
sodipodi:sides="3"
|
||||||
|
sodipodi:cx="6.8031497"
|
||||||
|
sodipodi:cy="5.1874018"
|
||||||
|
sodipodi:r1="5.0880113"
|
||||||
|
sodipodi:r2="2.5440056"
|
||||||
|
sodipodi:arg1="1.0471976"
|
||||||
|
sodipodi:arg2="2.0943951"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
inkscape:rounded="0.0000000"
|
||||||
|
inkscape:randomized="0.0000000"
|
||||||
|
d="M 9.3471551,9.5937489 L 5.5311469,7.3905753 L 1.7151384,5.1874015 L 5.5311469,2.9842283 L 9.3471555,0.78105489 L 9.3471553,5.1874018 L 9.3471551,9.5937489 z "
|
||||||
|
transform="matrix(0.000000,-1.331000,1.331000,0.000000,2.038879,16.92102)" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 6.1 KiB |
142
art/layer-switcher-minimize.svg
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://web.resource.org/cc/"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
inkscape:export-ydpi="90.000000"
|
||||||
|
inkscape:export-xdpi="90.000000"
|
||||||
|
inkscape:export-filename="/home/sderle/projects/openlayers/layerswitcher/img/layer-switcher-minimize.png"
|
||||||
|
sodipodi:docname="layer-switcher-minimize.svg"
|
||||||
|
sodipodi:docbase="/home/sderle/projects/openlayers/layerswitcher/art"
|
||||||
|
inkscape:version="0.43"
|
||||||
|
sodipodi:version="0.32"
|
||||||
|
id="svg2"
|
||||||
|
height="18.000000px"
|
||||||
|
width="18.000000px">
|
||||||
|
<defs
|
||||||
|
id="defs4" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
inkscape:window-y="26"
|
||||||
|
inkscape:window-x="42"
|
||||||
|
inkscape:window-height="800"
|
||||||
|
inkscape:window-width="1226"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:cy="9.3025513"
|
||||||
|
inkscape:cx="9"
|
||||||
|
inkscape:zoom="16"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
borderopacity="1.0"
|
||||||
|
bordercolor="#666666"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
id="base" />
|
||||||
|
<metadata
|
||||||
|
id="metadata7">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
style="display:inline"
|
||||||
|
id="layer1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
inkscape:label="background">
|
||||||
|
<rect
|
||||||
|
style="fill:#00008b;fill-opacity:0;stroke:none;stroke-width:39.984146;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
|
||||||
|
id="rect2061"
|
||||||
|
width="18.014498"
|
||||||
|
height="18.000000"
|
||||||
|
x="-18.014502"
|
||||||
|
y="4.3599998e-06"
|
||||||
|
transform="matrix(0.000000,-1.000000,1.000000,0.000000,0.000000,0.000000)"
|
||||||
|
inkscape:export-xdpi="90"
|
||||||
|
inkscape:export-ydpi="90"
|
||||||
|
inkscape:export-filename="/home/sderle/projects/openlayers/layerswitcher/art/layer-switcher-minimize.png" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
inkscape:label="graticule"
|
||||||
|
id="layer5"
|
||||||
|
inkscape:groupmode="layer">
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;display:inline;font-family:Helvetica"
|
||||||
|
x="5.2802601"
|
||||||
|
y="-3.8032362"
|
||||||
|
id="text1432"
|
||||||
|
sodipodi:linespacing="125%"
|
||||||
|
transform="scale(1,-1)"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan1434"
|
||||||
|
x="5.2802601"
|
||||||
|
y="-3.8032362">-</tspan></text>
|
||||||
|
<rect
|
||||||
|
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.99699599px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
|
||||||
|
id="rect1438"
|
||||||
|
width="13.003004"
|
||||||
|
height="13.002999"
|
||||||
|
x="2.498498"
|
||||||
|
y="2.4984975" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
style="display:none"
|
||||||
|
inkscape:label="zoom"
|
||||||
|
id="layer4"
|
||||||
|
inkscape:groupmode="layer">
|
||||||
|
<text
|
||||||
|
transform="scale(1.000000,-1.000000)"
|
||||||
|
sodipodi:linespacing="125.00000%"
|
||||||
|
id="text2114"
|
||||||
|
y="-3.4077148"
|
||||||
|
x="3.7485352"
|
||||||
|
style="font-size:18.000000;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#ffffff;fill-opacity:1.0000000;stroke:#ffffff;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1.0000000;font-family:Helvetica;text-anchor:start;writing-mode:lr-tb"
|
||||||
|
xml:space="preserve"><tspan
|
||||||
|
y="-3.4077148"
|
||||||
|
x="3.7485352"
|
||||||
|
id="tspan2118"
|
||||||
|
sodipodi:role="line">−</tspan></text>
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
style="display:none"
|
||||||
|
inkscape:label="overlay"
|
||||||
|
id="layer2"
|
||||||
|
inkscape:groupmode="layer">
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="csccsssscccssscccssssccscc"
|
||||||
|
id="text2082"
|
||||||
|
d="M 2.9678210,9.0332227 C 2.9678314,9.5015070 3.1752531,9.8938504 3.5900866,10.210254 C 3.6463464,10.254553 3.9451742,10.453889 4.4865710,10.808262 L 8.1568835,13.247754 C 8.2693886,13.323691 8.4240759,13.393300 8.6209460,13.456582 C 8.8107943,13.519862 9.0041535,13.551503 9.2010240,13.551504 C 9.5736843,13.551503 9.8936056,13.431269 10.160789,13.190801 C 10.427980,12.950332 10.561574,12.659238 10.561572,12.317520 C 10.561574,11.861896 10.322511,11.488536 9.8443836,11.197442 L 8.5998522,10.428575 L 14.548408,10.428575 C 15.026535,10.428577 15.406221,10.298849 15.687470,10.039395 C 15.968721,9.7799443 16.109345,9.4318977 16.109345,8.9952540 C 16.109345,8.5396330 15.961690,8.1915865 15.666377,7.9511133 C 15.364034,7.7106494 14.980831,7.5904152 14.516767,7.5904102 L 8.6314928,7.5904102 L 9.9920390,6.7076368 C 10.160793,6.5937365 10.290871,6.4481897 10.382274,6.2709962 C 10.466652,6.0874870 10.508840,5.8913153 10.508837,5.6824805 C 10.508840,5.3281127 10.378761,5.0338552 10.118602,4.7997070 C 9.8584498,4.5655745 9.5279814,4.4485043 9.1271961,4.4484962 C 8.7615757,4.4485043 8.4029823,4.5624104 8.0514147,4.7902149 L 3.9697741,7.5239649 C 3.6393151,7.7454540 3.4002529,7.9542820 3.2525866,8.1504493 C 3.0627532,8.3972503 2.9678314,8.6756875 2.9678210,8.9857618 L 2.9678210,9.0332227"
|
||||||
|
style="font-size:12.000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;fill:#ffffff;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Verdana;text-anchor:start;writing-mode:lr-tb" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
style="display:none"
|
||||||
|
inkscape:label="pan triangle"
|
||||||
|
id="layer3"
|
||||||
|
inkscape:groupmode="layer">
|
||||||
|
<path
|
||||||
|
transform="matrix(0.000000,-1.331000,1.331000,0.000000,2.038879,16.92102)"
|
||||||
|
d="M 9.3471551,9.5937489 L 5.5311469,7.3905753 L 1.7151384,5.1874015 L 5.5311469,2.9842283 L 9.3471555,0.78105489 L 9.3471553,5.1874018 L 9.3471551,9.5937489 z "
|
||||||
|
inkscape:randomized="0.0000000"
|
||||||
|
inkscape:rounded="0.0000000"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
sodipodi:arg2="2.0943951"
|
||||||
|
sodipodi:arg1="1.0471976"
|
||||||
|
sodipodi:r2="2.5440056"
|
||||||
|
sodipodi:r1="5.0880113"
|
||||||
|
sodipodi:cy="5.1874018"
|
||||||
|
sodipodi:cx="6.8031497"
|
||||||
|
sodipodi:sides="3"
|
||||||
|
id="path2107"
|
||||||
|
style="fill:#ffffff;fill-opacity:1.0000000;stroke:none;stroke-width:39.984146;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
|
||||||
|
sodipodi:type="star" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 6.6 KiB |
25
art/marker.svg
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
|
||||||
|
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
|
||||||
|
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||||
|
]>
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns:i="&ns_ai;"
|
||||||
|
xmlns="&ns_svg;" width="20.5" height="24.5" viewBox="0 0 20.5 24.5"
|
||||||
|
overflow="visible" enable-background="new 0 0 20.5 24.5" xml:space="preserve">
|
||||||
|
<g i:extraneous="self">
|
||||||
|
<rect x="0.25" y="0.25" opacity="0" stroke="#000000" stroke-width="1" width="20" height="24"/>
|
||||||
|
<g id="XMLID_2_">
|
||||||
|
<g>
|
||||||
|
<polygon fill="#FF0000" points="10.12,0.6 19.93,7.71 10.06,24.03 0.6,7.58 "/>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
<polyline fill="none" stroke="#000000" stroke-width="1" points="9.98,24.16 10.06,24.03 19.93,7.71 20.06,7.49 "/>
|
||||||
|
<polyline fill="none" stroke="#000000" stroke-width="1" points="10.13,24.16 10.06,24.03 0.6,7.58 0.5,7.41 "/>
|
||||||
|
<polyline fill="none" stroke="#000000" stroke-width="1" points="0.41,7.72 0.6,7.58 10.12,0.6 10.29,0.47 "/>
|
||||||
|
<polyline fill="none" stroke="#000000" stroke-width="1" points="9.94,0.47 10.12,0.6 19.93,7.71 20.06,7.8 "/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<ellipse stroke="#000000" stroke-width="1" cx="10.125" cy="9.25" rx="1.5" ry="1.5"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.4 KiB |
36
art/measuring-stick-off.svg
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
|
||||||
|
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
|
||||||
|
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
|
||||||
|
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
|
||||||
|
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
|
||||||
|
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
|
||||||
|
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
|
||||||
|
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
|
||||||
|
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
|
||||||
|
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||||
|
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||||
|
]>
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
|
||||||
|
xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="28.375" height="28" viewBox="0 0 28.375 28"
|
||||||
|
overflow="visible" enable-background="new 0 0 28.375 28" xml:space="preserve">
|
||||||
|
<g i:extraneous="self">
|
||||||
|
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M27.875,1.375"/>
|
||||||
|
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M0,1.375"/>
|
||||||
|
<path fill="none" stroke="#FFFFFF" d="M0,27.475"/>
|
||||||
|
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,27.645"/>
|
||||||
|
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,0.544"/>
|
||||||
|
<line fill="none" stroke="#00008B" x1="0.875" y1="27.5" x2="27.875" y2="27.475"/>
|
||||||
|
<rect x="0.875" y="1.045" fill="#00008B" width="27.125" height="26"/>
|
||||||
|
<line fill="none" stroke="#00008B" x1="27.875" y1="26.925" x2="27.875" y2="0.925"/>
|
||||||
|
<line fill="none" stroke="#FFFFFF" x1="1.375" y1="0.5" x2="27.375" y2="0.5"/>
|
||||||
|
<line fill="none" stroke="#FFFFFF" x1="0.875" y1="1" x2="0.875" y2="27"/>
|
||||||
|
|
||||||
|
<rect x="5.252" y="11.157" transform="matrix(0.7933 -0.6088 0.6088 0.7933 -5.1621 12.1086)" fill="#FFBF00" width="20" height="5"/>
|
||||||
|
<line fill="#FFBF00" stroke="#000000" x1="8.376" y1="15.783" x2="10.717" y2="18.766"/>
|
||||||
|
<line fill="#FFBF00" stroke="#000000" x1="11.946" y1="13.043" x2="14.288" y2="16.027"/>
|
||||||
|
<line fill="#FFBF00" stroke="#000000" x1="15.342" y1="10.437" x2="17.684" y2="13.42"/>
|
||||||
|
<line fill="#FFBF00" stroke="#000000" x1="18.69" y1="7.869" x2="21.03" y2="10.852"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.3 KiB |
36
art/measuring-stick-on.svg
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
|
||||||
|
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
|
||||||
|
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
|
||||||
|
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
|
||||||
|
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
|
||||||
|
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
|
||||||
|
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
|
||||||
|
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
|
||||||
|
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
|
||||||
|
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||||
|
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||||
|
]>
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
|
||||||
|
xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="28.375" height="28" viewBox="0 0 28.375 28"
|
||||||
|
overflow="visible" enable-background="new 0 0 28.375 28" xml:space="preserve">
|
||||||
|
<g i:extraneous="self">
|
||||||
|
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M27.875,1.375"/>
|
||||||
|
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M0,1.375"/>
|
||||||
|
<path fill="none" stroke="#FFFFFF" d="M0,27.475"/>
|
||||||
|
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,27.645"/>
|
||||||
|
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,0.544"/>
|
||||||
|
<line fill="none" stroke="#FFFFFF" x1="0.875" y1="27.5" x2="27.875" y2="27.475"/>
|
||||||
|
<rect x="0.875" y="1.045" fill="#ADD8E6" width="27.125" height="26"/>
|
||||||
|
<line fill="none" stroke="#FFFFFF" x1="27.875" y1="26.925" x2="27.875" y2="0.925"/>
|
||||||
|
<line fill="none" stroke="#00008B" x1="1.375" y1="0.5" x2="27.375" y2="0.5"/>
|
||||||
|
<line fill="none" stroke="#00008B" x1="0.875" y1="1" x2="0.875" y2="27"/>
|
||||||
|
|
||||||
|
<rect x="4.252" y="12.157" transform="matrix(0.7933 -0.6088 0.6088 0.7933 -5.9776 11.7065)" fill="#FFBF00" width="20" height="5"/>
|
||||||
|
<line fill="#FFBF00" stroke="#000000" x1="7.376" y1="16.783" x2="9.717" y2="19.766"/>
|
||||||
|
<line fill="#FFBF00" stroke="#000000" x1="10.946" y1="14.043" x2="13.288" y2="17.027"/>
|
||||||
|
<line fill="#FFBF00" stroke="#000000" x1="14.342" y1="11.437" x2="16.684" y2="14.42"/>
|
||||||
|
<line fill="#FFBF00" stroke="#000000" x1="17.69" y1="8.869" x2="20.03" y2="11.852"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.3 KiB |
44
art/panning-hand-off.svg
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
|
||||||
|
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
|
||||||
|
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
|
||||||
|
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
|
||||||
|
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
|
||||||
|
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
|
||||||
|
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
|
||||||
|
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
|
||||||
|
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
|
||||||
|
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||||
|
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||||
|
]>
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
|
||||||
|
xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="28.375" height="28" viewBox="0 0 28.375 28"
|
||||||
|
overflow="visible" enable-background="new 0 0 28.375 28" xml:space="preserve">
|
||||||
|
<g i:extraneous="self">
|
||||||
|
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M27.875,1.375"/>
|
||||||
|
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M0,1.375"/>
|
||||||
|
<path fill="none" stroke="#FFFFFF" d="M0,27.475"/>
|
||||||
|
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,27.645"/>
|
||||||
|
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,0.544"/>
|
||||||
|
<line fill="none" stroke="#00008B" x1="0.875" y1="27.5" x2="27.875" y2="27.475"/>
|
||||||
|
<rect x="0.875" y="1.045" fill="#00008B" width="27.125" height="26"/>
|
||||||
|
<line fill="none" stroke="#00008B" x1="27.875" y1="26.925" x2="27.875" y2="0.925"/>
|
||||||
|
<line fill="none" stroke="#FFFFFF" x1="1.375" y1="0.5" x2="27.375" y2="0.5"/>
|
||||||
|
<line fill="none" stroke="#FFFFFF" x1="0.875" y1="1" x2="0.875" y2="27"/>
|
||||||
|
<path fill="#FFFFFF" stroke="#000000" d="M9.458,22.458c-0.473-0.168-1.02-1.269-1.363-1.695
|
||||||
|
c-0.479-0.595-0.894-1.245-1.377-1.829c-0.733-0.887-1.356-1.729-1.854-2.764c-0.375-0.782-0.884-1.997-0.005-2.648
|
||||||
|
c1.036-0.767,2.095-0.162,2.934,0.479c0.844,0.646,1.729,1.18,2.526,1.869c-0.372-0.305-0.548-0.986-0.778-1.421
|
||||||
|
c-0.253-0.477-0.565-0.906-0.822-1.375c-0.359-0.657-0.767-1.201-1.21-1.823c-0.544-0.763-1.051-1.74-0.925-2.709
|
||||||
|
c0.133-1.025,0.972-1.527,1.924-1.207c1.202,0.405,1.969,1.692,2.627,2.698c0.636,0.971,1.201,2.159,1.938,3.042
|
||||||
|
c-0.222-0.209-0.148-0.508-0.155-0.782c-0.01-0.37-0.097-0.626-0.219-0.967c-0.162-0.455-0.219-0.972-0.24-1.45
|
||||||
|
c-0.034-0.776-0.25-1.465-0.25-2.247c0-0.988-0.14-1.963,0.71-2.631c0.666-0.523,1.649-0.764,2.381-0.248
|
||||||
|
c1.385,0.976,1.057,2.999,1.209,4.458c0.079,0.759,0.165,1.489,0.2,2.263c0.022,0.496,0.209,1.067,0.168,1.558
|
||||||
|
c-0.146-0.269-0.113-0.749-0.127-1.057c-0.022-0.502-0.041-0.982-0.115-1.47c-0.114-0.743-0.188-1.564-0.25-2.324
|
||||||
|
c-0.152-1.877,2.054-3.17,3.301-1.469c0.884,1.206,0.773,2.643,0.773,4.085c0,0.698-0.034,1.251-0.22,1.91
|
||||||
|
c-0.13,0.459-0.293,1.222-0.239,1.638c0-0.902,0.334-1.697,0.334-2.588c0-0.678-0.272-2.099,0.581-2.334
|
||||||
|
c1.065-0.294,2.008,0.875,2.428,1.66c0.458,0.855,0.555,1.901,0.409,2.882c-0.318,2.154-0.845,4.227-2.096,6.072
|
||||||
|
c-0.268,0.396-0.485,0.838-0.79,1.22c-0.361,0.452-0.923,0.772-1.416,1.071c-0.381,0.232-0.764,0.53-1.176,0.604
|
||||||
|
c-0.822,0.149-1.725,0.157-2.565,0.157c-1.29,0-2.564-0.068-3.832-0.251c-0.799-0.115-2.12,0.153-2.668-0.54"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.3 KiB |
44
art/panning-hand-on.svg
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
|
||||||
|
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
|
||||||
|
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
|
||||||
|
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
|
||||||
|
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
|
||||||
|
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
|
||||||
|
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
|
||||||
|
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
|
||||||
|
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
|
||||||
|
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||||
|
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||||
|
]>
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
|
||||||
|
xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="28.375" height="28" viewBox="0 0 28.375 28"
|
||||||
|
overflow="visible" enable-background="new 0 0 28.375 28" xml:space="preserve">
|
||||||
|
<g i:extraneous="self">
|
||||||
|
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M27.875,1.375"/>
|
||||||
|
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M0,1.375"/>
|
||||||
|
<path fill="none" stroke="#FFFFFF" d="M0,27.475"/>
|
||||||
|
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,27.645"/>
|
||||||
|
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,0.544"/>
|
||||||
|
<line fill="none" stroke="#FFFFFF" x1="0.875" y1="27.5" x2="27.875" y2="27.475"/>
|
||||||
|
<rect x="0.875" y="1.045" fill="#ADD8E6" width="27.125" height="26"/>
|
||||||
|
<line fill="none" stroke="#FFFFFF" x1="27.875" y1="26.925" x2="27.875" y2="0.925"/>
|
||||||
|
<line fill="none" stroke="#00008B" x1="1.375" y1="0.5" x2="27.375" y2="0.5"/>
|
||||||
|
<line fill="none" stroke="#00008B" x1="0.875" y1="1" x2="0.875" y2="27"/>
|
||||||
|
<path fill="#FFFFFF" stroke="#000000" d="M8.458,23.458c-0.473-0.168-1.02-1.269-1.363-1.695
|
||||||
|
c-0.479-0.595-0.894-1.245-1.377-1.829c-0.733-0.887-1.356-1.729-1.854-2.764c-0.375-0.782-0.884-1.997-0.005-2.648
|
||||||
|
c1.036-0.767,2.095-0.161,2.934,0.479c0.844,0.646,1.729,1.18,2.526,1.869c-0.372-0.305-0.548-0.986-0.778-1.421
|
||||||
|
c-0.253-0.477-0.565-0.906-0.822-1.375c-0.359-0.657-0.767-1.201-1.21-1.823c-0.544-0.763-1.051-1.74-0.925-2.709
|
||||||
|
c0.133-1.025,0.972-1.527,1.924-1.207c1.202,0.405,1.969,1.692,2.627,2.698c0.636,0.971,1.201,2.159,1.938,3.042
|
||||||
|
c-0.222-0.21-0.148-0.509-0.155-0.783c-0.01-0.37-0.097-0.626-0.219-0.967c-0.162-0.455-0.219-0.972-0.24-1.45
|
||||||
|
c-0.034-0.776-0.25-1.465-0.25-2.247c0-0.988-0.14-1.963,0.71-2.631c0.666-0.523,1.649-0.764,2.381-0.248
|
||||||
|
c1.385,0.976,1.057,2.999,1.209,4.458c0.079,0.759,0.165,1.489,0.2,2.263c0.022,0.496,0.209,1.068,0.168,1.558
|
||||||
|
c-0.146-0.27-0.113-0.75-0.127-1.058c-0.022-0.502-0.041-0.982-0.115-1.47c-0.114-0.743-0.188-1.564-0.25-2.324
|
||||||
|
c-0.152-1.877,2.054-3.17,3.301-1.469c0.884,1.206,0.773,2.643,0.773,4.085c0,0.698-0.034,1.251-0.22,1.91
|
||||||
|
c-0.13,0.459-0.293,1.222-0.239,1.639c0-0.902,0.334-1.697,0.334-2.589c0-0.678-0.272-2.099,0.581-2.334
|
||||||
|
c1.065-0.294,2.008,0.875,2.428,1.66c0.458,0.855,0.555,1.901,0.409,2.883c-0.318,2.153-0.845,4.227-2.096,6.071
|
||||||
|
c-0.268,0.396-0.485,0.838-0.79,1.22c-0.361,0.452-0.923,0.772-1.416,1.071c-0.381,0.232-0.764,0.53-1.176,0.604
|
||||||
|
c-0.822,0.149-1.725,0.157-2.565,0.157c-1.29,0-2.564-0.068-3.832-0.251c-0.799-0.115-2.12,0.153-2.668-0.54"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.3 KiB |
71
art/slider.svg
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://web.resource.org/cc/"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="210mm"
|
||||||
|
height="297mm"
|
||||||
|
id="svg2"
|
||||||
|
sodipodi:version="0.32"
|
||||||
|
inkscape:version="0.41.1"
|
||||||
|
sodipodi:docbase="/afs/metacarta.com/user/sderle/public_html/ol.zoombar/art"
|
||||||
|
sodipodi:docname="slider.svg"
|
||||||
|
inkscape:export-filename="/afs/metacarta.com/user/sderle/public_html/ol.zoombar/img/slider.png"
|
||||||
|
inkscape:export-xdpi="90.000000"
|
||||||
|
inkscape:export-ydpi="90.000000">
|
||||||
|
<defs
|
||||||
|
id="defs3" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="39.870978"
|
||||||
|
inkscape:cx="140.00732"
|
||||||
|
inkscape:cy="695.49796"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:window-width="1010"
|
||||||
|
inkscape:window-height="538"
|
||||||
|
inkscape:window-x="20"
|
||||||
|
inkscape:window-y="107" />
|
||||||
|
<metadata
|
||||||
|
id="metadata4">
|
||||||
|
<rdf:RDF
|
||||||
|
id="RDF5">
|
||||||
|
<cc:Work
|
||||||
|
rdf:about=""
|
||||||
|
id="Work6">
|
||||||
|
<dc:format
|
||||||
|
id="format7">image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
id="type9"
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1">
|
||||||
|
<rect
|
||||||
|
style="fill:#00008b;fill-opacity:1.0000000;stroke:#000080;stroke-width:4.9999957;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
|
||||||
|
id="rect1291"
|
||||||
|
x="132.50000"
|
||||||
|
y="354.86218"
|
||||||
|
width="15.014628"
|
||||||
|
height="4.0040474" />
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:2.0000000;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
|
||||||
|
d="M 134.08880,356.89603 L 146.00000,356.87002"
|
||||||
|
id="path2052" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.4 KiB |
193
art/zoom-world.svg
Normal file
@@ -0,0 +1,193 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
<svg
|
||||||
|
xmlns:xml="http://www.w3.org/XML/1998/namespace"
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://web.resource.org/cc/"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
inkscape:export-ydpi="90.000000"
|
||||||
|
inkscape:export-xdpi="90.000000"
|
||||||
|
inkscape:export-filename="/Users/phil/Documents/work/metacarta/2svn.openlayers.net/follower/code/b-edits-1/openlayers/assets/ui_elements/zoom-minus-mini.png"
|
||||||
|
sodipodi:docname="zoom-world.svg"
|
||||||
|
sodipodi:docbase="/afs/metacarta.com/user/sderle/OL/openlayers/assets/ui_elements"
|
||||||
|
inkscape:version="0.41.1"
|
||||||
|
sodipodi:version="0.32"
|
||||||
|
id="svg2"
|
||||||
|
height="18.000000px"
|
||||||
|
width="18.000000px">
|
||||||
|
<defs
|
||||||
|
id="defs4" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
inkscape:window-y="26"
|
||||||
|
inkscape:window-x="42"
|
||||||
|
inkscape:window-height="800"
|
||||||
|
inkscape:window-width="1226"
|
||||||
|
inkscape:current-layer="layer5"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:cy="9.3025513"
|
||||||
|
inkscape:cx="9.0000000"
|
||||||
|
inkscape:zoom="1.0000000"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
borderopacity="1.0"
|
||||||
|
bordercolor="#666666"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
id="base" />
|
||||||
|
<metadata
|
||||||
|
id="metadata7">
|
||||||
|
<rdf:RDF
|
||||||
|
id="RDF1295">
|
||||||
|
<cc:Work
|
||||||
|
id="Work1297"
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format
|
||||||
|
id="format1299">image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
id="type1301"
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
style="display:inline"
|
||||||
|
id="layer1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
inkscape:label="background">
|
||||||
|
<rect
|
||||||
|
style="fill:#00008b;fill-opacity:1.0000000;stroke:none;stroke-width:39.984146;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
|
||||||
|
id="rect2061"
|
||||||
|
width="18.014498"
|
||||||
|
height="18.000000"
|
||||||
|
x="-18.014502"
|
||||||
|
y="4.3599998e-06"
|
||||||
|
transform="matrix(0.000000,-1.000000,1.000000,0.000000,0.000000,0.000000)" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
inkscape:label="graticule"
|
||||||
|
id="layer5"
|
||||||
|
inkscape:groupmode="layer">
|
||||||
|
<g
|
||||||
|
transform="translate(0.000000,-4.419417e-2)"
|
||||||
|
id="g2876">
|
||||||
|
<path
|
||||||
|
transform="matrix(1.155321,0.000000,0.000000,1.155321,-2.292065,-1.751761)"
|
||||||
|
d="M 16.869573 9.3188362 A 7.0579743 7.0579743 0 1 1 2.7536244,9.3188362 A 7.0579743 7.0579743 0 1 1 16.869573 9.3188362 z"
|
||||||
|
sodipodi:ry="7.0579743"
|
||||||
|
sodipodi:rx="7.0579743"
|
||||||
|
sodipodi:cy="9.3188362"
|
||||||
|
sodipodi:cx="9.8115988"
|
||||||
|
id="path1321"
|
||||||
|
style="fill:none;fill-opacity:1.0000000;stroke:#ffffff;stroke-width:0.50000000;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
|
||||||
|
sodipodi:type="arc" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cc"
|
||||||
|
id="path2086"
|
||||||
|
d="M 8.1145142,1.1289949 C 15.315267,9.5238831 8.3963197,17.101449 8.3963197,17.057255"
|
||||||
|
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.50000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cc"
|
||||||
|
id="path2846"
|
||||||
|
d="M 11.588885,1.3666059 C 18.922222,9.5405232 11.605526,16.764536 11.605526,16.764536"
|
||||||
|
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.50000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cc"
|
||||||
|
id="path2848"
|
||||||
|
d="M 5.2258471,2.0593951 C 11.080923,9.7405585 5.3432210,16.278941 5.3432210,16.278941"
|
||||||
|
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.50000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cc"
|
||||||
|
id="path2850"
|
||||||
|
d="M 2.7388198,3.7571959 C 6.3686281,9.1817837 2.9127331,14.361601 2.9127331,14.361601"
|
||||||
|
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.50000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
transform="matrix(-6.269315e-2,0.998033,-0.998033,-6.269315e-2,18.62352,0.612232)"
|
||||||
|
id="g2883">
|
||||||
|
<path
|
||||||
|
transform="matrix(1.155321,0.000000,0.000000,1.155321,-2.292065,-1.751761)"
|
||||||
|
d="M 16.869573 9.3188362 A 7.0579743 7.0579743 0 1 1 2.7536244,9.3188362 A 7.0579743 7.0579743 0 1 1 16.869573 9.3188362 z"
|
||||||
|
sodipodi:ry="7.0579743"
|
||||||
|
sodipodi:rx="7.0579743"
|
||||||
|
sodipodi:cy="9.3188362"
|
||||||
|
sodipodi:cx="9.8115988"
|
||||||
|
id="path2885"
|
||||||
|
style="fill:none;fill-opacity:1.0000000;stroke:#ffffff;stroke-width:0.50000000;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
|
||||||
|
sodipodi:type="arc" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cc"
|
||||||
|
id="path2887"
|
||||||
|
d="M 8.1145142,1.1289949 C 15.315267,9.5238831 8.3963197,17.101449 8.3963197,17.057255"
|
||||||
|
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.50000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cc"
|
||||||
|
id="path2889"
|
||||||
|
d="M 11.588885,1.3666059 C 18.922222,9.5405232 11.605526,16.764536 11.605526,16.764536"
|
||||||
|
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.50000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cc"
|
||||||
|
id="path2891"
|
||||||
|
d="M 5.2258471,2.0593951 C 11.080923,9.7405585 5.3432210,16.278941 5.3432210,16.278941"
|
||||||
|
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.50000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cc"
|
||||||
|
id="path2893"
|
||||||
|
d="M 2.7388198,3.7571959 C 6.3686281,9.1817837 2.9127331,14.361601 2.9127331,14.361601"
|
||||||
|
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.50000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
style="display:none"
|
||||||
|
inkscape:label="zoom"
|
||||||
|
id="layer4"
|
||||||
|
inkscape:groupmode="layer">
|
||||||
|
<text
|
||||||
|
transform="scale(1.000000,-1.000000)"
|
||||||
|
sodipodi:linespacing="125.00000%"
|
||||||
|
id="text2114"
|
||||||
|
y="-3.4077148"
|
||||||
|
x="3.7485352"
|
||||||
|
style="font-size:18.000000;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#ffffff;fill-opacity:1.0000000;stroke:#ffffff;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1.0000000;font-family:Helvetica;text-anchor:start;writing-mode:lr-tb"
|
||||||
|
xml:space="preserve"><tspan
|
||||||
|
y="-3.4077148"
|
||||||
|
x="3.7485352"
|
||||||
|
id="tspan2118"
|
||||||
|
sodipodi:role="line">−</tspan></text>
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
style="display:none"
|
||||||
|
inkscape:label="overlay"
|
||||||
|
id="layer2"
|
||||||
|
inkscape:groupmode="layer">
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="csccsssscccssscccssssccscc"
|
||||||
|
id="text2082"
|
||||||
|
d="M 2.9678210,9.0332227 C 2.9678314,9.5015070 3.1752531,9.8938504 3.5900866,10.210254 C 3.6463464,10.254553 3.9451742,10.453889 4.4865710,10.808262 L 8.1568835,13.247754 C 8.2693886,13.323691 8.4240759,13.393300 8.6209460,13.456582 C 8.8107943,13.519862 9.0041535,13.551503 9.2010240,13.551504 C 9.5736843,13.551503 9.8936056,13.431269 10.160789,13.190801 C 10.427980,12.950332 10.561574,12.659238 10.561572,12.317520 C 10.561574,11.861896 10.322511,11.488536 9.8443836,11.197442 L 8.5998522,10.428575 L 14.548408,10.428575 C 15.026535,10.428577 15.406221,10.298849 15.687470,10.039395 C 15.968721,9.7799443 16.109345,9.4318977 16.109345,8.9952540 C 16.109345,8.5396330 15.961690,8.1915865 15.666377,7.9511133 C 15.364034,7.7106494 14.980831,7.5904152 14.516767,7.5904102 L 8.6314928,7.5904102 L 9.9920390,6.7076368 C 10.160793,6.5937365 10.290871,6.4481897 10.382274,6.2709962 C 10.466652,6.0874870 10.508840,5.8913153 10.508837,5.6824805 C 10.508840,5.3281127 10.378761,5.0338552 10.118602,4.7997070 C 9.8584498,4.5655745 9.5279814,4.4485043 9.1271961,4.4484962 C 8.7615757,4.4485043 8.4029823,4.5624104 8.0514147,4.7902149 L 3.9697741,7.5239649 C 3.6393151,7.7454540 3.4002529,7.9542820 3.2525866,8.1504493 C 3.0627532,8.3972503 2.9678314,8.6756875 2.9678210,8.9857618 L 2.9678210,9.0332227"
|
||||||
|
style="font-size:12.000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;fill:#ffffff;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Verdana;text-anchor:start;writing-mode:lr-tb" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
style="display:none"
|
||||||
|
inkscape:label="pan triangle"
|
||||||
|
id="layer3"
|
||||||
|
inkscape:groupmode="layer">
|
||||||
|
<path
|
||||||
|
transform="matrix(0.000000,-1.331000,1.331000,0.000000,2.038879,16.92102)"
|
||||||
|
d="M 9.3471551,9.5937489 L 5.5311469,7.3905753 L 1.7151384,5.1874015 L 5.5311469,2.9842283 L 9.3471555,0.78105489 L 9.3471553,5.1874018 L 9.3471551,9.5937489 z "
|
||||||
|
inkscape:randomized="0.0000000"
|
||||||
|
inkscape:rounded="0.0000000"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
sodipodi:arg2="2.0943951"
|
||||||
|
sodipodi:arg1="1.0471976"
|
||||||
|
sodipodi:r2="2.5440056"
|
||||||
|
sodipodi:r1="5.0880113"
|
||||||
|
sodipodi:cy="5.1874018"
|
||||||
|
sodipodi:cx="6.8031497"
|
||||||
|
sodipodi:sides="3"
|
||||||
|
id="path2107"
|
||||||
|
style="fill:#ffffff;fill-opacity:1.0000000;stroke:none;stroke-width:39.984146;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
|
||||||
|
sodipodi:type="star" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 10 KiB |
73
art/zoombar.svg
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://web.resource.org/cc/"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="18"
|
||||||
|
height="18"
|
||||||
|
id="svg2"
|
||||||
|
sodipodi:version="0.32"
|
||||||
|
inkscape:version="0.43"
|
||||||
|
version="1.0"
|
||||||
|
inkscape:export-filename="C:\Documents and Settings\crschmidt\Desktop\zoombar.png"
|
||||||
|
inkscape:export-xdpi="90"
|
||||||
|
inkscape:export-ydpi="90"
|
||||||
|
sodipodi:docbase="C:\Documents and Settings\crschmidt\Desktop"
|
||||||
|
sodipodi:docname="zoombar.svg">
|
||||||
|
<defs
|
||||||
|
id="defs4" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="1"
|
||||||
|
inkscape:cx="-117.50597"
|
||||||
|
inkscape:cy="65.94562"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showguides="false"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:window-width="1024"
|
||||||
|
inkscape:window-height="721"
|
||||||
|
inkscape:window-x="-4"
|
||||||
|
inkscape:window-y="-4" />
|
||||||
|
<metadata
|
||||||
|
id="metadata7">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1">
|
||||||
|
<rect
|
||||||
|
style="opacity:0.5;fill:#808080;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000012;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect1307"
|
||||||
|
width="16.999998"
|
||||||
|
height="10.000004"
|
||||||
|
x="-125.51302"
|
||||||
|
y="-52.420002" />
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999958;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.50196078"
|
||||||
|
d="M -125.54176,-52.415494 L -125.54176,-42.415495"
|
||||||
|
id="path8297" />
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999982;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.50196078"
|
||||||
|
d="M -108.48157,-52.418044 L -108.48157,-42.418046"
|
||||||
|
id="path12667" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.6 KiB |
1767
bin/BeautifulSoup.py
@@ -1,30 +0,0 @@
|
|||||||
//
|
|
||||||
// A PhantomJS script used to check that the hosted examples load
|
|
||||||
// without errors. This script is executed by the build tool's
|
|
||||||
// check-examples target.
|
|
||||||
//
|
|
||||||
var args = require('system').args;
|
|
||||||
if (args.length != 2) {
|
|
||||||
phantom.exit(2);
|
|
||||||
}
|
|
||||||
var examplePath = args[1];
|
|
||||||
var page = require('webpage').create();
|
|
||||||
page.onError = function(msg, trace) {
|
|
||||||
var msgStack = ['JavaScript ERROR: ' + msg];
|
|
||||||
if (trace) {
|
|
||||||
msgStack.push('TRACE:');
|
|
||||||
trace.forEach(function(t) {
|
|
||||||
msgStack.push(' -> ' + t.file + ': ' + t.line + (t.function ? ' (in function "' + t.function + '")' : ''));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
console.error(msgStack.join('\n'));
|
|
||||||
phantom.exit(1);
|
|
||||||
};
|
|
||||||
page.open(examplePath, function(s) {
|
|
||||||
var exitCode = 0;
|
|
||||||
if (s != 'success') {
|
|
||||||
exitCode = 1;
|
|
||||||
console.error('PAGE LOAD ERROR');
|
|
||||||
}
|
|
||||||
phantom.exit(exitCode);
|
|
||||||
});
|
|
||||||
@@ -1,202 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
#
|
|
||||||
# Copyright 2009 The Closure Library Authors. All Rights Reserved.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS-IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
|
|
||||||
"""Generates out a Closure deps.js file given a list of JavaScript sources.
|
|
||||||
|
|
||||||
Paths can be specified as arguments or (more commonly) specifying trees
|
|
||||||
with the flags (call with --help for descriptions).
|
|
||||||
|
|
||||||
Usage: depswriter.py [path/to/js1.js [path/to/js2.js] ...]
|
|
||||||
"""
|
|
||||||
|
|
||||||
import logging
|
|
||||||
import optparse
|
|
||||||
import os
|
|
||||||
import posixpath
|
|
||||||
import shlex
|
|
||||||
import sys
|
|
||||||
|
|
||||||
import source
|
|
||||||
import treescan
|
|
||||||
|
|
||||||
|
|
||||||
__author__ = 'nnaze@google.com (Nathan Naze)'
|
|
||||||
|
|
||||||
|
|
||||||
def MakeDepsFile(source_map):
|
|
||||||
"""Make a generated deps file.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
source_map: A dict map of the source path to source.Source object.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
str, A generated deps file source.
|
|
||||||
"""
|
|
||||||
|
|
||||||
# Write in path alphabetical order
|
|
||||||
paths = sorted(source_map.keys())
|
|
||||||
|
|
||||||
lines = []
|
|
||||||
|
|
||||||
for path in paths:
|
|
||||||
js_source = source_map[path]
|
|
||||||
|
|
||||||
# We don't need to add entries that don't provide anything.
|
|
||||||
if js_source.provides:
|
|
||||||
lines.append(_GetDepsLine(path, js_source))
|
|
||||||
|
|
||||||
return ''.join(lines)
|
|
||||||
|
|
||||||
|
|
||||||
def _GetDepsLine(path, js_source):
|
|
||||||
"""Get a deps.js file string for a source."""
|
|
||||||
|
|
||||||
provides = sorted(js_source.provides)
|
|
||||||
requires = sorted(js_source.requires)
|
|
||||||
|
|
||||||
return 'goog.addDependency(\'%s\', %s, %s);\n' % (path, provides, requires)
|
|
||||||
|
|
||||||
|
|
||||||
def _GetOptionsParser():
|
|
||||||
"""Get the options parser."""
|
|
||||||
|
|
||||||
parser = optparse.OptionParser(__doc__)
|
|
||||||
|
|
||||||
parser.add_option('--output_file',
|
|
||||||
dest='output_file',
|
|
||||||
action='store',
|
|
||||||
help=('If specified, write output to this path instead of '
|
|
||||||
'writing to standard output.'))
|
|
||||||
parser.add_option('--root',
|
|
||||||
dest='roots',
|
|
||||||
default=[],
|
|
||||||
action='append',
|
|
||||||
help='A root directory to scan for JS source files. '
|
|
||||||
'Paths of JS files in generated deps file will be '
|
|
||||||
'relative to this path. This flag may be specified '
|
|
||||||
'multiple times.')
|
|
||||||
parser.add_option('--root_with_prefix',
|
|
||||||
dest='roots_with_prefix',
|
|
||||||
default=[],
|
|
||||||
action='append',
|
|
||||||
help='A root directory to scan for JS source files, plus '
|
|
||||||
'a prefix (if either contains a space, surround with '
|
|
||||||
'quotes). Paths in generated deps file will be relative '
|
|
||||||
'to the root, but preceded by the prefix. This flag '
|
|
||||||
'may be specified multiple times.')
|
|
||||||
parser.add_option('--path_with_depspath',
|
|
||||||
dest='paths_with_depspath',
|
|
||||||
default=[],
|
|
||||||
action='append',
|
|
||||||
help='A path to a source file and an alternate path to '
|
|
||||||
'the file in the generated deps file (if either contains '
|
|
||||||
'a space, surround with whitespace). This flag may be '
|
|
||||||
'specified multiple times.')
|
|
||||||
return parser
|
|
||||||
|
|
||||||
|
|
||||||
def _NormalizePathSeparators(path):
|
|
||||||
"""Replaces OS-specific path separators with POSIX-style slashes.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
path: str, A file path.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
str, The path with any OS-specific path separators (such as backslash on
|
|
||||||
Windows) replaced with URL-compatible forward slashes. A no-op on systems
|
|
||||||
that use POSIX paths.
|
|
||||||
"""
|
|
||||||
return path.replace(os.sep, posixpath.sep)
|
|
||||||
|
|
||||||
|
|
||||||
def _GetRelativePathToSourceDict(root, prefix=''):
|
|
||||||
"""Scans a top root directory for .js sources.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
root: str, Root directory.
|
|
||||||
prefix: str, Prefix for returned paths.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
dict, A map of relative paths (with prefix, if given), to source.Source
|
|
||||||
objects.
|
|
||||||
"""
|
|
||||||
# Remember and restore the cwd when we're done. We work from the root so
|
|
||||||
# that paths are relative from the root.
|
|
||||||
start_wd = os.getcwd()
|
|
||||||
os.chdir(root)
|
|
||||||
|
|
||||||
path_to_source = {}
|
|
||||||
for path in treescan.ScanTreeForJsFiles('.'):
|
|
||||||
prefixed_path = _NormalizePathSeparators(os.path.join(prefix, path))
|
|
||||||
path_to_source[prefixed_path] = source.Source(source.GetFileContents(path))
|
|
||||||
|
|
||||||
os.chdir(start_wd)
|
|
||||||
|
|
||||||
return path_to_source
|
|
||||||
|
|
||||||
|
|
||||||
def _GetPair(s):
|
|
||||||
"""Return a string as a shell-parsed tuple. Two values expected."""
|
|
||||||
try:
|
|
||||||
# shlex uses '\' as an escape character, so they must be escaped.
|
|
||||||
s = s.replace('\\', '\\\\')
|
|
||||||
first, second = shlex.split(s)
|
|
||||||
return (first, second)
|
|
||||||
except:
|
|
||||||
raise Exception('Unable to parse input line as a pair: %s' % s)
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
"""CLI frontend to MakeDepsFile."""
|
|
||||||
logging.basicConfig(format=(sys.argv[0] + ': %(message)s'),
|
|
||||||
level=logging.INFO)
|
|
||||||
options, args = _GetOptionsParser().parse_args()
|
|
||||||
|
|
||||||
path_to_source = {}
|
|
||||||
|
|
||||||
# Roots without prefixes
|
|
||||||
for root in options.roots:
|
|
||||||
path_to_source.update(_GetRelativePathToSourceDict(root))
|
|
||||||
|
|
||||||
# Roots with prefixes
|
|
||||||
for root_and_prefix in options.roots_with_prefix:
|
|
||||||
root, prefix = _GetPair(root_and_prefix)
|
|
||||||
path_to_source.update(_GetRelativePathToSourceDict(root, prefix=prefix))
|
|
||||||
|
|
||||||
# Source paths
|
|
||||||
for path in args:
|
|
||||||
path_to_source[path] = source.Source(source.GetFileContents(path))
|
|
||||||
|
|
||||||
# Source paths with alternate deps paths
|
|
||||||
for path_with_depspath in options.paths_with_depspath:
|
|
||||||
srcpath, depspath = _GetPair(path_with_depspath)
|
|
||||||
path_to_source[depspath] = source.Source(source.GetFileContents(srcpath))
|
|
||||||
|
|
||||||
# Make our output pipe.
|
|
||||||
if options.output_file:
|
|
||||||
out = open(options.output_file, 'w')
|
|
||||||
else:
|
|
||||||
out = sys.stdout
|
|
||||||
|
|
||||||
out.write('// This file was autogenerated by %s.\n' % sys.argv[0])
|
|
||||||
out.write('// Please do not edit.\n')
|
|
||||||
|
|
||||||
out.write(MakeDepsFile(path_to_source))
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
||||||
@@ -1,114 +0,0 @@
|
|||||||
# Copyright 2009 The Closure Library Authors. All Rights Reserved.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS-IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
|
|
||||||
"""Scans a source JS file for its provided and required namespaces.
|
|
||||||
|
|
||||||
Simple class to scan a JavaScript file and express its dependencies.
|
|
||||||
"""
|
|
||||||
|
|
||||||
__author__ = 'nnaze@google.com'
|
|
||||||
|
|
||||||
|
|
||||||
import re
|
|
||||||
|
|
||||||
_BASE_REGEX_STRING = '^\s*goog\.%s\(\s*[\'"](.+)[\'"]\s*\)'
|
|
||||||
_PROVIDE_REGEX = re.compile(_BASE_REGEX_STRING % 'provide')
|
|
||||||
_REQUIRES_REGEX = re.compile(_BASE_REGEX_STRING % 'require')
|
|
||||||
|
|
||||||
# This line identifies base.js and should match the line in that file.
|
|
||||||
_GOOG_BASE_LINE = (
|
|
||||||
'var goog = goog || {}; // Identifies this file as the Closure base.')
|
|
||||||
|
|
||||||
|
|
||||||
class Source(object):
|
|
||||||
"""Scans a JavaScript source for its provided and required namespaces."""
|
|
||||||
|
|
||||||
# Matches a "/* ... */" comment.
|
|
||||||
# Note: We can't definitively distinguish a "/*" in a string literal without a
|
|
||||||
# state machine tokenizer. We'll assume that a line starting with whitespace
|
|
||||||
# and "/*" is a comment.
|
|
||||||
_COMMENT_REGEX = re.compile(
|
|
||||||
r"""
|
|
||||||
^\s* # Start of a new line and whitespace
|
|
||||||
/\* # Opening "/*"
|
|
||||||
.*? # Non greedy match of any characters (including newlines)
|
|
||||||
\*/ # Closing "*/""",
|
|
||||||
re.MULTILINE | re.DOTALL | re.VERBOSE)
|
|
||||||
|
|
||||||
def __init__(self, source):
|
|
||||||
"""Initialize a source.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
source: str, The JavaScript source.
|
|
||||||
"""
|
|
||||||
|
|
||||||
self.provides = set()
|
|
||||||
self.requires = set()
|
|
||||||
|
|
||||||
self._source = source
|
|
||||||
self._ScanSource()
|
|
||||||
|
|
||||||
def __str__(self):
|
|
||||||
return 'Source %s' % self._path
|
|
||||||
|
|
||||||
def GetSource(self):
|
|
||||||
"""Get the source as a string."""
|
|
||||||
return self._source
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def _StripComments(cls, source):
|
|
||||||
return cls._COMMENT_REGEX.sub('', source)
|
|
||||||
|
|
||||||
def _ScanSource(self):
|
|
||||||
"""Fill in provides and requires by scanning the source."""
|
|
||||||
|
|
||||||
source = self._StripComments(self.GetSource())
|
|
||||||
|
|
||||||
source_lines = source.splitlines()
|
|
||||||
for line in source_lines:
|
|
||||||
match = _PROVIDE_REGEX.match(line)
|
|
||||||
if match:
|
|
||||||
self.provides.add(match.group(1))
|
|
||||||
match = _REQUIRES_REGEX.match(line)
|
|
||||||
if match:
|
|
||||||
self.requires.add(match.group(1))
|
|
||||||
|
|
||||||
# Closure's base file implicitly provides 'goog'.
|
|
||||||
for line in source_lines:
|
|
||||||
if line == _GOOG_BASE_LINE:
|
|
||||||
if len(self.provides) or len(self.requires):
|
|
||||||
raise Exception(
|
|
||||||
'Base files should not provide or require namespaces.')
|
|
||||||
self.provides.add('goog')
|
|
||||||
|
|
||||||
|
|
||||||
def GetFileContents(path):
|
|
||||||
"""Get a file's contents as a string.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
path: str, Path to file.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
str, Contents of file.
|
|
||||||
|
|
||||||
Raises:
|
|
||||||
IOError: An error occurred opening or reading the file.
|
|
||||||
|
|
||||||
"""
|
|
||||||
fileobj = open(path)
|
|
||||||
try:
|
|
||||||
return fileobj.read()
|
|
||||||
finally:
|
|
||||||
fileobj.close()
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
#
|
|
||||||
# Copyright 2010 The Closure Library Authors. All Rights Reserved.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS-IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
|
|
||||||
"""Shared utility functions for scanning directory trees."""
|
|
||||||
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
|
|
||||||
|
|
||||||
__author__ = 'nnaze@google.com (Nathan Naze)'
|
|
||||||
|
|
||||||
|
|
||||||
# Matches a .js file path.
|
|
||||||
_JS_FILE_REGEX = re.compile(r'^.+\.js$')
|
|
||||||
|
|
||||||
|
|
||||||
def ScanTreeForJsFiles(root):
|
|
||||||
"""Scans a directory tree for JavaScript files.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
root: str, Path to a root directory.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
An iterable of paths to JS files, relative to cwd.
|
|
||||||
"""
|
|
||||||
return ScanTree(root, path_filter=_JS_FILE_REGEX)
|
|
||||||
|
|
||||||
|
|
||||||
def ScanTree(root, path_filter=None, ignore_hidden=True):
|
|
||||||
"""Scans a directory tree for files.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
root: str, Path to a root directory.
|
|
||||||
path_filter: A regular expression filter. If set, only paths matching
|
|
||||||
the path_filter are returned.
|
|
||||||
ignore_hidden: If True, do not follow or return hidden directories or files
|
|
||||||
(those starting with a '.' character).
|
|
||||||
|
|
||||||
Yields:
|
|
||||||
A string path to files, relative to cwd.
|
|
||||||
"""
|
|
||||||
|
|
||||||
def OnError(os_error):
|
|
||||||
raise os_error
|
|
||||||
|
|
||||||
for dirpath, dirnames, filenames in os.walk(root, onerror=OnError):
|
|
||||||
# os.walk allows us to modify dirnames to prevent decent into particular
|
|
||||||
# directories. Avoid hidden directories.
|
|
||||||
for dirname in dirnames:
|
|
||||||
if ignore_hidden and dirname.startswith('.'):
|
|
||||||
dirnames.remove(dirname)
|
|
||||||
|
|
||||||
for filename in filenames:
|
|
||||||
|
|
||||||
# nothing that starts with '.'
|
|
||||||
if ignore_hidden and filename.startswith('.'):
|
|
||||||
continue
|
|
||||||
|
|
||||||
fullpath = os.path.join(dirpath, filename)
|
|
||||||
|
|
||||||
if path_filter and not path_filter.match(fullpath):
|
|
||||||
continue
|
|
||||||
|
|
||||||
yield os.path.normpath(fullpath)
|
|
||||||
@@ -1,180 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This script is supposed to be executed via phantomjs. It will generate
|
|
||||||
* screenshots of the html files in the directory specified by a commandline
|
|
||||||
* option when these files are served through a webserver which can also be
|
|
||||||
* specified. The screenshots will be in the current working directory.
|
|
||||||
*
|
|
||||||
* Example usage:
|
|
||||||
*
|
|
||||||
* user@host:~/ol3/bin $ phantomjs example-screenshot.js \
|
|
||||||
* http://localhost:8000/ol3/examples/ \
|
|
||||||
* ../examples
|
|
||||||
*
|
|
||||||
* The above command will generate `*.png` files in `examples/` for all html
|
|
||||||
* files that are served through `http://localhost:8000/ol3/examples/`.
|
|
||||||
*
|
|
||||||
* So if there is a file `my-humpty-example.html` inside of the relative folder
|
|
||||||
* `../examples/` which is being served through the webserver so that
|
|
||||||
* `http://localhost:8000/ol3/examples/my-humpty-example.html` is a valid and
|
|
||||||
* reachable URL, this script will generate a screenshot and store it as
|
|
||||||
* `my-humpty-example.html.png`.
|
|
||||||
*
|
|
||||||
* The query string `?mode=raw` will be appended to the generated URL.
|
|
||||||
*
|
|
||||||
* Known limitations:
|
|
||||||
*
|
|
||||||
* As phantomjs doesn't support WebGL (see e.g.
|
|
||||||
* https://github.com/ariya/phantomjs/wiki/Supported-Web-Standards and
|
|
||||||
* http://code.google.com/p/phantomjs/issues/detail?id=273) This won't render
|
|
||||||
* OpenLayers maps rendered through the webglrenderer.
|
|
||||||
*
|
|
||||||
* In parts based upon this gist: https://gist.github.com/crazy4groovy/3160121
|
|
||||||
*/
|
|
||||||
(function() { // global closure
|
|
||||||
|
|
||||||
var page = require('webpage').create(), // imports
|
|
||||||
fs = require('fs'),
|
|
||||||
system = require('system'),
|
|
||||||
// arguments
|
|
||||||
baseExamplesUrl = system.args[1],
|
|
||||||
exampleDir = system.args[2],
|
|
||||||
// various settings
|
|
||||||
ignoreFiles = [
|
|
||||||
'index.html'
|
|
||||||
],
|
|
||||||
intervalMillisecs = 25,
|
|
||||||
renderMillisecs = 2000,
|
|
||||||
// basic variables
|
|
||||||
curDir = fs.workingDirectory,
|
|
||||||
exampleDirList = fs.list(exampleDir),
|
|
||||||
pageindex = 0,
|
|
||||||
fileName = '',
|
|
||||||
htmlFiles = [],
|
|
||||||
lenHtmlFiles = 0,
|
|
||||||
loadInProgress = false;
|
|
||||||
|
|
||||||
// simple object with helper functions
|
|
||||||
var util = {
|
|
||||||
/**
|
|
||||||
* Returns the basename of a file given a path.
|
|
||||||
*/
|
|
||||||
baseName: function(path) {
|
|
||||||
var parts = path.split(fs.separator);
|
|
||||||
return parts[parts.length - 1];
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Super basic test whether a file can be considered a HTML-file.
|
|
||||||
*/
|
|
||||||
isHtmlFile: function(filename) {
|
|
||||||
return (/\.html?$/).test(filename);
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Appends a slash to given string if it isn't there already.
|
|
||||||
*/
|
|
||||||
appendSlash: function(str) {
|
|
||||||
return ((/\/$/).test(str)) ? str : str + '/';
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Generates an URL out of given baseurl and path.
|
|
||||||
*/
|
|
||||||
buildUrl: function(baseurl, path) {
|
|
||||||
var name = util.baseName(path),
|
|
||||||
mode = 'raw';
|
|
||||||
return util.appendSlash(baseurl) + name + '?mode=' + mode;
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Simple progressbar logger that uses our globals pageindex & lenHtmlFiles.
|
|
||||||
*/
|
|
||||||
logProgress: function() {
|
|
||||||
var doneSymbol = '-',
|
|
||||||
todoSymbol = ' ',
|
|
||||||
currentSymbol = '>',
|
|
||||||
barStrLeft = '[',
|
|
||||||
barStrRight = ']',
|
|
||||||
progresStep = 5, // one doneSymbol equals this percentage
|
|
||||||
totalSteps = Math.round(100 / progresStep),
|
|
||||||
ratio = (lenHtmlFiles === 0) ? 0 : (pageindex / lenHtmlFiles),
|
|
||||||
percent = (ratio === 0) ? 0 : ratio * 100,
|
|
||||||
normalizedNumDone = Math.floor(ratio * totalSteps),
|
|
||||||
normalizedNumTodo = totalSteps - normalizedNumDone,
|
|
||||||
progressLine = '',
|
|
||||||
i = 0;
|
|
||||||
// the progress bar
|
|
||||||
progressLine += barStrLeft;
|
|
||||||
for (; i < normalizedNumDone; i++) {
|
|
||||||
progressLine += doneSymbol;
|
|
||||||
}
|
|
||||||
for (i = 0; i < normalizedNumTodo; i++) {
|
|
||||||
progressLine += (i === 0) ? currentSymbol : todoSymbol;
|
|
||||||
}
|
|
||||||
progressLine += barStrRight;
|
|
||||||
// the percentage information
|
|
||||||
// pad if necessary
|
|
||||||
if (percent < 10) {
|
|
||||||
progressLine += ' ';
|
|
||||||
} else if (percent < 100) {
|
|
||||||
progressLine += ' ';
|
|
||||||
}
|
|
||||||
progressLine += ' ' + percent.toFixed(1) + ' % done';
|
|
||||||
// additional information
|
|
||||||
if (fileName !== '') {
|
|
||||||
progressLine += ', ' + util.baseName(fileName) + '';
|
|
||||||
}
|
|
||||||
console.log(progressLine);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// iterate over all files in examples directory
|
|
||||||
// and find the HTML files.
|
|
||||||
for (var i = 0; i < exampleDirList.length; i++) {
|
|
||||||
var fullpath = exampleDir + fs.separator + exampleDirList[i];
|
|
||||||
if (fs.isFile(fullpath) && util.isHtmlFile(fullpath) &&
|
|
||||||
ignoreFiles.indexOf(util.baseName(fullpath)) === -1) {
|
|
||||||
//TODO: make this more async (i.e. pop on/off stack WHILE rending pages)
|
|
||||||
htmlFiles.push(fullpath);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
lenHtmlFiles = htmlFiles.length;
|
|
||||||
|
|
||||||
console.log('Capturing ' + lenHtmlFiles + ' example screenshots.');
|
|
||||||
|
|
||||||
// The main interval function that is executed regularily and renders a
|
|
||||||
// page to a file
|
|
||||||
var interval = setInterval(function() {
|
|
||||||
if (!loadInProgress && pageindex < lenHtmlFiles) {
|
|
||||||
util.logProgress();
|
|
||||||
fileName = htmlFiles[pageindex];
|
|
||||||
page.viewportSize = { width: 800, height: 600 };
|
|
||||||
page.clipRect = {
|
|
||||||
top: 0,
|
|
||||||
left: 0,
|
|
||||||
width: page.viewportSize.width,
|
|
||||||
height: page.viewportSize.height
|
|
||||||
};
|
|
||||||
page.open(util.buildUrl(baseExamplesUrl, htmlFiles[pageindex]));
|
|
||||||
}
|
|
||||||
if (pageindex == lenHtmlFiles) {
|
|
||||||
util.logProgress();
|
|
||||||
console.log(lenHtmlFiles + ' screenshots captured.');
|
|
||||||
phantom.exit();
|
|
||||||
}
|
|
||||||
}, intervalMillisecs);
|
|
||||||
|
|
||||||
// set loadInProgress flag so we only process one image at time.
|
|
||||||
page.onLoadStarted = function() {
|
|
||||||
loadInProgress = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
// When the page is loaded, render it to an image
|
|
||||||
page.onLoadFinished = function() {
|
|
||||||
var dest = exampleDir + fs.separator + util.baseName(fileName) + '.png';
|
|
||||||
window.setTimeout(function() {
|
|
||||||
loadInProgress = false;
|
|
||||||
page.render(dest); // actually render the page.
|
|
||||||
pageindex++;
|
|
||||||
}, renderMillisecs);
|
|
||||||
};
|
|
||||||
|
|
||||||
})(); // eof global closure
|
|
||||||
@@ -1,269 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
|
|
||||||
import sys
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
import time
|
|
||||||
from xml.dom.minidom import Document
|
|
||||||
|
|
||||||
try:
|
|
||||||
import xml.etree.ElementTree as ElementTree
|
|
||||||
except ImportError:
|
|
||||||
try:
|
|
||||||
import cElementTree as ElementTree # NOQA
|
|
||||||
except ImportError:
|
|
||||||
try:
|
|
||||||
import elementtree.ElementTree as ElementTree # NOQA
|
|
||||||
except ImportError:
|
|
||||||
import lxml.etree as ElementTree # NOQA
|
|
||||||
|
|
||||||
missing_deps = False
|
|
||||||
try:
|
|
||||||
import json
|
|
||||||
except ImportError:
|
|
||||||
try:
|
|
||||||
import simplejson as json # NOQA
|
|
||||||
except ImportError, E:
|
|
||||||
missing_deps = E
|
|
||||||
|
|
||||||
try:
|
|
||||||
from BeautifulSoup import BeautifulSoup
|
|
||||||
except ImportError, E:
|
|
||||||
missing_deps = E
|
|
||||||
|
|
||||||
feedName = "example-list.xml"
|
|
||||||
feedPath = "http://openlayers.github.io/ol3/master/examples/"
|
|
||||||
|
|
||||||
|
|
||||||
def getListOfExamples(relPath):
|
|
||||||
"""
|
|
||||||
returns list of .html filenames within a given path - excludes
|
|
||||||
index.html
|
|
||||||
"""
|
|
||||||
examples = os.listdir(relPath)
|
|
||||||
examples = [example for example in examples if
|
|
||||||
example.endswith('.html') and example != "index.html"]
|
|
||||||
return examples
|
|
||||||
|
|
||||||
|
|
||||||
def getExampleHtml(path):
|
|
||||||
"""
|
|
||||||
returns html of a specific example
|
|
||||||
"""
|
|
||||||
print '.',
|
|
||||||
f = open(path)
|
|
||||||
html = f.read()
|
|
||||||
f.close()
|
|
||||||
return html
|
|
||||||
|
|
||||||
|
|
||||||
def extractById(soup, tagId, value=None):
|
|
||||||
"""
|
|
||||||
returns full contents of a particular tag id
|
|
||||||
"""
|
|
||||||
beautifulTag = soup.find(id=tagId)
|
|
||||||
if beautifulTag:
|
|
||||||
if beautifulTag.contents:
|
|
||||||
value = str(beautifulTag.renderContents()).strip()
|
|
||||||
value = value.replace('\t', '')
|
|
||||||
value = value.replace('\n', '')
|
|
||||||
return value
|
|
||||||
|
|
||||||
|
|
||||||
def getRelatedClasses(html):
|
|
||||||
"""
|
|
||||||
parses the html, and returns a list of all OpenLayers Classes
|
|
||||||
used within (ie what parts of OL the javascript uses).
|
|
||||||
"""
|
|
||||||
rawstr = r'''(?P<class>ol\..*?)\('''
|
|
||||||
return re.findall(rawstr, html)
|
|
||||||
|
|
||||||
|
|
||||||
def parseHtml(html, ids):
|
|
||||||
"""
|
|
||||||
returns dictionary of items of interest
|
|
||||||
"""
|
|
||||||
soup = BeautifulSoup(html)
|
|
||||||
d = {}
|
|
||||||
for tagId in ids:
|
|
||||||
d[tagId] = extractById(soup, tagId)
|
|
||||||
#classes should eventually be parsed from docs - not automatically created.
|
|
||||||
classes = getRelatedClasses(html)
|
|
||||||
d['classes'] = classes
|
|
||||||
return d
|
|
||||||
|
|
||||||
|
|
||||||
def getGitInfo(exampleDir, exampleName):
|
|
||||||
orig = os.getcwd()
|
|
||||||
os.chdir(exampleDir)
|
|
||||||
h = os.popen("git log -n 1 --pretty=format:'%an|%ai' " + exampleName)
|
|
||||||
os.chdir(orig)
|
|
||||||
log = h.read()
|
|
||||||
h.close()
|
|
||||||
d = {}
|
|
||||||
if log:
|
|
||||||
parts = log.split("|")
|
|
||||||
d["author"] = parts[0]
|
|
||||||
# compensate for spaces in git log time
|
|
||||||
td = parts[1].split(" ")
|
|
||||||
td.insert(1, "T")
|
|
||||||
d["date"] = "".join(td)
|
|
||||||
else:
|
|
||||||
d["author"] = ""
|
|
||||||
d["date"] = ""
|
|
||||||
return d
|
|
||||||
|
|
||||||
|
|
||||||
def createFeed(examples):
|
|
||||||
doc = Document()
|
|
||||||
atomuri = "http://www.w3.org/2005/Atom"
|
|
||||||
feed = doc.createElementNS(atomuri, "feed")
|
|
||||||
feed.setAttribute("xmlns", atomuri)
|
|
||||||
title = doc.createElementNS(atomuri, "title")
|
|
||||||
title.appendChild(doc.createTextNode("OpenLayers Examples"))
|
|
||||||
feed.appendChild(title)
|
|
||||||
link = doc.createElementNS(atomuri, "link")
|
|
||||||
link.setAttribute("rel", "self")
|
|
||||||
link.setAttribute("href", feedPath + feedName)
|
|
||||||
|
|
||||||
modtime = time.strftime("%Y-%m-%dT%I:%M:%SZ", time.gmtime())
|
|
||||||
id = doc.createElementNS(atomuri, "id")
|
|
||||||
id.appendChild(doc.createTextNode(
|
|
||||||
"%s%s#%s" % (feedPath, feedName, modtime)))
|
|
||||||
feed.appendChild(id)
|
|
||||||
|
|
||||||
updated = doc.createElementNS(atomuri, "updated")
|
|
||||||
updated.appendChild(doc.createTextNode(modtime))
|
|
||||||
feed.appendChild(updated)
|
|
||||||
|
|
||||||
examples.sort(key=lambda x: x["modified"])
|
|
||||||
for example in sorted(examples, key=lambda x: x["modified"], reverse=True):
|
|
||||||
entry = doc.createElementNS(atomuri, "entry")
|
|
||||||
|
|
||||||
title = doc.createElementNS(atomuri, "title")
|
|
||||||
title.appendChild(doc.createTextNode(example["title"] or
|
|
||||||
example["example"]))
|
|
||||||
entry.appendChild(title)
|
|
||||||
|
|
||||||
tags = doc.createElementNS(atomuri, "tags")
|
|
||||||
tags.appendChild(doc.createTextNode(example["tags"] or
|
|
||||||
example["example"]))
|
|
||||||
entry.appendChild(tags)
|
|
||||||
|
|
||||||
link = doc.createElementNS(atomuri, "link")
|
|
||||||
link.setAttribute("href", "%s%s" % (feedPath, example["example"]))
|
|
||||||
entry.appendChild(link)
|
|
||||||
|
|
||||||
summary = doc.createElementNS(atomuri, "summary")
|
|
||||||
summary.appendChild(doc.createTextNode(example["shortdesc"] or
|
|
||||||
example["example"]))
|
|
||||||
entry.appendChild(summary)
|
|
||||||
|
|
||||||
updated = doc.createElementNS(atomuri, "updated")
|
|
||||||
updated.appendChild(doc.createTextNode(example["modified"]))
|
|
||||||
entry.appendChild(updated)
|
|
||||||
|
|
||||||
author = doc.createElementNS(atomuri, "author")
|
|
||||||
name = doc.createElementNS(atomuri, "name")
|
|
||||||
name.appendChild(doc.createTextNode(example["author"]))
|
|
||||||
author.appendChild(name)
|
|
||||||
entry.appendChild(author)
|
|
||||||
|
|
||||||
id = doc.createElementNS(atomuri, "id")
|
|
||||||
id.appendChild(doc.createTextNode("%s%s#%s" % (feedPath,
|
|
||||||
example["example"],
|
|
||||||
example["modified"])))
|
|
||||||
entry.appendChild(id)
|
|
||||||
|
|
||||||
feed.appendChild(entry)
|
|
||||||
|
|
||||||
doc.appendChild(feed)
|
|
||||||
return doc
|
|
||||||
|
|
||||||
|
|
||||||
def wordIndex(examples):
|
|
||||||
"""
|
|
||||||
Create an inverted index based on words in title and shortdesc. Keys are
|
|
||||||
lower cased words. Values are dictionaries with example index keys and
|
|
||||||
count values.
|
|
||||||
"""
|
|
||||||
index = {}
|
|
||||||
unword = re.compile("\\W+")
|
|
||||||
keys = ["shortdesc", "title", "tags"]
|
|
||||||
for i in range(len(examples)):
|
|
||||||
for key in keys:
|
|
||||||
text = examples[i][key]
|
|
||||||
if text:
|
|
||||||
words = unword.split(text)
|
|
||||||
for word in words:
|
|
||||||
if word:
|
|
||||||
word = word.lower()
|
|
||||||
if word in index:
|
|
||||||
if i in index[word]:
|
|
||||||
index[word][i] += 1
|
|
||||||
else:
|
|
||||||
index[word][i] = 1
|
|
||||||
else:
|
|
||||||
index[word] = {i: 1}
|
|
||||||
return index
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
|
|
||||||
if missing_deps:
|
|
||||||
print """This script requires json or simplejson and BeautifulSoup.
|
|
||||||
You don't have them. \n(%s)""" % E
|
|
||||||
sys.exit()
|
|
||||||
|
|
||||||
if len(sys.argv) == 3:
|
|
||||||
inExampleDir = sys.argv[1]
|
|
||||||
outExampleDir = sys.argv[2]
|
|
||||||
else:
|
|
||||||
inExampleDir = "../examples"
|
|
||||||
outExampleDir = "../examples"
|
|
||||||
|
|
||||||
outFile = open(os.path.join(outExampleDir, "example-list.js"), "w")
|
|
||||||
|
|
||||||
print 'Reading examples from %s and writing out to %s' % (inExampleDir,
|
|
||||||
outFile.name)
|
|
||||||
|
|
||||||
exampleList = []
|
|
||||||
docIds = ['title', 'shortdesc', 'tags']
|
|
||||||
|
|
||||||
examples = getListOfExamples(inExampleDir)
|
|
||||||
|
|
||||||
modtime = time.strftime("%Y-%m-%dT%I:%M:%SZ", time.gmtime())
|
|
||||||
|
|
||||||
for example in examples:
|
|
||||||
path = os.path.join(inExampleDir, example)
|
|
||||||
html = getExampleHtml(path)
|
|
||||||
tagvalues = parseHtml(html, docIds)
|
|
||||||
tagvalues['example'] = example
|
|
||||||
# add in author/date info
|
|
||||||
d = getGitInfo(inExampleDir, example)
|
|
||||||
tagvalues["author"] = d["author"] or "anonymous"
|
|
||||||
tagvalues["modified"] = d["date"] or modtime
|
|
||||||
tagvalues['link'] = example
|
|
||||||
|
|
||||||
exampleList.append(tagvalues)
|
|
||||||
|
|
||||||
print
|
|
||||||
|
|
||||||
exampleList.sort(key=lambda x: x['example'].lower())
|
|
||||||
|
|
||||||
index = wordIndex(exampleList)
|
|
||||||
|
|
||||||
json = json.dumps({"examples": exampleList, "index": index})
|
|
||||||
# Give the json a global variable we can use in our js.
|
|
||||||
# This should be replaced or made optional.
|
|
||||||
json = 'var info=' + json + ';'
|
|
||||||
outFile.write(json)
|
|
||||||
outFile.close()
|
|
||||||
|
|
||||||
outFeedPath = os.path.join(outExampleDir, feedName)
|
|
||||||
print "writing feed to %s " % outFeedPath
|
|
||||||
atom = open(outFeedPath, 'w')
|
|
||||||
doc = createFeed(exampleList)
|
|
||||||
atom.write(doc.toxml())
|
|
||||||
atom.close()
|
|
||||||
|
|
||||||
print 'complete'
|
|
||||||
@@ -1,412 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
|
|
||||||
from operator import attrgetter
|
|
||||||
from optparse import OptionParser
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
|
|
||||||
|
|
||||||
def simplerepr(obj):
|
|
||||||
keys = sorted(key for key in obj.__dict__.keys() if not key.startswith('_'))
|
|
||||||
attrs = ''.join(' %s=%r' % (key, obj.__dict__[key]) for key in keys)
|
|
||||||
return '<%s%s>' % (obj.__class__.__name__, attrs)
|
|
||||||
|
|
||||||
|
|
||||||
class Exportable(object):
|
|
||||||
|
|
||||||
def __init__(self, name):
|
|
||||||
self.name = name
|
|
||||||
|
|
||||||
__repr__ = simplerepr
|
|
||||||
|
|
||||||
def export(self):
|
|
||||||
return ''
|
|
||||||
|
|
||||||
def extern(self):
|
|
||||||
return ''
|
|
||||||
|
|
||||||
def typedef(self):
|
|
||||||
return ''
|
|
||||||
|
|
||||||
|
|
||||||
class Class(Exportable):
|
|
||||||
|
|
||||||
def __init__(self, name, object_literal, objects):
|
|
||||||
Exportable.__init__(self, name)
|
|
||||||
self.object_literal = object_literal
|
|
||||||
self.objects = objects
|
|
||||||
self.props = set()
|
|
||||||
|
|
||||||
__repr__ = simplerepr
|
|
||||||
|
|
||||||
def nested_options(self):
|
|
||||||
def get_class_by_object_literal_name(name):
|
|
||||||
for k, o in self.objects.iteritems():
|
|
||||||
if isinstance(o, Class) and o.object_literal.name == name:
|
|
||||||
return o
|
|
||||||
return None
|
|
||||||
|
|
||||||
for option in sorted(self.object_literal.prop_types.keys()):
|
|
||||||
types = self.object_literal.prop_types[option].split('|')
|
|
||||||
base, object_literal = None, None
|
|
||||||
for t in types:
|
|
||||||
if t in self.objects:
|
|
||||||
o = self.objects[t]
|
|
||||||
if isinstance(o, (Class, Symbol)):
|
|
||||||
if base:
|
|
||||||
raise RuntimeError('Multiple "class" types found for '
|
|
||||||
'option %s.%s: %s, %s.' %
|
|
||||||
(self.object_literal.name, option,
|
|
||||||
base.name, o.name))
|
|
||||||
base = o
|
|
||||||
elif isinstance(o, ObjectLiteral):
|
|
||||||
if object_literal:
|
|
||||||
raise RuntimeError('Multiple "literal" types found for '
|
|
||||||
'option %s.%s: %s, %s.' %
|
|
||||||
(self.object_literal.name, option,
|
|
||||||
object_literal.name, o.name))
|
|
||||||
object_literal = o
|
|
||||||
if object_literal:
|
|
||||||
if not base:
|
|
||||||
raise RuntimeError('%s "literal" type found for option %s.%s, '
|
|
||||||
'but no "class" type.' %
|
|
||||||
(object_literal.name, self.object_literal.name, option))
|
|
||||||
klass = get_class_by_object_literal_name(object_literal.name)
|
|
||||||
if not klass:
|
|
||||||
raise RuntimeError('No constructor taking a %s found.' %
|
|
||||||
object_literal.name)
|
|
||||||
yield option, object_literal, klass, base
|
|
||||||
|
|
||||||
def export(self):
|
|
||||||
lines = []
|
|
||||||
if self.object_literal is None:
|
|
||||||
lines.append('\n\ngoog.exportSymbol(\n \'%s\',\n %s);\n' % (self.name, self.name))
|
|
||||||
else:
|
|
||||||
lines.append('\n\n\n')
|
|
||||||
lines.append('/**\n')
|
|
||||||
lines.append(' * @constructor\n')
|
|
||||||
lines.append(' * @extends {%s}\n' % (self.name,))
|
|
||||||
lines.append(' * @param {%s} options Options.\n' % (self.object_literal.extern_name(),))
|
|
||||||
lines.append(' */\n')
|
|
||||||
lines.append('%s = function(options) {\n' % (self.export_name(),))
|
|
||||||
lines.append(' /** @type {%s} */\n' % (self.object_literal.name,))
|
|
||||||
lines.append(' var arg = /** @type {%s} */ (options);\n' % (self.object_literal.name,));
|
|
||||||
lines.append(' if (goog.isDefAndNotNull(options)) {\n')
|
|
||||||
# FIXME: we modify the user's options object
|
|
||||||
lines.append(''.join(
|
|
||||||
' if (!(options.%(o)s instanceof %(base)s)) {\n'
|
|
||||||
' options.%(o)s = new %(ctor)s(\n'
|
|
||||||
' /** @type {%(extern)s} */ (options.%(o)s));\n'
|
|
||||||
' }\n' %
|
|
||||||
{'o': o, 'base': b.name, 'ctor': k.export_name(),
|
|
||||||
'extern': ol.extern_name()} \
|
|
||||||
for o, ol, k, b in self.nested_options()))
|
|
||||||
lines.extend('\n'.join(' arg.%s = options.%s;' % (key, key) for key in sorted(self.object_literal.prop_types.keys())))
|
|
||||||
lines.append('\n }\n')
|
|
||||||
lines.append(' goog.base(this, arg);\n')
|
|
||||||
lines.append('};\n')
|
|
||||||
lines.append('goog.inherits(\n')
|
|
||||||
lines.append(' %sExport,\n' % (self.name,));
|
|
||||||
lines.append(' %s);\n' % (self.name,));
|
|
||||||
lines.append('goog.exportSymbol(\n')
|
|
||||||
lines.append(' \'%s\',\n' % (self.name,))
|
|
||||||
lines.append(' %s);\n' % (self.export_name(),))
|
|
||||||
lines.extend('goog.exportProperty(\n %s,\n \'%s\',\n %s.%s);\n' % (self.name, prop, self.name, prop) for prop in sorted(self.props))
|
|
||||||
return ''.join(lines)
|
|
||||||
|
|
||||||
def export_name(self):
|
|
||||||
return '%sExport' % self.name
|
|
||||||
|
|
||||||
|
|
||||||
class Function(Exportable):
|
|
||||||
|
|
||||||
def __init__(self, name, object_literal, return_type, objects):
|
|
||||||
Exportable.__init__(self, name)
|
|
||||||
self.object_literal = object_literal
|
|
||||||
self.return_type = return_type
|
|
||||||
self.objects = objects
|
|
||||||
|
|
||||||
__repr__ = simplerepr
|
|
||||||
|
|
||||||
def property_object_literal(self, object_literal, prop):
|
|
||||||
prop_object_literal = None
|
|
||||||
types = object_literal.prop_types[prop].split('|')
|
|
||||||
for t in types:
|
|
||||||
if t in self.objects:
|
|
||||||
o = self.objects[t]
|
|
||||||
if isinstance(o, ObjectLiteral):
|
|
||||||
if prop_object_literal:
|
|
||||||
raise RuntimeError('Multiple "literal" types found for '
|
|
||||||
'option %s.%s: %s, %s.' %
|
|
||||||
(object_literal.name, prop,
|
|
||||||
prop_object_literal.name, o.name))
|
|
||||||
prop_object_literal = o
|
|
||||||
return prop_object_literal
|
|
||||||
|
|
||||||
def recursive_export(self, lines, prop, object_literal, local_var=None, depth=1):
|
|
||||||
indent = ' ' * depth
|
|
||||||
if not local_var:
|
|
||||||
local_var = prop.split('.')[-1]
|
|
||||||
lines.append('%s/** @type {%s} */\n' % (indent, object_literal.name))
|
|
||||||
lines.append('%svar %s =\n' % (indent, local_var))
|
|
||||||
lines.append('%s /** @type {%s} */\n' % (indent, object_literal.name))
|
|
||||||
lines.append('%s (%s);\n' % (indent, prop))
|
|
||||||
lines.append('%sif (goog.isDefAndNotNull(%s)) {\n' % (indent, prop))
|
|
||||||
for key in sorted(object_literal.prop_types.keys()):
|
|
||||||
prop_object_literal = self.property_object_literal(object_literal, key)
|
|
||||||
if prop_object_literal:
|
|
||||||
lv = self.recursive_export(lines, '%s.%s' % (prop, key),
|
|
||||||
prop_object_literal, depth=depth + 1)
|
|
||||||
lines.append('%s %s.%s =\n%s %s;\n' %
|
|
||||||
(indent, local_var, key, indent, lv))
|
|
||||||
else:
|
|
||||||
lines.append('%s %s.%s =\n%s %s.%s;\n' %
|
|
||||||
(indent, local_var, key, indent, prop, key))
|
|
||||||
lines.append('%s}\n' % (indent,))
|
|
||||||
return local_var
|
|
||||||
|
|
||||||
def export(self):
|
|
||||||
lines = []
|
|
||||||
local_var = 'arg'
|
|
||||||
lines.append('\n\n')
|
|
||||||
lines.append('/**\n')
|
|
||||||
lines.append(' * @param {%s} options Options.\n' % (self.object_literal.extern_name(),))
|
|
||||||
if self.return_type:
|
|
||||||
lines.append(' * @return {%s} Return value.\n' % (self.return_type,))
|
|
||||||
lines.append(' */\n')
|
|
||||||
lines.append('%s = function(options) {\n' % (self.export_name(),))
|
|
||||||
self.recursive_export(lines, 'options', self.object_literal,
|
|
||||||
local_var=local_var)
|
|
||||||
if self.return_type:
|
|
||||||
lines.append(' return %s(%s);\n' % (self.name, local_var))
|
|
||||||
else:
|
|
||||||
lines.append(' %s(arg);\n' % (self.name,))
|
|
||||||
lines.append('};\n')
|
|
||||||
lines.append('goog.exportSymbol(\n')
|
|
||||||
lines.append(' \'%s\',\n' % (self.name,))
|
|
||||||
lines.append(' %s);\n' % (self.export_name(),))
|
|
||||||
return ''.join(lines)
|
|
||||||
|
|
||||||
def export_name(self):
|
|
||||||
return '%sExport' % self.name
|
|
||||||
|
|
||||||
class ObjectLiteral(Exportable):
|
|
||||||
|
|
||||||
def __init__(self, name, objects):
|
|
||||||
Exportable.__init__(self, name)
|
|
||||||
self.prop_types = {}
|
|
||||||
self.objects = objects
|
|
||||||
|
|
||||||
__repr__ = simplerepr
|
|
||||||
|
|
||||||
def extern(self):
|
|
||||||
lines = []
|
|
||||||
lines.append('\n\n\n')
|
|
||||||
lines.append('/**\n')
|
|
||||||
lines.append(' * @interface\n')
|
|
||||||
lines.append(' */\n')
|
|
||||||
lines.append('%s = function() {};\n' % (self.extern_name(),))
|
|
||||||
for prop in sorted(self.prop_types.keys()):
|
|
||||||
lines.append('\n\n')
|
|
||||||
lines.append('/**\n')
|
|
||||||
prop_types = self.prop_types[prop].split('|')
|
|
||||||
for i, t in enumerate(prop_types):
|
|
||||||
if t in self.objects and isinstance(self.objects[t], ObjectLiteral):
|
|
||||||
prop_types[i] = self.objects[t].extern_name()
|
|
||||||
prop_types = '|'.join(prop_types)
|
|
||||||
lines.append(' * @type {%s}\n' % (prop_types,))
|
|
||||||
lines.append(' */\n')
|
|
||||||
lines.append('%s.prototype.%s;\n' % (self.extern_name(), prop))
|
|
||||||
return ''.join(lines)
|
|
||||||
|
|
||||||
def extern_name(self):
|
|
||||||
return re.sub(r'ol\.(\S+)', r'olx.\1Extern', self.name)
|
|
||||||
|
|
||||||
def extern_namespace(self):
|
|
||||||
return '.'.join(self.extern_name().split('.')[:-1]) or None
|
|
||||||
|
|
||||||
def provide(self):
|
|
||||||
return 'goog.provide(\'%s\');\n' % (self.name,)
|
|
||||||
|
|
||||||
def typedef(self):
|
|
||||||
lines = []
|
|
||||||
lines.append('\n\n')
|
|
||||||
lines.append('/**\n')
|
|
||||||
for i, prop in enumerate(sorted(self.prop_types.keys())):
|
|
||||||
prefix = ' * @typedef {{' if i == 0 else ' * '
|
|
||||||
suffix = '}}' if i == len(self.prop_types) - 1 else ','
|
|
||||||
type = self.prop_types[prop]
|
|
||||||
if '|' in type:
|
|
||||||
type = '(%s)' % (type,)
|
|
||||||
lines.append('%s%s: %s%s\n' % (prefix, prop, type, suffix))
|
|
||||||
lines.append(' */\n')
|
|
||||||
lines.append('%s;\n' % (self.name,))
|
|
||||||
return ''.join(lines)
|
|
||||||
|
|
||||||
|
|
||||||
class Symbol(Exportable):
|
|
||||||
|
|
||||||
def __init__(self, name, export_symbol, export_as=None):
|
|
||||||
Exportable.__init__(self, name)
|
|
||||||
self.export_symbol = export_symbol
|
|
||||||
self.export_as = export_as or self.name
|
|
||||||
self.props = set()
|
|
||||||
|
|
||||||
__repr__ = simplerepr
|
|
||||||
|
|
||||||
def export(self):
|
|
||||||
lines = []
|
|
||||||
if self.export_symbol:
|
|
||||||
lines.append('\n\ngoog.exportSymbol(\n \'%s\',\n %s);\n' % (self.name, self.export_as))
|
|
||||||
lines.extend('goog.exportProperty(\n %s,\n \'%s\',\n %s.%s);\n' % (self.name, prop, self.name, prop) for prop in sorted(self.props))
|
|
||||||
return ''.join(lines)
|
|
||||||
|
|
||||||
|
|
||||||
def main(argv):
|
|
||||||
|
|
||||||
option_parser = OptionParser()
|
|
||||||
option_parser.add_option('--exports', action='store_true')
|
|
||||||
option_parser.add_option('--externs', action='store_true')
|
|
||||||
option_parser.add_option('--typedef', action='store_true')
|
|
||||||
options, args = option_parser.parse_args(argv[1:])
|
|
||||||
|
|
||||||
objects = {}
|
|
||||||
requires = set()
|
|
||||||
for arg in args:
|
|
||||||
in_comment = False
|
|
||||||
object_literal = None
|
|
||||||
for line in open(arg):
|
|
||||||
line = line.strip()
|
|
||||||
if not line:
|
|
||||||
continue
|
|
||||||
if line == '/**':
|
|
||||||
assert not in_comment
|
|
||||||
in_comment = True
|
|
||||||
continue
|
|
||||||
if line == '*/':
|
|
||||||
assert in_comment
|
|
||||||
in_comment = False
|
|
||||||
object_literal = None
|
|
||||||
continue
|
|
||||||
if in_comment:
|
|
||||||
if not line.startswith('*'):
|
|
||||||
raise RuntimeError(line) # malformed comment
|
|
||||||
m = re.match(r'\*\s*@typedef\s*\{Object\}\s*(?P<name>\S+)', line)
|
|
||||||
if m:
|
|
||||||
assert object_literal is None
|
|
||||||
name = m.group('name')
|
|
||||||
if name in objects:
|
|
||||||
raise RuntimeError(line) # Name already defined
|
|
||||||
object_literal = ObjectLiteral(name, objects)
|
|
||||||
objects[name] = object_literal
|
|
||||||
continue
|
|
||||||
m = re.match(r'\*\s*@property\s*{(?P<type>.*?)}\s*(?P<prop>\S+)', line)
|
|
||||||
if m:
|
|
||||||
assert object_literal is not None
|
|
||||||
prop = m.group('prop')
|
|
||||||
if prop in object_literal.prop_types:
|
|
||||||
raise RuntimeError(line) # Duplicate property
|
|
||||||
type = m.group('type')
|
|
||||||
object_literal.prop_types[prop] = type
|
|
||||||
continue
|
|
||||||
continue
|
|
||||||
m = re.match(r'@exportClass\s+(?P<name>\S+)(?:\s+(?P<object_literal_name>\S+))?\Z', line)
|
|
||||||
if m:
|
|
||||||
name = m.group('name')
|
|
||||||
if name in objects:
|
|
||||||
raise RuntimeError(line) # Name already defined
|
|
||||||
object_literal_name = m.group('object_literal_name')
|
|
||||||
object_literal = objects[object_literal_name]
|
|
||||||
if not isinstance(object_literal, ObjectLiteral):
|
|
||||||
raise RuntimeError(line) # Undefined object literal
|
|
||||||
klass = Class(name, object_literal, objects)
|
|
||||||
objects[name] = klass
|
|
||||||
continue
|
|
||||||
m = re.match(r'@exportProperty\s+(?P<prop>\S+)\Z', line)
|
|
||||||
if m:
|
|
||||||
components = m.group('prop').split('.')
|
|
||||||
if components[-2] == 'prototype':
|
|
||||||
requires.add('.'.join(components[:-2]))
|
|
||||||
else:
|
|
||||||
requires.add('.'.join(components[:-1]))
|
|
||||||
name = '.'.join(components[:-1])
|
|
||||||
prop = components[-1]
|
|
||||||
if name in objects:
|
|
||||||
symbol = objects[name]
|
|
||||||
else:
|
|
||||||
symbol = Symbol(name, False)
|
|
||||||
objects[name] = symbol
|
|
||||||
symbol.props.add(prop)
|
|
||||||
continue
|
|
||||||
m = re.match(r'@exportFunction\s+(?P<name>\S+)(?:\s+(?P<object_literal_name>\S+))?(?:\s+(?P<return_type>\S+))?\Z', line)
|
|
||||||
if m:
|
|
||||||
name = m.group('name')
|
|
||||||
if name in objects:
|
|
||||||
raise RuntimeError(line) # Name already defined
|
|
||||||
object_literal_name = m.group('object_literal_name')
|
|
||||||
if object_literal_name not in objects:
|
|
||||||
raise RuntimeError(line)
|
|
||||||
object_literal = objects[object_literal_name]
|
|
||||||
if not isinstance(object_literal, ObjectLiteral):
|
|
||||||
raise RuntimeError(line)
|
|
||||||
return_type = m.group('return_type')
|
|
||||||
function = Function(name, object_literal, return_type, objects)
|
|
||||||
objects[name] = function
|
|
||||||
# The require should only be for the namespace, not the function
|
|
||||||
requires.add('.'.join(name.split('.')[0:-1]))
|
|
||||||
continue
|
|
||||||
m = re.match(r'@exportSymbol\s+(?P<name>\S+)(?:\s+(?P<export_as>\S+))?\Z', line)
|
|
||||||
if m:
|
|
||||||
name = m.group('name')
|
|
||||||
if name in objects:
|
|
||||||
raise RuntimeError(line) # Name already defined
|
|
||||||
export_as = m.group('export_as')
|
|
||||||
symbol = Symbol(name, True, export_as)
|
|
||||||
objects[name] = symbol
|
|
||||||
if not export_as:
|
|
||||||
components = m.group('name').split('.')
|
|
||||||
if re.match(r'[A-Z]', components[-1]):
|
|
||||||
requires.add(name)
|
|
||||||
elif len(components) > 1:
|
|
||||||
requires.add('.'.join(components[:-1]))
|
|
||||||
continue
|
|
||||||
raise RuntimeError(line)
|
|
||||||
|
|
||||||
objects = sorted(objects.values(), key=attrgetter('name'))
|
|
||||||
|
|
||||||
if options.exports:
|
|
||||||
requires.update(obj.name for obj in objects if isinstance(obj, Class))
|
|
||||||
if requires:
|
|
||||||
for require in sorted(requires):
|
|
||||||
sys.stdout.write('goog.require(\'%s\');\n' % (require,))
|
|
||||||
for obj in objects:
|
|
||||||
sys.stdout.write(obj.export())
|
|
||||||
|
|
||||||
if options.externs:
|
|
||||||
object_literals = [obj for obj in objects if isinstance(obj, ObjectLiteral)]
|
|
||||||
sys.stdout.write('/**\n')
|
|
||||||
sys.stdout.write(' * @externs\n')
|
|
||||||
sys.stdout.write(' */\n')
|
|
||||||
namespaces = sorted(set(filter(None, (object_literal.extern_namespace() for object_literal in object_literals))))
|
|
||||||
for namespace in namespaces:
|
|
||||||
sys.stdout.write('\n\n')
|
|
||||||
sys.stdout.write('/**\n')
|
|
||||||
sys.stdout.write(' * @type {Object}\n')
|
|
||||||
sys.stdout.write(' */\n')
|
|
||||||
if '.' in namespace:
|
|
||||||
sys.stdout.write('%s = {};\n' % (namespace,))
|
|
||||||
else:
|
|
||||||
sys.stdout.write('var %s;\n' % (namespace,))
|
|
||||||
for object_literal in object_literals:
|
|
||||||
sys.stdout.write(object_literal.extern())
|
|
||||||
|
|
||||||
if options.typedef:
|
|
||||||
object_literals = [obj for obj in objects if isinstance(obj, ObjectLiteral)]
|
|
||||||
for object_literal in object_literals:
|
|
||||||
sys.stdout.write(object_literal.provide())
|
|
||||||
for object_literal in object_literals:
|
|
||||||
sys.stdout.write(object_literal.typedef())
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.exit(main(sys.argv))
|
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
/**
|
|
||||||
* Loader to add ol.css, ol.js and the example-specific js file to the
|
|
||||||
* documents.
|
|
||||||
*
|
|
||||||
* This loader is used for the hosted examples. It is used in place of the
|
|
||||||
* development loader (examples/loader.js).
|
|
||||||
*
|
|
||||||
* ol.css, ol.js, ol-simple.js, ol-whitespace.js, and ol-deps.js are built
|
|
||||||
* by OL3's build.py script. They are located in the ../build/ directory,
|
|
||||||
* relatively to this script.
|
|
||||||
*
|
|
||||||
* The script must be named loader.js.
|
|
||||||
*
|
|
||||||
* Usage:
|
|
||||||
*
|
|
||||||
* <script src="../loader.js?id=my-demo"></script>
|
|
||||||
*/
|
|
||||||
|
|
||||||
(function() {
|
|
||||||
|
|
||||||
var i, pair;
|
|
||||||
|
|
||||||
var href = window.location.href, start, end, paramsString, pairs,
|
|
||||||
pageParams = {};
|
|
||||||
if (href.indexOf('?') > 0) {
|
|
||||||
start = href.indexOf('?') + 1;
|
|
||||||
end = href.indexOf('#') > 0 ? href.indexOf('#') : href.length;
|
|
||||||
paramsString = href.substring(start, end);
|
|
||||||
pairs = paramsString.split(/[&;]/);
|
|
||||||
for (i = 0; i < pairs.length; ++i) {
|
|
||||||
pair = pairs[i].split('=');
|
|
||||||
if (pair[0]) {
|
|
||||||
pageParams[decodeURIComponent(pair[0])] =
|
|
||||||
decodeURIComponent(pair[1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var scripts = document.getElementsByTagName('script');
|
|
||||||
var src, index, search, chunks, scriptParams = {};
|
|
||||||
for (i = scripts.length - 1; i >= 0; --i) {
|
|
||||||
src = scripts[i].getAttribute('src');
|
|
||||||
if (~(index = src.indexOf('loader.js?'))) {
|
|
||||||
search = src.substr(index + 10);
|
|
||||||
chunks = search ? search.split('&') : [];
|
|
||||||
for (i = chunks.length - 1; i >= 0; --i) {
|
|
||||||
pair = chunks[i].split('=');
|
|
||||||
if (pair[0]) {
|
|
||||||
scriptParams[decodeURIComponent(pair[0])] =
|
|
||||||
decodeURIComponent(pair[1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var oljs = 'ol.js', mode;
|
|
||||||
if ('mode' in pageParams) {
|
|
||||||
mode = pageParams.mode.toLowerCase();
|
|
||||||
if (mode == 'debug') {
|
|
||||||
mode = 'raw';
|
|
||||||
}
|
|
||||||
if (mode != 'advanced' && mode != 'raw') {
|
|
||||||
oljs = 'ol-' + mode + '.js';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// CLOSURE_NO_DEPS has an effect in "raw" and "whitespace" modes only (i.e.
|
|
||||||
// when COMPILED is false). In "raw" mode we use our own deps file
|
|
||||||
// (ol-deps.js), so we set CLOSURE_NO_DEPS to true to prevent Google
|
|
||||||
// Library's base.js script to load deps.js. In "whitespace" mode
|
|
||||||
// no deps file is needed at all, yet base.js will attempt to load deps.js
|
|
||||||
// if CLOSURE_NO_DEPS is not set to true.
|
|
||||||
window.CLOSURE_NO_DEPS = true;
|
|
||||||
|
|
||||||
var scriptId = encodeURIComponent(scriptParams.id);
|
|
||||||
document.write('<link rel="stylesheet" href="../build/ol.css" type="text/css">');
|
|
||||||
if (mode != 'raw') {
|
|
||||||
document.write('<scr' + 'ipt type="text/javascript" src="../build/' + oljs + '"></scr' + 'ipt>');
|
|
||||||
} else {
|
|
||||||
document.write('<scr' + 'ipt type="text/javascript" src="../closure-library/closure/goog/base.js"></scr' + 'ipt>');
|
|
||||||
document.write('<scr' + 'ipt type="text/javascript" src="../build/ol-deps.js"></scr' + 'ipt>');
|
|
||||||
document.write('<scr' + 'ipt type="text/javascript" src="' + scriptId + '-require.js"></scr' + 'ipt>');
|
|
||||||
}
|
|
||||||
document.write('<scr' + 'ipt type="text/javascript" src="' + scriptId + '.js"></scr' + 'ipt>');
|
|
||||||
}());
|
|
||||||
804
build.py
@@ -1,804 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
|
|
||||||
from cStringIO import StringIO
|
|
||||||
import gzip
|
|
||||||
import json
|
|
||||||
import os
|
|
||||||
import os.path
|
|
||||||
import regex as re
|
|
||||||
import shutil
|
|
||||||
import sys
|
|
||||||
|
|
||||||
from pake import Target
|
|
||||||
from pake import ifind, main, output, rule, target, variables, virtual, which
|
|
||||||
|
|
||||||
|
|
||||||
if sys.platform == 'win32':
|
|
||||||
""" windows_defaults assumes that jsdoc was installed at a specific place
|
|
||||||
(C:\jsdoc). It also fixes a certain version (1.9.0) of phantomjs which
|
|
||||||
might not anymore be proposed on
|
|
||||||
http://code.google.com/p/phantomjs/downloads/list"""
|
|
||||||
|
|
||||||
windows_defaults = {
|
|
||||||
'ProgramFiles': os.environ.get('ProgramFiles', 'C:\\Program Files'),
|
|
||||||
'Python27': os.environ.get('SystemDrive', 'C:') + '\\Python27',
|
|
||||||
'jsdoc': os.environ.get('SystemDrive', 'C:') + '\\jsdoc3',
|
|
||||||
'phantomjs': (os.environ.get('SystemDrive', 'C:') +
|
|
||||||
'\\phantomjs-1.9.0-windows')
|
|
||||||
}
|
|
||||||
|
|
||||||
if which('git.exe'):
|
|
||||||
variables.GIT = 'git.exe'
|
|
||||||
else:
|
|
||||||
variables.GIT = os.path.join(windows_defaults['ProgramFiles'],
|
|
||||||
'Git', 'bin', 'git.exe')
|
|
||||||
|
|
||||||
if which('gjslint.exe'):
|
|
||||||
variables.GJSLINT = 'gjslint.exe'
|
|
||||||
else:
|
|
||||||
variables.GJSLINT = os.path.join(windows_defaults['Python27'],
|
|
||||||
'Scripts', 'gjslint.exe')
|
|
||||||
|
|
||||||
if which('java.exe'):
|
|
||||||
variables.JAVA = 'java.exe'
|
|
||||||
else:
|
|
||||||
variables.JAVA = os.path.join(windows_defaults['ProgramFiles'],
|
|
||||||
'Java', 'jre7', 'bin', 'java.exe')
|
|
||||||
|
|
||||||
if which('jar.exe'):
|
|
||||||
variables.JAR = 'jar.exe'
|
|
||||||
else:
|
|
||||||
variables.JAR = os.path.join(windows_defaults['ProgramFiles'],
|
|
||||||
'Java', 'jdk1.7.0_17', 'bin', 'jar.exe')
|
|
||||||
|
|
||||||
if which('jsdoc.cmd'):
|
|
||||||
variables.JSDOC = 'jsdoc.cmd'
|
|
||||||
else:
|
|
||||||
variables.JSDOC = os.path.join(windows_defaults['jsdoc'],
|
|
||||||
'jsdoc.cmd')
|
|
||||||
|
|
||||||
if which('python.exe'):
|
|
||||||
variables.PYTHON = 'python.exe'
|
|
||||||
else:
|
|
||||||
variables.PYTHON = os.path.join(windows_defaults['Python27'],
|
|
||||||
'python.exe')
|
|
||||||
|
|
||||||
if which('phantomjs.exe'):
|
|
||||||
variables.PHANTOMJS = 'phantomjs.exe'
|
|
||||||
else:
|
|
||||||
variables.PHANTOMJS = os.path.join(windows_defaults['phantomjs'],
|
|
||||||
'phantomjs.exe')
|
|
||||||
|
|
||||||
else:
|
|
||||||
variables.GIT = 'git'
|
|
||||||
variables.GJSLINT = 'gjslint'
|
|
||||||
if sys.platform == 'darwin':
|
|
||||||
variables.JAVA = '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java'
|
|
||||||
else:
|
|
||||||
variables.JAVA = 'java'
|
|
||||||
variables.JAR = 'jar'
|
|
||||||
variables.JSDOC = 'jsdoc'
|
|
||||||
variables.NODE = 'node'
|
|
||||||
variables.PYTHON = 'python'
|
|
||||||
variables.PHANTOMJS = 'phantomjs'
|
|
||||||
|
|
||||||
TEMPLATE_GLSL_COMPILER_JS = 'build/glsl-unit/bin/template_glsl_compiler.js'
|
|
||||||
|
|
||||||
variables.BRANCH = output(
|
|
||||||
'%(GIT)s', 'rev-parse', '--abbrev-ref', 'HEAD').strip()
|
|
||||||
|
|
||||||
EXECUTABLES = [variables.GIT, variables.GJSLINT, variables.JAVA, variables.JAR,
|
|
||||||
variables.JSDOC, variables.PYTHON, variables.PHANTOMJS]
|
|
||||||
|
|
||||||
EXPORTS = [path
|
|
||||||
for path in ifind('src')
|
|
||||||
if path.endswith('.exports')]
|
|
||||||
|
|
||||||
EXTERNAL_SRC = [
|
|
||||||
'build/src/external/externs/types.js',
|
|
||||||
'build/src/external/src/exports.js',
|
|
||||||
'build/src/external/src/types.js']
|
|
||||||
|
|
||||||
EXAMPLES = [path
|
|
||||||
for path in ifind('examples')
|
|
||||||
if path.endswith('.html')
|
|
||||||
if path != 'examples/index.html']
|
|
||||||
|
|
||||||
EXAMPLES_SRC = [path
|
|
||||||
for path in ifind('examples')
|
|
||||||
if path.endswith('.js')
|
|
||||||
if not path.endswith('.combined.js')
|
|
||||||
if not path.startswith('examples/bootstrap')
|
|
||||||
if not path.startswith('examples/font-awesome')
|
|
||||||
if path != 'examples/Jugl.js'
|
|
||||||
if path != 'examples/jquery.min.js'
|
|
||||||
if path != 'examples/loader.js'
|
|
||||||
if path != 'examples/example-list.js']
|
|
||||||
|
|
||||||
EXAMPLES_JSON = ['build/' + example.replace('.html', '.json')
|
|
||||||
for example in EXAMPLES]
|
|
||||||
|
|
||||||
EXAMPLES_COMBINED = ['build/' + example.replace('.html', '.combined.js')
|
|
||||||
for example in EXAMPLES]
|
|
||||||
|
|
||||||
INTERNAL_SRC = [
|
|
||||||
'build/src/internal/src/requireall.js',
|
|
||||||
'build/src/internal/src/types.js']
|
|
||||||
|
|
||||||
GLSL_SRC = [path
|
|
||||||
for path in ifind('src')
|
|
||||||
if path.endswith('.glsl')]
|
|
||||||
|
|
||||||
JSDOC_SRC = [path
|
|
||||||
for path in ifind('src')
|
|
||||||
if path.endswith('.jsdoc')]
|
|
||||||
|
|
||||||
SHADER_SRC = [path.replace('.glsl', 'shader.js')
|
|
||||||
for path in GLSL_SRC]
|
|
||||||
|
|
||||||
SPEC = [path
|
|
||||||
for path in ifind('test/spec')
|
|
||||||
if path.endswith('.js')]
|
|
||||||
|
|
||||||
SRC = [path
|
|
||||||
for path in ifind('src/ol')
|
|
||||||
if path.endswith('.js')
|
|
||||||
if path not in SHADER_SRC]
|
|
||||||
|
|
||||||
PLOVR_JAR = 'build/plovr-81ed862.jar'
|
|
||||||
PLOVR_JAR_MD5 = '1c752daaf11ad6220b298e7d2ee2b87d'
|
|
||||||
|
|
||||||
PROJ4JS = 'build/proj4js/lib/proj4js-combined.js'
|
|
||||||
PROJ4JS_ZIP = 'build/proj4js-1.1.0.zip'
|
|
||||||
PROJ4JS_ZIP_MD5 = '17caad64cf6ebc6e6fe62f292b134897'
|
|
||||||
|
|
||||||
|
|
||||||
def report_sizes(t):
|
|
||||||
t.info('uncompressed: %d bytes', os.stat(t.name).st_size)
|
|
||||||
stringio = StringIO()
|
|
||||||
gzipfile = gzip.GzipFile(t.name, 'w', 9, stringio)
|
|
||||||
with open(t.name) as f:
|
|
||||||
shutil.copyfileobj(f, gzipfile)
|
|
||||||
gzipfile.close()
|
|
||||||
t.info(' compressed: %d bytes', len(stringio.getvalue()))
|
|
||||||
|
|
||||||
|
|
||||||
virtual('default', 'build')
|
|
||||||
|
|
||||||
|
|
||||||
virtual('integration-test', 'lint', 'build', 'build-all',
|
|
||||||
'test', 'build-examples', 'check-examples', 'apidoc')
|
|
||||||
|
|
||||||
|
|
||||||
virtual('build', 'build/ol.css', 'build/ol.js',
|
|
||||||
'build/ol-simple.js', 'build/ol-whitespace.js')
|
|
||||||
|
|
||||||
|
|
||||||
virtual('check', 'lint', 'build/ol.css', 'build/ol-all.js', 'test')
|
|
||||||
|
|
||||||
|
|
||||||
virtual('todo', 'fixme')
|
|
||||||
|
|
||||||
|
|
||||||
@target('build/ol.css', 'build/ol.js')
|
|
||||||
def build_ol_css(t):
|
|
||||||
t.touch()
|
|
||||||
|
|
||||||
|
|
||||||
@target('build/ol.js', PLOVR_JAR, SRC, EXTERNAL_SRC, SHADER_SRC,
|
|
||||||
'buildcfg/base.json', 'buildcfg/ol.json')
|
|
||||||
def build_ol_js(t):
|
|
||||||
t.output('%(JAVA)s', '-jar', PLOVR_JAR, 'build', 'buildcfg/ol.json')
|
|
||||||
report_sizes(t)
|
|
||||||
|
|
||||||
|
|
||||||
@target('build/ol-simple.js', PLOVR_JAR, SRC, INTERNAL_SRC, SHADER_SRC,
|
|
||||||
'buildcfg/base.json', 'buildcfg/ol.json', 'buildcfg/ol-simple.json')
|
|
||||||
def build_ol_simple_js(t):
|
|
||||||
t.output('%(JAVA)s', '-jar', PLOVR_JAR, 'build', 'buildcfg/ol-simple.json')
|
|
||||||
report_sizes(t)
|
|
||||||
|
|
||||||
|
|
||||||
@target('build/ol-whitespace.js', PLOVR_JAR, SRC, INTERNAL_SRC, SHADER_SRC,
|
|
||||||
'buildcfg/base.json', 'buildcfg/ol.json',
|
|
||||||
'buildcfg/ol-whitespace.json')
|
|
||||||
def build_ol_whitespace_js(t):
|
|
||||||
t.output('%(JAVA)s', '-jar', PLOVR_JAR,
|
|
||||||
'build', 'buildcfg/ol-whitespace.json')
|
|
||||||
report_sizes(t)
|
|
||||||
|
|
||||||
|
|
||||||
virtual('build-all', 'build/ol-all.js')
|
|
||||||
|
|
||||||
|
|
||||||
@target('build/ol-all.js', PLOVR_JAR, SRC, INTERNAL_SRC, SHADER_SRC,
|
|
||||||
'buildcfg/base.json', 'buildcfg/ol-all.json')
|
|
||||||
def build_ol_all_js(t):
|
|
||||||
t.output('%(JAVA)s', '-jar', PLOVR_JAR, 'build', 'buildcfg/ol-all.json')
|
|
||||||
|
|
||||||
|
|
||||||
@target('build/src/external/externs/types.js', 'bin/generate-exports.py',
|
|
||||||
'src/objectliterals.jsdoc')
|
|
||||||
def build_src_external_externs_types_js(t):
|
|
||||||
t.output('%(PYTHON)s', 'bin/generate-exports.py',
|
|
||||||
'--externs', 'src/objectliterals.jsdoc')
|
|
||||||
|
|
||||||
|
|
||||||
@target('build/src/external/src/exports.js', 'bin/generate-exports.py',
|
|
||||||
'src/objectliterals.jsdoc', EXPORTS)
|
|
||||||
def build_src_external_src_exports_js(t):
|
|
||||||
t.output('%(PYTHON)s', 'bin/generate-exports.py',
|
|
||||||
'--exports', 'src/objectliterals.jsdoc', EXPORTS)
|
|
||||||
|
|
||||||
|
|
||||||
@target('build/src/external/src/types.js', 'bin/generate-exports.py',
|
|
||||||
'src/objectliterals.jsdoc')
|
|
||||||
def build_src_external_src_types_js(t):
|
|
||||||
t.output('%(PYTHON)s', 'bin/generate-exports.py',
|
|
||||||
'--typedef', 'src/objectliterals.jsdoc')
|
|
||||||
|
|
||||||
|
|
||||||
if os.path.exists(TEMPLATE_GLSL_COMPILER_JS):
|
|
||||||
for glsl_src in GLSL_SRC:
|
|
||||||
def shader_src_helper(glsl_src):
|
|
||||||
@target(glsl_src.replace('.glsl', 'shader.js'), glsl_src,
|
|
||||||
'src/ol/webgl/shader.mustache')
|
|
||||||
def shader_src(t):
|
|
||||||
t.run('%(NODE)s', TEMPLATE_GLSL_COMPILER_JS,
|
|
||||||
'--input', glsl_src,
|
|
||||||
'--template', 'src/ol/webgl/shader.mustache',
|
|
||||||
'--output', t.name)
|
|
||||||
shader_src_helper(glsl_src)
|
|
||||||
|
|
||||||
|
|
||||||
def _build_require_list(dependencies, output_file_name):
|
|
||||||
requires = set()
|
|
||||||
for dependency in dependencies:
|
|
||||||
for line in open(dependency):
|
|
||||||
match = re.match(r'goog\.provide\(\'(.*)\'\);', line)
|
|
||||||
if match:
|
|
||||||
requires.add(match.group(1))
|
|
||||||
with open(output_file_name, 'w') as f:
|
|
||||||
for require in sorted(requires):
|
|
||||||
f.write('goog.require(\'%s\');\n' % (require,))
|
|
||||||
|
|
||||||
|
|
||||||
@target('build/src/internal/src/requireall.js', SRC, SHADER_SRC)
|
|
||||||
def build_src_internal_src_requireall_js(t):
|
|
||||||
_build_require_list(t.dependencies, t.name)
|
|
||||||
|
|
||||||
|
|
||||||
@target('build/test/requireall.js', SPEC)
|
|
||||||
def build_test_requireall_js(t):
|
|
||||||
_build_require_list(t.dependencies, t.name)
|
|
||||||
|
|
||||||
|
|
||||||
@target('build/src/internal/src/types.js', 'bin/generate-exports.py',
|
|
||||||
'src/objectliterals.jsdoc')
|
|
||||||
def build_src_internal_types_js(t):
|
|
||||||
t.output('%(PYTHON)s', 'bin/generate-exports.py',
|
|
||||||
'--typedef', 'src/objectliterals.jsdoc')
|
|
||||||
|
|
||||||
|
|
||||||
virtual('build-examples', 'examples', EXAMPLES_COMBINED)
|
|
||||||
|
|
||||||
|
|
||||||
virtual('examples', 'examples/example-list.xml', EXAMPLES_JSON)
|
|
||||||
|
|
||||||
|
|
||||||
@target('examples/example-list.xml', 'examples/example-list.js')
|
|
||||||
def examples_examples_list_xml(t):
|
|
||||||
t.touch() # already generated by bin/exampleparser.py
|
|
||||||
|
|
||||||
|
|
||||||
@target('examples/example-list.js', 'bin/exampleparser.py', EXAMPLES)
|
|
||||||
def examples_examples_list_js(t):
|
|
||||||
t.run('%(PYTHON)s', 'bin/exampleparser.py', 'examples', 'examples')
|
|
||||||
|
|
||||||
|
|
||||||
@rule(r'\Abuild/examples/(?P<id>.*).json\Z')
|
|
||||||
def examples_star_json(name, match):
|
|
||||||
def action(t):
|
|
||||||
content = json.dumps({
|
|
||||||
'id': match.group('id'),
|
|
||||||
'inherits': '../../buildcfg/base.json',
|
|
||||||
'inputs': [
|
|
||||||
'../examples/%(id)s.js' % match.groupdict(),
|
|
||||||
'../build/src/internal/src/types.js',
|
|
||||||
],
|
|
||||||
'externs': [
|
|
||||||
'//json.js',
|
|
||||||
'//jquery-1.7.js',
|
|
||||||
'../externs/bingmaps.js',
|
|
||||||
'../externs/bootstrap.js',
|
|
||||||
'../externs/geojson.js',
|
|
||||||
'../externs/topojson.js',
|
|
||||||
'../externs/oli.js',
|
|
||||||
'../externs/proj4js.js',
|
|
||||||
'../externs/tilejson.js',
|
|
||||||
'../externs/closure-compiler.js',
|
|
||||||
],
|
|
||||||
})
|
|
||||||
with open(t.name, 'w') as f:
|
|
||||||
f.write(content)
|
|
||||||
dependencies = [__file__, 'buildcfg/base.json']
|
|
||||||
return Target(name, action=action, dependencies=dependencies)
|
|
||||||
|
|
||||||
|
|
||||||
@rule(r'\Abuild/examples/(?P<id>.*).combined.js\Z')
|
|
||||||
def examples_star_combined_js(name, match):
|
|
||||||
def action(t):
|
|
||||||
t.output('%(JAVA)s', '-jar', PLOVR_JAR, 'build',
|
|
||||||
'build/examples/%(id)s.json' % match.groupdict())
|
|
||||||
report_sizes(t)
|
|
||||||
dependencies = [PLOVR_JAR, SRC, INTERNAL_SRC, SHADER_SRC,
|
|
||||||
'buildcfg/base.json',
|
|
||||||
'examples/%(id)s.js' % match.groupdict(),
|
|
||||||
'build/examples/%(id)s.json' % match.groupdict()]
|
|
||||||
return Target(name, action=action, dependencies=dependencies)
|
|
||||||
|
|
||||||
|
|
||||||
@target('serve', PLOVR_JAR, 'test-deps', 'examples')
|
|
||||||
def serve(t):
|
|
||||||
t.run('%(JAVA)s', '-jar', PLOVR_JAR, 'serve', 'buildcfg/ol.json',
|
|
||||||
'buildcfg/ol-all.json', EXAMPLES_JSON, 'buildcfg/test.json')
|
|
||||||
|
|
||||||
|
|
||||||
@target('serve-integration-test', PLOVR_JAR, INTERNAL_SRC)
|
|
||||||
def serve_precommit(t):
|
|
||||||
t.run('%(JAVA)s', '-jar', PLOVR_JAR, 'serve',
|
|
||||||
'buildcfg/ol-all.json', 'buildcfg/test.json')
|
|
||||||
|
|
||||||
|
|
||||||
virtual('lint', 'build/lint-timestamp', 'build/lint-generated-timestamp',
|
|
||||||
'build/check-requires-timestamp', 'build/check-whitespace-timestamp')
|
|
||||||
|
|
||||||
|
|
||||||
@target('build/lint-timestamp', SRC, EXAMPLES_SRC, SPEC, precious=True)
|
|
||||||
def build_lint_src_timestamp(t):
|
|
||||||
t.run('%(GJSLINT)s',
|
|
||||||
'--jslint_error=all',
|
|
||||||
'--strict',
|
|
||||||
t.newer(t.dependencies))
|
|
||||||
t.touch()
|
|
||||||
|
|
||||||
|
|
||||||
@target('build/lint-generated-timestamp', INTERNAL_SRC, EXTERNAL_SRC,
|
|
||||||
precious=True)
|
|
||||||
def build_lint_generated_timestamp(t):
|
|
||||||
limited_doc_files = [
|
|
||||||
path
|
|
||||||
for path in ifind('externs', 'build/src/external/externs')
|
|
||||||
if path.endswith('.js')]
|
|
||||||
t.run('%(GJSLINT)s',
|
|
||||||
'--jslint_error=all',
|
|
||||||
# ignore error for max line length (for these auto-generated sources)
|
|
||||||
'--disable=110',
|
|
||||||
# for a complete list of error codes to allow, see
|
|
||||||
# http://closure-linter.googlecode.com/svn/trunk/closure_linter/errors.py
|
|
||||||
'--limited_doc_files=%s' % (','.join(limited_doc_files),),
|
|
||||||
'--strict',
|
|
||||||
t.newer(t.dependencies))
|
|
||||||
t.touch()
|
|
||||||
|
|
||||||
|
|
||||||
def _strip_comments(lines):
|
|
||||||
# FIXME this is a horribe hack, we should use a proper JavaScript parser
|
|
||||||
# here
|
|
||||||
in_multiline_comment = False
|
|
||||||
lineno = 0
|
|
||||||
for line in lines:
|
|
||||||
lineno += 1
|
|
||||||
if in_multiline_comment:
|
|
||||||
index = line.find('*/')
|
|
||||||
if index != -1:
|
|
||||||
in_multiline_comment = False
|
|
||||||
line = line[index + 2:]
|
|
||||||
if not in_multiline_comment:
|
|
||||||
line = re.sub(r'//[^\n]*', '', line)
|
|
||||||
line = re.sub(r'/\*.*?\*/', '', line)
|
|
||||||
index = line.find('/*')
|
|
||||||
if index != -1:
|
|
||||||
yield lineno, line[:index]
|
|
||||||
in_multiline_comment = True
|
|
||||||
else:
|
|
||||||
yield lineno, line
|
|
||||||
|
|
||||||
|
|
||||||
@target('build/check-requires-timestamp', SRC, INTERNAL_SRC, EXTERNAL_SRC,
|
|
||||||
EXAMPLES_SRC, SHADER_SRC, SPEC)
|
|
||||||
def build_check_requires_timestamp(t):
|
|
||||||
from zipfile import ZipFile
|
|
||||||
unused_count = 0
|
|
||||||
all_provides = set()
|
|
||||||
zf = ZipFile(PLOVR_JAR)
|
|
||||||
for zi in zf.infolist():
|
|
||||||
if zi.filename.endswith('.js'):
|
|
||||||
if not zi.filename.startswith('closure/goog/'):
|
|
||||||
continue
|
|
||||||
# Skip goog.i18n because it contains so many modules that it causes
|
|
||||||
# the generated regular expression to exceed Python's limits
|
|
||||||
if zi.filename.startswith('closure/goog/i18n/'):
|
|
||||||
continue
|
|
||||||
for line in zf.open(zi):
|
|
||||||
m = re.match(r'goog.provide\(\'(.*)\'\);', line)
|
|
||||||
if m:
|
|
||||||
all_provides.add(m.group(1))
|
|
||||||
for filename in sorted(t.dependencies):
|
|
||||||
if filename == 'build/src/internal/src/requireall.js':
|
|
||||||
continue
|
|
||||||
require_linenos = {}
|
|
||||||
uses = set()
|
|
||||||
lines = open(filename).readlines()
|
|
||||||
for lineno, line in _strip_comments(lines):
|
|
||||||
m = re.match(r'goog.provide\(\'(.*)\'\);', line)
|
|
||||||
if m:
|
|
||||||
all_provides.add(m.group(1))
|
|
||||||
continue
|
|
||||||
m = re.match(r'goog.require\(\'(.*)\'\);', line)
|
|
||||||
if m:
|
|
||||||
require_linenos[m.group(1)] = lineno
|
|
||||||
continue
|
|
||||||
ignore_linenos = require_linenos.values()
|
|
||||||
for lineno, line in enumerate(lines):
|
|
||||||
if lineno in ignore_linenos:
|
|
||||||
continue
|
|
||||||
for require in require_linenos.iterkeys():
|
|
||||||
if require in line:
|
|
||||||
uses.add(require)
|
|
||||||
for require in sorted(set(require_linenos.keys()) - uses):
|
|
||||||
t.info('%s:%d: unused goog.require: %r' % (
|
|
||||||
filename, require_linenos[require], require))
|
|
||||||
unused_count += 1
|
|
||||||
all_provides.discard('ol')
|
|
||||||
all_provides.discard('ol.MapProperty')
|
|
||||||
|
|
||||||
class Node(object):
|
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
self.present = False
|
|
||||||
self.children = {}
|
|
||||||
|
|
||||||
def _build_re(self, key):
|
|
||||||
if key == '*':
|
|
||||||
assert len(self.children) == 0
|
|
||||||
# We want to match `.doIt` but not `.SomeClass` or `.more.stuff`
|
|
||||||
return '(?=\\.[a-z]\\w*\\b(?!\\.))'
|
|
||||||
elif len(self.children) == 1:
|
|
||||||
child_key, child = next(self.children.iteritems())
|
|
||||||
child_re = child._build_re(child_key)
|
|
||||||
if child_key != '*':
|
|
||||||
child_re = '\\.' + child_re
|
|
||||||
if self.present:
|
|
||||||
return key + '(' + child_re + ')?'
|
|
||||||
else:
|
|
||||||
return key + child_re
|
|
||||||
elif self.children:
|
|
||||||
children_re = '(?:' + '|'.join(
|
|
||||||
('\\.' if k != '*' else '') + self.children[k]._build_re(k)
|
|
||||||
for k in sorted(self.children.keys())) + ')'
|
|
||||||
if self.present:
|
|
||||||
return key + children_re + '?'
|
|
||||||
else:
|
|
||||||
return key + children_re
|
|
||||||
else:
|
|
||||||
assert self.present
|
|
||||||
return key
|
|
||||||
|
|
||||||
def build_re(self, key):
|
|
||||||
return re.compile('\\b' + self._build_re(key) + '\\b')
|
|
||||||
root = Node()
|
|
||||||
for provide in all_provides:
|
|
||||||
node = root
|
|
||||||
for component in provide.split('.'):
|
|
||||||
if component not in node.children:
|
|
||||||
node.children[component] = Node()
|
|
||||||
node = node.children[component]
|
|
||||||
if component[0].islower():
|
|
||||||
# We've arrived at a namespace provide like `ol.foo`.
|
|
||||||
# In this case, we want to match uses like `ol.foo.doIt()` but
|
|
||||||
# not match things like `new ol.foo.SomeClass()`.
|
|
||||||
# For this purpose, we use the special wildcard key for the child.
|
|
||||||
node.children['*'] = Node()
|
|
||||||
else:
|
|
||||||
node.present = True
|
|
||||||
provide_res = [child.build_re(key)
|
|
||||||
for key, child in root.children.iteritems()]
|
|
||||||
missing_count = 0
|
|
||||||
for filename in sorted(t.dependencies):
|
|
||||||
if filename in INTERNAL_SRC or filename in EXTERNAL_SRC:
|
|
||||||
continue
|
|
||||||
provides = set()
|
|
||||||
requires = set()
|
|
||||||
uses = set()
|
|
||||||
uses_linenos = {}
|
|
||||||
for lineno, line in _strip_comments(open(filename)):
|
|
||||||
m = re.match(r'goog.provide\(\'(.*)\'\);', line)
|
|
||||||
if m:
|
|
||||||
provides.add(m.group(1))
|
|
||||||
continue
|
|
||||||
m = re.match(r'goog.require\(\'(.*)\'\);', line)
|
|
||||||
if m:
|
|
||||||
requires.add(m.group(1))
|
|
||||||
continue
|
|
||||||
while True:
|
|
||||||
for provide_re in provide_res:
|
|
||||||
m = provide_re.search(line)
|
|
||||||
if m:
|
|
||||||
uses.add(m.group())
|
|
||||||
uses_linenos[m.group()] = lineno
|
|
||||||
line = line[:m.start()] + line[m.end():]
|
|
||||||
break
|
|
||||||
else:
|
|
||||||
break
|
|
||||||
if filename == 'src/ol/renderer/layerrenderer.js':
|
|
||||||
uses.discard('ol.renderer.Map')
|
|
||||||
m = re.match(
|
|
||||||
r'src/ol/renderer/(\w+)/\1(\w*)layerrenderer\.js\Z', filename)
|
|
||||||
if m:
|
|
||||||
uses.discard('ol.renderer.Map')
|
|
||||||
uses.discard('ol.renderer.%s.Map' % (m.group(1),))
|
|
||||||
missing_requires = uses - requires - provides
|
|
||||||
if missing_requires:
|
|
||||||
for missing_require in sorted(missing_requires):
|
|
||||||
t.info("%s:%d missing goog.require('%s')" %
|
|
||||||
(filename, uses_linenos[missing_require], missing_require))
|
|
||||||
missing_count += 1
|
|
||||||
if unused_count or missing_count:
|
|
||||||
t.error('%d unused goog.requires, %d missing goog.requires' %
|
|
||||||
(unused_count, missing_count))
|
|
||||||
t.touch()
|
|
||||||
|
|
||||||
|
|
||||||
@target('build/check-whitespace-timestamp', SRC, INTERNAL_SRC, EXTERNAL_SRC,
|
|
||||||
EXAMPLES_SRC, SPEC, EXPORTS, JSDOC_SRC,
|
|
||||||
precious=True)
|
|
||||||
def build_check_whitespace_timestamp(t):
|
|
||||||
CR_RE = re.compile(r'\r')
|
|
||||||
TRAILING_WHITESPACE_RE = re.compile(r'\s+\n\Z')
|
|
||||||
NO_NEWLINE_RE = re.compile(r'[^\n]\Z')
|
|
||||||
ALL_WHITESPACE_RE = re.compile(r'\s+\Z')
|
|
||||||
errors = 0
|
|
||||||
for filename in sorted(t.newer(t.dependencies)):
|
|
||||||
whitespace = False
|
|
||||||
for lineno, line in enumerate(open(filename)):
|
|
||||||
if CR_RE.search(line):
|
|
||||||
t.info('%s:%d: carriage return character in line', filename, lineno + 1)
|
|
||||||
errors += 1
|
|
||||||
if TRAILING_WHITESPACE_RE.search(line):
|
|
||||||
t.info('%s:%d: trailing whitespace', filename, lineno + 1)
|
|
||||||
errors += 1
|
|
||||||
if NO_NEWLINE_RE.search(line):
|
|
||||||
t.info('%s:%d: no newline at end of file', filename, lineno + 1)
|
|
||||||
errors += 1
|
|
||||||
whitespace = ALL_WHITESPACE_RE.match(line)
|
|
||||||
if whitespace:
|
|
||||||
t.info('%s: trailing whitespace at end of file', filename)
|
|
||||||
errors += 1
|
|
||||||
if errors:
|
|
||||||
t.error('%d whitespace errors' % (errors,))
|
|
||||||
t.touch()
|
|
||||||
|
|
||||||
|
|
||||||
virtual('plovr', PLOVR_JAR)
|
|
||||||
|
|
||||||
|
|
||||||
@target(PLOVR_JAR, clean=False)
|
|
||||||
def plovr_jar(t):
|
|
||||||
t.info('downloading %r', t.name)
|
|
||||||
t.download('https://plovr.googlecode.com/files/' +
|
|
||||||
os.path.basename(PLOVR_JAR), md5=PLOVR_JAR_MD5)
|
|
||||||
t.info('downloaded %r', t.name)
|
|
||||||
|
|
||||||
|
|
||||||
virtual('apidoc', 'build/jsdoc-%(BRANCH)s-timestamp' % vars(variables))
|
|
||||||
|
|
||||||
|
|
||||||
@target('build/jsdoc-%(BRANCH)s-timestamp' % vars(variables), 'host-resources',
|
|
||||||
'build/src/external/src/exports.js', 'build/src/external/src/types.js',
|
|
||||||
SRC, SHADER_SRC, ifind('apidoc/template'))
|
|
||||||
def jsdoc_BRANCH_timestamp(t):
|
|
||||||
t.run('%(JSDOC)s', '-c', 'apidoc/conf.json', 'src', 'apidoc/index.md',
|
|
||||||
'-d', 'build/hosted/%(BRANCH)s/apidoc')
|
|
||||||
t.touch()
|
|
||||||
|
|
||||||
|
|
||||||
def split_example_file(example, dst_dir):
|
|
||||||
lines = open(example).readlines()
|
|
||||||
|
|
||||||
target_lines = []
|
|
||||||
target_require_lines = []
|
|
||||||
|
|
||||||
found_requires = False
|
|
||||||
found_code = False
|
|
||||||
for line in lines:
|
|
||||||
m = re.match(r'goog.require\(\'(.*)\'\);', line)
|
|
||||||
if m:
|
|
||||||
found_requires = True
|
|
||||||
target_require_lines.append(line)
|
|
||||||
elif found_requires:
|
|
||||||
if found_code or line not in ('\n', '\r\n'):
|
|
||||||
found_code = True
|
|
||||||
target_lines.append(line)
|
|
||||||
|
|
||||||
target = open(
|
|
||||||
os.path.join(dst_dir, os.path.basename(example)), 'w')
|
|
||||||
target_require = open(
|
|
||||||
os.path.join(dst_dir, os.path.basename(example)
|
|
||||||
.replace('.js', '-require.js')),
|
|
||||||
'w')
|
|
||||||
|
|
||||||
target.writelines(target_lines)
|
|
||||||
target.close()
|
|
||||||
|
|
||||||
target_require.writelines(target_require_lines)
|
|
||||||
target_require.close()
|
|
||||||
|
|
||||||
|
|
||||||
@target('host-resources', phony=True)
|
|
||||||
def host_resources(t):
|
|
||||||
resources_dir = 'build/hosted/%(BRANCH)s/resources'
|
|
||||||
t.rm_rf(resources_dir)
|
|
||||||
t.cp_r('resources', resources_dir)
|
|
||||||
|
|
||||||
|
|
||||||
@target('host-examples', 'build', 'host-resources', 'examples', phony=True)
|
|
||||||
def host_examples(t):
|
|
||||||
examples_dir = 'build/hosted/%(BRANCH)s/examples'
|
|
||||||
build_dir = 'build/hosted/%(BRANCH)s/build'
|
|
||||||
t.rm_rf(examples_dir)
|
|
||||||
t.makedirs(examples_dir)
|
|
||||||
t.rm_rf(build_dir)
|
|
||||||
t.makedirs(build_dir)
|
|
||||||
t.cp(EXAMPLES, examples_dir)
|
|
||||||
for example in [path.replace('.html', '.js') for path in EXAMPLES]:
|
|
||||||
split_example_file(example, examples_dir % vars(variables))
|
|
||||||
t.cp_r('examples/data', examples_dir + '/data')
|
|
||||||
t.cp('bin/loader_hosted_examples.js', examples_dir + '/loader.js')
|
|
||||||
t.cp('build/ol.js', 'build/ol-simple.js', 'build/ol-whitespace.js',
|
|
||||||
'build/ol.css', build_dir)
|
|
||||||
t.cp('examples/index.html', 'examples/example-list.js',
|
|
||||||
'examples/example-list.xml', 'examples/Jugl.js',
|
|
||||||
'examples/jquery.min.js', examples_dir)
|
|
||||||
t.rm_rf('build/hosted/%(BRANCH)s/closure-library')
|
|
||||||
t.makedirs('build/hosted/%(BRANCH)s/closure-library')
|
|
||||||
with t.chdir('build/hosted/%(BRANCH)s/closure-library'):
|
|
||||||
t.run('%(JAR)s', 'xf', '../../../../' + PLOVR_JAR, 'closure')
|
|
||||||
t.run('%(JAR)s', 'xf', '../../../../' + PLOVR_JAR, 'third_party')
|
|
||||||
t.rm_rf('build/hosted/%(BRANCH)s/ol')
|
|
||||||
t.makedirs('build/hosted/%(BRANCH)s/ol')
|
|
||||||
t.cp_r('src/ol', 'build/hosted/%(BRANCH)s/ol/ol')
|
|
||||||
t.run('%(PYTHON)s', 'bin/closure/depswriter.py',
|
|
||||||
'--root_with_prefix', 'src ../../../ol',
|
|
||||||
'--root', 'build/hosted/%(BRANCH)s/closure-library/closure/goog',
|
|
||||||
'--root_with_prefix', 'build/hosted/%(BRANCH)s/closure-library/'
|
|
||||||
'third_party ../../third_party',
|
|
||||||
'--output_file', 'build/hosted/%(BRANCH)s/build/ol-deps.js')
|
|
||||||
|
|
||||||
|
|
||||||
@target('check-examples', 'host-examples', phony=True)
|
|
||||||
def check_examples(t):
|
|
||||||
examples = ['build/hosted/%(BRANCH)s/' + e for e in EXAMPLES]
|
|
||||||
all_examples = \
|
|
||||||
[e + '?mode=advanced' for e in examples]
|
|
||||||
for example in all_examples:
|
|
||||||
t.run('%(PHANTOMJS)s', 'bin/check-example.js', example)
|
|
||||||
|
|
||||||
|
|
||||||
@target(PROJ4JS, PROJ4JS_ZIP)
|
|
||||||
def proj4js(t):
|
|
||||||
from zipfile import ZipFile
|
|
||||||
zf = ZipFile(PROJ4JS_ZIP)
|
|
||||||
contents = zf.open('proj4js/lib/proj4js-combined.js').read()
|
|
||||||
with open(t.name, 'wb') as f:
|
|
||||||
f.write(contents)
|
|
||||||
|
|
||||||
|
|
||||||
@target(PROJ4JS_ZIP, clean=False)
|
|
||||||
def proj4js_zip(t):
|
|
||||||
t.info('downloading %r', t.name)
|
|
||||||
t.download('http://download.osgeo.org/proj4js/' +
|
|
||||||
os.path.basename(t.name), md5=PROJ4JS_ZIP_MD5)
|
|
||||||
t.info('downloaded %r', t.name)
|
|
||||||
|
|
||||||
|
|
||||||
virtual('test-deps', INTERNAL_SRC, PROJ4JS, 'build/test/requireall.js')
|
|
||||||
|
|
||||||
|
|
||||||
@target('test', 'test-deps', phony=True)
|
|
||||||
def test(t):
|
|
||||||
t.run('%(PHANTOMJS)s', 'test/mocha-phantomjs.js', 'test/ol.html')
|
|
||||||
|
|
||||||
|
|
||||||
@target('fixme', phony=True)
|
|
||||||
def find_fixme(t):
|
|
||||||
regex = re.compile('FIXME|TODO')
|
|
||||||
matches = dict()
|
|
||||||
totalcount = 0
|
|
||||||
for filename in SRC:
|
|
||||||
f = open(filename, 'r')
|
|
||||||
for lineno, line in enumerate(f):
|
|
||||||
if regex.search(line):
|
|
||||||
if (filename not in matches):
|
|
||||||
matches[filename] = list()
|
|
||||||
matches[filename].append('#%-10d %s' % (
|
|
||||||
lineno + 1, line.strip()))
|
|
||||||
totalcount += 1
|
|
||||||
f.close()
|
|
||||||
|
|
||||||
for filename in matches:
|
|
||||||
num_matches = len(matches[filename])
|
|
||||||
noun = 'matches' if num_matches > 1 else 'match'
|
|
||||||
print ' %s has %d %s:' % (filename, num_matches, noun)
|
|
||||||
for match in matches[filename]:
|
|
||||||
print ' %s' % (match,)
|
|
||||||
print
|
|
||||||
print 'A total of %d TODO/FIXME(s) were found' % (totalcount,)
|
|
||||||
|
|
||||||
|
|
||||||
@target('reallyclean')
|
|
||||||
def reallyclean(t):
|
|
||||||
"""Removes untracked files and folders from previous builds."""
|
|
||||||
# -X => only clean up files that are usually ignored e.g.
|
|
||||||
# through .gitignore
|
|
||||||
# -d => also consider directories for deletion
|
|
||||||
# -f => if git configuration variable clean.requireForce != false,
|
|
||||||
# git clean will refuse to run unless given -f or -n.
|
|
||||||
t.run('%(GIT)s', 'clean', '-X', '-d', '-f', '.')
|
|
||||||
|
|
||||||
|
|
||||||
@target('checkdeps')
|
|
||||||
def check_dependencies(t):
|
|
||||||
for exe in EXECUTABLES:
|
|
||||||
status = 'present' if which(exe) else 'MISSING'
|
|
||||||
print 'Program "%s" seems to be %s.' % (exe, status)
|
|
||||||
print 'For certain targets all above programs need to be present.'
|
|
||||||
|
|
||||||
|
|
||||||
@target('help')
|
|
||||||
def display_help(t):
|
|
||||||
print '''
|
|
||||||
build.py - The OpenLayers 3 build script.
|
|
||||||
|
|
||||||
Usage:
|
|
||||||
./build.py [options] [target] (on Unix-based machines)
|
|
||||||
<python-executable.exe> build.py [options] [target] (on Windows machines)
|
|
||||||
|
|
||||||
There is one option:
|
|
||||||
-c - Cleans up the repository from previous builds.
|
|
||||||
|
|
||||||
The most common targets are:
|
|
||||||
serve - Serves files through plovr, usually on port 9810.
|
|
||||||
lint - Runs gjslint on all sourcefiles to enforce specific syntax.
|
|
||||||
build - Builds singlefile versions of OpenLayers JavaScript and
|
|
||||||
CSS. This is also the default build target which runs when
|
|
||||||
no target is specified.
|
|
||||||
test - Runs the testsuite and displays the results.
|
|
||||||
check - Runs the lint-target, builds some OpenLayers files, and
|
|
||||||
then runs test. Many developers call this target often
|
|
||||||
while working on the code.
|
|
||||||
help - Shows this help.
|
|
||||||
|
|
||||||
Other less frequently used targets are:
|
|
||||||
apidoc - Builds the API-Documentation using JSDoc3.
|
|
||||||
integration-test - Builds all examples in various modes and usually tales a
|
|
||||||
long time to finish. This target calls the following
|
|
||||||
targets: lint, build, build-all, test, build-examples,
|
|
||||||
check-examples and apidoc.
|
|
||||||
reallyclean - Remove untracked files from the repository.
|
|
||||||
checkdeps - Checks whether all required development software is
|
|
||||||
installed on your machine.
|
|
||||||
fixme - Will print a list of parts of the code that are marked
|
|
||||||
with either TODO or FIXME.
|
|
||||||
todo - is an alias for the fixme-target
|
|
||||||
plovr - Fetches the required plovr.jar. Usually called by other
|
|
||||||
targets that depend on plovr.
|
|
||||||
|
|
||||||
If no target is given, the build-target will be executed.
|
|
||||||
|
|
||||||
The above list is not complete, please see the sourceode for not-mentioned and
|
|
||||||
only seldomly called targets.
|
|
||||||
'''
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
||||||
14
build/README.txt
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
## HowTo: Build & deploy "Shrunk" Single File Library version of OpenLayers ##
|
||||||
|
|
||||||
|
* Build:
|
||||||
|
|
||||||
|
cd build
|
||||||
|
./build.sh
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
* Upload the result to the server: e.g.
|
||||||
|
|
||||||
|
scp build/OpenLayers.js openlayers@openlayers.org:openlayers.org/htdocs/code/
|
||||||
|
|
||||||
|
|
||||||
44
build/build.sh
Executable file
@@ -0,0 +1,44 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Script to build compressed single file version of OpenLayers library
|
||||||
|
#
|
||||||
|
|
||||||
|
OUTPUT_FILENAME=OpenLayers.js
|
||||||
|
TMP_OUTPUT_FILENAME=tmp.${OUTPUT_FILENAME}
|
||||||
|
|
||||||
|
TOOLS_DIR=../tools
|
||||||
|
|
||||||
|
if [ "$1" != "" ]; then
|
||||||
|
CFG_FILENAME="$1.cfg"
|
||||||
|
else
|
||||||
|
CFG_FILENAME=library.cfg
|
||||||
|
fi
|
||||||
|
|
||||||
|
SRC_DIR=../lib
|
||||||
|
|
||||||
|
CMD_MERGE_JS=${TOOLS_DIR}/mergejs.py
|
||||||
|
|
||||||
|
CMD_SHRINKSAFE=${TOOLS_DIR}/shrinksafe.py
|
||||||
|
CMD_JSMIN=${TOOLS_DIR}/jsmin.py
|
||||||
|
|
||||||
|
LICENSE_HEADER_FILENAME=license.txt
|
||||||
|
|
||||||
|
|
||||||
|
## Generate "fat" single file library version
|
||||||
|
${CMD_MERGE_JS} -c ${CFG_FILENAME} ${TMP_OUTPUT_FILENAME} ${SRC_DIR}
|
||||||
|
|
||||||
|
|
||||||
|
## Compress ("shrink") the single file library version
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo Shrinking and post-processing...
|
||||||
|
# (We also append the license header here.)
|
||||||
|
cat ${LICENSE_HEADER_FILENAME} > ${OUTPUT_FILENAME}
|
||||||
|
${CMD_JSMIN} <${TMP_OUTPUT_FILENAME} >> ${OUTPUT_FILENAME}
|
||||||
|
|
||||||
|
echo Cleaning up...
|
||||||
|
rm $TMP_OUTPUT_FILENAME
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo Done.
|
||||||
39
build/docs.sh
Executable file
@@ -0,0 +1,39 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
rm ../doc/reference.html
|
||||||
|
CLASSES="Map Layer Layer.Image Layer.HTTPRequest Layer.Grid Layer.WMS Layer.KaMap Layer.EventPane Layer.Google Layer.VirtualEarth Layer.Markers Layer.Text Layer.GeoRSS Layer.Boxes Icon Marker Marker.Box Tile Tile.Image Tile.WFS Control Control.LayerSwitcher Control.MouseDefaults Control.MousePosition Control.MouseToolbar Control.OverviewMap Control.PanZoom Control.PanZoomBar Control.Permalink Control.Scale LonLat Size Pixel Bounds Util Ajax"
|
||||||
|
echo "<html>
|
||||||
|
<head>
|
||||||
|
<title>OpenLayers Class Reference Documentation</title>
|
||||||
|
<style type='text/css'>
|
||||||
|
.type { background-color: #ddd }
|
||||||
|
td { border: black solid 1px; padding: 3px; }
|
||||||
|
table { border-collapse: collapse; margin: 5px 10px; }
|
||||||
|
.classref { margin-left: 20px; }
|
||||||
|
div.index { float:left; width: 300px; }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>" >> ../doc/reference.html
|
||||||
|
|
||||||
|
for i in $CLASSES; do
|
||||||
|
echo "<div class='index'><a href='#OpenLayers.$i'>OpenLayers.$i</a></div>" >> ../doc/reference.html
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "<br style='clear:both' />" >> ../doc/reference.html
|
||||||
|
|
||||||
|
for i in $CLASSES; do
|
||||||
|
cat ../doc/$i.txt | \
|
||||||
|
perl -pe 's!^(.*?) -- (.*?) -- (.*?)$! <tr><td>$1</td><td>$2</td><td>$3</td></tr>!g;
|
||||||
|
s!^( \* )?(.*?) -- (.*?)$! <tr><td>$2</td><td>$3</td></tr>!g;
|
||||||
|
s!^ \* (.*)$! </table>\n\n<h3>$1</h3>\n <table>!;
|
||||||
|
s!{OpenLayers.(.*?)\|(.*?)}!<a href="#OpenLayers.$1" title="OpenLayers.$1">\2</a>!g;
|
||||||
|
s!{OpenLayers.(.*?)}!<a href="#OpenLayers.$1" title="OpenLayers.$1">OpenLayers.$1</a>!;
|
||||||
|
s!{([A-Za-z]+?)\|(.+?)}!<span class="type" title="$1">\2<\/span>!g;
|
||||||
|
s!{([A-Za-z]+?)}!<span class="type" title="$1">$1<\/span>!g;
|
||||||
|
s!^\* (.*)$!</table>\n<h2>$1</h2>\n<table>!;
|
||||||
|
s!^OpenLayers\.(.*)$!<h1><a name="OpenLayers.$1">OpenLayers.$1</a></h1><div class="classref">!' \
|
||||||
|
>> ../doc/reference.html
|
||||||
|
echo '</table></div>' >> ../doc/reference.html
|
||||||
|
done
|
||||||
|
echo " </body>
|
||||||
|
</html>" >> ../doc/reference.html
|
||||||
13
build/library.cfg
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
[first]
|
||||||
|
OpenLayers/SingleFile.js
|
||||||
|
OpenLayers.js
|
||||||
|
OpenLayers/BaseTypes.js
|
||||||
|
OpenLayers/Util.js
|
||||||
|
Rico/Corner.js
|
||||||
|
|
||||||
|
[last]
|
||||||
|
|
||||||
|
[include]
|
||||||
|
|
||||||
|
[exclude]
|
||||||
|
OpenLayers/Control/KeyboardDefaults.js
|
||||||
45
build/license.txt
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
OpenLayers.js -- OpenLayers Map Viewer Library
|
||||||
|
|
||||||
|
Copyright 2005-2006 MetaCarta, Inc., released under a modified BSD license.
|
||||||
|
Please see http://svn.openlayers.org/trunk/openlayers/release-license.txt
|
||||||
|
for the full text of the license.
|
||||||
|
|
||||||
|
Includes compressed code under the following licenses:
|
||||||
|
|
||||||
|
(For uncompressed versions of the code used please see the
|
||||||
|
OpenLayers SVN repository: <http://openlayers.org/>)
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Contains portions of Prototype.js:
|
||||||
|
*
|
||||||
|
* Prototype JavaScript framework, version 1.4.0
|
||||||
|
* (c) 2005 Sam Stephenson <sam@conio.net>
|
||||||
|
*
|
||||||
|
* Prototype is freely distributable under the terms of an MIT-style license.
|
||||||
|
* For details, see the Prototype web site: http://prototype.conio.net/
|
||||||
|
*
|
||||||
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Contains portions of Rico <http://openrico.org/>
|
||||||
|
*
|
||||||
|
* Copyright 2005 Sabre Airline Solutions
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you
|
||||||
|
* may not use this file except in compliance with the License. You
|
||||||
|
* may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
* implied. See the License for the specific language governing
|
||||||
|
* permissions and limitations under the License.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
20
build/lite.cfg
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
[first]
|
||||||
|
OpenLayers/SingleFile.js
|
||||||
|
OpenLayers.js
|
||||||
|
OpenLayers/BaseTypes.js
|
||||||
|
OpenLayers/Util.js
|
||||||
|
|
||||||
|
[last]
|
||||||
|
|
||||||
|
[include]
|
||||||
|
OpenLayers/Events.js
|
||||||
|
OpenLayers/Map.js
|
||||||
|
OpenLayers/Layer.js
|
||||||
|
OpenLayers/Layer/Grid.js
|
||||||
|
OpenLayers/Layer/HTTPRequest.js
|
||||||
|
OpenLayers/Layer/WMS.js
|
||||||
|
OpenLayers/Layer/WMS/Untiled.js
|
||||||
|
OpenLayers/Tile.js
|
||||||
|
OpenLayers/Tile/Image.js
|
||||||
|
|
||||||
|
[exclude]
|
||||||
@@ -1,107 +0,0 @@
|
|||||||
{
|
|
||||||
|
|
||||||
"ambiguate-properties": true,
|
|
||||||
|
|
||||||
"checks": {
|
|
||||||
"accessControls": "ERROR",
|
|
||||||
"ambiguousFunctionDecl": "ERROR",
|
|
||||||
"checkDebuggerStatement": "WARNING",
|
|
||||||
"checkRegExp": "ERROR",
|
|
||||||
"checkTypes": "ERROR",
|
|
||||||
"checkVars": "ERROR",
|
|
||||||
"const": "ERROR",
|
|
||||||
"constantProperty": "ERROR",
|
|
||||||
"deprecated": "ERROR",
|
|
||||||
"duplicate": "ERROR",
|
|
||||||
"duplicateMessage": "ERROR",
|
|
||||||
"es5Strict": "ERROR",
|
|
||||||
"externsValidation": "ERROR",
|
|
||||||
"fileoverviewTags": "ERROR",
|
|
||||||
"globalThis": "ERROR",
|
|
||||||
"internetExplorerChecks": "ERROR",
|
|
||||||
"invalidCasts": "ERROR",
|
|
||||||
"missingProperties": "ERROR",
|
|
||||||
"nonStandardJsDocs": "ERROR",
|
|
||||||
"strictModuleDepCheck": "ERROR",
|
|
||||||
"typeInvalidation": "ERROR",
|
|
||||||
"undefinedNames": "ERROR",
|
|
||||||
"undefinedVars": "ERROR",
|
|
||||||
"unknownDefines": "ERROR",
|
|
||||||
"uselessCode": "ERROR",
|
|
||||||
"visibility": "ERROR"
|
|
||||||
},
|
|
||||||
|
|
||||||
"define": {
|
|
||||||
"goog.dom.ASSUME_STANDARDS_MODE": true,
|
|
||||||
"goog.DEBUG": false
|
|
||||||
},
|
|
||||||
|
|
||||||
"disambiguate-properties": true,
|
|
||||||
|
|
||||||
"externs": [
|
|
||||||
"//json.js",
|
|
||||||
"../externs/bingmaps.js",
|
|
||||||
"../externs/geojson.js",
|
|
||||||
"../externs/topojson.js",
|
|
||||||
"../externs/oli.js",
|
|
||||||
"../externs/proj4js.js",
|
|
||||||
"../externs/tilejson.js",
|
|
||||||
"../externs/closure-compiler.js"
|
|
||||||
],
|
|
||||||
|
|
||||||
"level": "VERBOSE",
|
|
||||||
|
|
||||||
"mode": "ADVANCED",
|
|
||||||
|
|
||||||
"name-suffixes-to-strip": [
|
|
||||||
"logger",
|
|
||||||
"logger_"
|
|
||||||
],
|
|
||||||
|
|
||||||
"paths": [
|
|
||||||
"../build/src/internal/src",
|
|
||||||
"../src"
|
|
||||||
],
|
|
||||||
|
|
||||||
"treat-warnings-as-errors": false,
|
|
||||||
|
|
||||||
"type-prefixes-to-strip": [
|
|
||||||
"goog.asserts",
|
|
||||||
"goog.debug.Console",
|
|
||||||
"goog.debug.DebugWindow",
|
|
||||||
"goog.debug.DevCss",
|
|
||||||
"goog.debug.DivConsole",
|
|
||||||
"goog.debug.EntryPointMonitor",
|
|
||||||
"goog.debug.ErrorHandler",
|
|
||||||
"goog.debug.ErrorReporter",
|
|
||||||
"goog.debug.FancyWindow",
|
|
||||||
"goog.debug.Formatter",
|
|
||||||
"goog.debug.FpsDisplay",
|
|
||||||
"goog.debug.GcDiagnostics",
|
|
||||||
"goog.debug.HtmlFormatter",
|
|
||||||
"goog.debug.LogBuffer",
|
|
||||||
"goog.debug.LogManager",
|
|
||||||
"goog.debug.LogRecord",
|
|
||||||
"goog.debug.Logger",
|
|
||||||
"goog.debug.RelativeTimeProvider",
|
|
||||||
"goog.debug.TextFormatter",
|
|
||||||
"goog.debug.Trace",
|
|
||||||
"goog.debug.catchErrors",
|
|
||||||
"goog.debug.deepExpose",
|
|
||||||
"goog.debug.enhanceError",
|
|
||||||
"goog.debug.entryPointRegistry",
|
|
||||||
"goog.debug.errorHandlerWeakDep",
|
|
||||||
"goog.debug.expose",
|
|
||||||
"goog.debug.exposeArray",
|
|
||||||
"goog.debug.exposeException",
|
|
||||||
"goog.debug.getFunctionName",
|
|
||||||
"goog.debug.getStacktrace",
|
|
||||||
"goog.debug.getStacktraceSimple",
|
|
||||||
"goog.debug.logRecordSerializer",
|
|
||||||
"goog.debug.makeWhitespaceVisible",
|
|
||||||
"goog.debug.normalizeErrorObject",
|
|
||||||
"goog.debug.reflect",
|
|
||||||
"goog.log"
|
|
||||||
]
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
{
|
|
||||||
|
|
||||||
"id": "ol-all",
|
|
||||||
|
|
||||||
"externs": [
|
|
||||||
"//json.js",
|
|
||||||
"../build/src/external/externs/types.js",
|
|
||||||
"../externs/bingmaps.js",
|
|
||||||
"../externs/geojson.js",
|
|
||||||
"../externs/topojson.js",
|
|
||||||
"../externs/oli.js",
|
|
||||||
"../externs/proj4js.js",
|
|
||||||
"../externs/tilejson.js",
|
|
||||||
"../externs/closure-compiler.js"
|
|
||||||
],
|
|
||||||
|
|
||||||
"inherits": "base.json",
|
|
||||||
|
|
||||||
"inputs": [
|
|
||||||
"../build/src/internal/src/requireall.js",
|
|
||||||
"../build/src/internal/src/types.js",
|
|
||||||
"../build/src/external/src/exports.js"
|
|
||||||
]
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
{
|
|
||||||
|
|
||||||
// If ambiguate-properties and disambiguate-properties are set to true
|
|
||||||
// we get function names like "ol_control_Control_prototype$setMap" in
|
|
||||||
// the compiled code when using the SIMPLE compilation. It looks like
|
|
||||||
// "ambiguate-properties" and "disambiguate-properties" are only
|
|
||||||
// appropriate for ADVANCED compilation.
|
|
||||||
|
|
||||||
"ambiguate-properties": false,
|
|
||||||
|
|
||||||
"disambiguate-properties": false,
|
|
||||||
|
|
||||||
"id": "ol-simple",
|
|
||||||
|
|
||||||
"externs": [
|
|
||||||
"//json.js",
|
|
||||||
"../externs/bingmaps.js",
|
|
||||||
"../externs/geojson.js",
|
|
||||||
"../externs/topojson.js",
|
|
||||||
"../externs/oli.js",
|
|
||||||
"../externs/proj4js.js",
|
|
||||||
"../externs/tilejson.js",
|
|
||||||
"../externs/closure-compiler.js"
|
|
||||||
],
|
|
||||||
|
|
||||||
"inherits": "ol.json",
|
|
||||||
|
|
||||||
"inputs": [
|
|
||||||
"../build/src/internal/src/requireall.js",
|
|
||||||
"../build/src/internal/src/types.js"
|
|
||||||
],
|
|
||||||
|
|
||||||
"mode": "SIMPLE",
|
|
||||||
|
|
||||||
// Note: we can't have a (function(){%output%})() output wrapper with
|
|
||||||
// WHITESPACE and SIMPLE modes. See this link for explanations:
|
|
||||||
// https://groups.google.com/forum/#!topic/plovr/gQyZEa2NpsU
|
|
||||||
"output-wrapper": "%output%"
|
|
||||||
}
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
{
|
|
||||||
|
|
||||||
"id": "ol-whitespace",
|
|
||||||
|
|
||||||
// If ambiguate-properties and disambiguate-properties are set to true
|
|
||||||
// we get function names like "ol_control_Control_prototype$setMap" in
|
|
||||||
// the compiled code when using the SIMPLE compilation. It looks like
|
|
||||||
// "ambiguate-properties" and "disambiguate-properties" are only
|
|
||||||
// appropriate for ADVANCED compilation. To be sure we also don't
|
|
||||||
// set them for WHITESPACE.
|
|
||||||
|
|
||||||
"ambiguate-properties": false,
|
|
||||||
|
|
||||||
"disambiguate-properties": false,
|
|
||||||
|
|
||||||
"externs": [
|
|
||||||
"//json.js",
|
|
||||||
"../externs/bingmaps.js",
|
|
||||||
"../externs/geojson.js",
|
|
||||||
"../externs/topojson.js",
|
|
||||||
"../externs/oli.js",
|
|
||||||
"../externs/proj4js.js",
|
|
||||||
"../externs/tilejson.js",
|
|
||||||
"../externs/closure-compiler.js"
|
|
||||||
],
|
|
||||||
|
|
||||||
"inherits": "ol.json",
|
|
||||||
|
|
||||||
"inputs": [
|
|
||||||
"../build/src/internal/src/requireall.js",
|
|
||||||
"../build/src/internal/src/types.js"
|
|
||||||
],
|
|
||||||
|
|
||||||
"mode": "WHITESPACE",
|
|
||||||
|
|
||||||
// Note: we can't have a (function(){%output%})() output wrapper with
|
|
||||||
// WHITESPACE and SIMPLE modes. See this link for explanations:
|
|
||||||
// https://groups.google.com/forum/#!topic/plovr/gQyZEa2NpsU
|
|
||||||
"output-wrapper": "%output%",
|
|
||||||
|
|
||||||
"pretty-print": true
|
|
||||||
}
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
{
|
|
||||||
|
|
||||||
"id": "ol",
|
|
||||||
|
|
||||||
"css-allowed-unrecognized-properties": [
|
|
||||||
"user-select"
|
|
||||||
],
|
|
||||||
|
|
||||||
"css-inputs": [
|
|
||||||
"../css/ol.css"
|
|
||||||
],
|
|
||||||
|
|
||||||
"css-output-file": "../build/ol.css",
|
|
||||||
|
|
||||||
"externs": [
|
|
||||||
"//json.js",
|
|
||||||
"../build/src/external/externs/types.js",
|
|
||||||
"../externs/bingmaps.js",
|
|
||||||
"../externs/geojson.js",
|
|
||||||
"../externs/topojson.js",
|
|
||||||
"../externs/oli.js",
|
|
||||||
"../externs/proj4js.js",
|
|
||||||
"../externs/tilejson.js",
|
|
||||||
"../externs/closure-compiler.js"
|
|
||||||
],
|
|
||||||
|
|
||||||
"inherits": "base.json",
|
|
||||||
|
|
||||||
"inputs": [
|
|
||||||
"../build/src/external/src/exports.js",
|
|
||||||
"../build/src/external/src/types.js"
|
|
||||||
],
|
|
||||||
|
|
||||||
"output-wrapper": "(function(){%output%})();",
|
|
||||||
|
|
||||||
"paths": [
|
|
||||||
"../src"
|
|
||||||
]
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
|
|
||||||
"id": "test",
|
|
||||||
|
|
||||||
"inherits": "base.json",
|
|
||||||
|
|
||||||
"inputs": [
|
|
||||||
"../build/test/requireall.js"
|
|
||||||
],
|
|
||||||
|
|
||||||
"paths": [
|
|
||||||
"../src",
|
|
||||||
"../test"
|
|
||||||
]
|
|
||||||
|
|
||||||
}
|
|
||||||
244
css/ol.css
@@ -1,244 +0,0 @@
|
|||||||
.ol-attribution {
|
|
||||||
position: absolute;
|
|
||||||
text-align: right;
|
|
||||||
color: #eeeeee;
|
|
||||||
bottom: 0;
|
|
||||||
right: 0;
|
|
||||||
background: rgba(0,60,136,0.3);
|
|
||||||
font-family: 'Lucida Grande',Verdana,Geneva,Lucida,Arial,Helvetica,sans-serif;
|
|
||||||
padding: 6px;
|
|
||||||
}
|
|
||||||
.ol-attribution a {
|
|
||||||
color: white;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
.ol-attribution ul {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
font-size: 10px;
|
|
||||||
line-height: 12px;
|
|
||||||
}
|
|
||||||
.ol-attribution li {
|
|
||||||
display: inline;
|
|
||||||
list-style: none;
|
|
||||||
line-height: inherit;
|
|
||||||
}
|
|
||||||
.ol-attribution li:not(:last-child):after {
|
|
||||||
content: "\2003";
|
|
||||||
}
|
|
||||||
.ol-dragbox {
|
|
||||||
position: absolute;
|
|
||||||
border: 2px solid red;
|
|
||||||
}
|
|
||||||
.ol-full-screen {
|
|
||||||
background: rgba(255,255,255,0.4);
|
|
||||||
border-radius: 4px;
|
|
||||||
padding: 2px;
|
|
||||||
position: absolute;
|
|
||||||
right: 8px;
|
|
||||||
top: 8px;
|
|
||||||
}
|
|
||||||
@media print {
|
|
||||||
.ol-full-screen {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.ol-full-screen a {
|
|
||||||
background: rgba(0,60,136,0.5);
|
|
||||||
color: white;
|
|
||||||
display: block;
|
|
||||||
font-family: 'Lucida Grande',Verdana,Geneva,Lucida,Arial,Helvetica,sans-serif;
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: bold;
|
|
||||||
height: 22px;
|
|
||||||
line-height: 19px;
|
|
||||||
margin: 1px;
|
|
||||||
padding: 0;
|
|
||||||
text-align: center;
|
|
||||||
text-decoration: none;
|
|
||||||
width: 22px;
|
|
||||||
}
|
|
||||||
a.ol-full-screen-false:after {
|
|
||||||
content: "\2194";
|
|
||||||
}
|
|
||||||
a.ol-full-screen-true:after {
|
|
||||||
content: "\00d7";
|
|
||||||
}
|
|
||||||
|
|
||||||
.ol-full-screen div {
|
|
||||||
border-radius: 2px;
|
|
||||||
}
|
|
||||||
.ol-full-screen div a {
|
|
||||||
border-radius: 2px;
|
|
||||||
}
|
|
||||||
.ol-full-screen a:hover {
|
|
||||||
background: rgba(0,60,136,0.7);
|
|
||||||
}
|
|
||||||
.ol-logo {
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
padding: 2px;
|
|
||||||
position: absolute;
|
|
||||||
}
|
|
||||||
.ol-logo ul {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
.ol-logo ul li {
|
|
||||||
display: inline;
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ol-mouse-position {
|
|
||||||
top: 8px;
|
|
||||||
right: 8px;
|
|
||||||
position: absolute;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ol-scale-line {
|
|
||||||
background: rgba(0,60,136,0.3);
|
|
||||||
border-radius: 4px;
|
|
||||||
bottom: 8px;
|
|
||||||
left: 8px;
|
|
||||||
padding: 2px;
|
|
||||||
position: absolute;
|
|
||||||
}
|
|
||||||
.ol-scale-line-inner {
|
|
||||||
border: 1px solid #eeeeee;
|
|
||||||
border-top: none;
|
|
||||||
color: #eeeeee;
|
|
||||||
font-size: 10px;
|
|
||||||
font-family: 'Lucida Grande',Verdana,Geneva,Lucida,Arial,Helvetica,sans-serif;
|
|
||||||
text-align: center;
|
|
||||||
margin: 1px;
|
|
||||||
padding: 0px 2px;
|
|
||||||
}
|
|
||||||
.ol-unsupported {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.ol-viewport .ol-unselectable {
|
|
||||||
-webkit-touch-callout: none;
|
|
||||||
-webkit-user-select: none;
|
|
||||||
-khtml-user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
-ms-user-select: none;
|
|
||||||
user-select: none;
|
|
||||||
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
|
||||||
}
|
|
||||||
.ol-zoom {
|
|
||||||
position: absolute;
|
|
||||||
top: 8px;
|
|
||||||
left: 8px;
|
|
||||||
background: rgba(255,255,255,0.4);
|
|
||||||
border-radius: 4px;
|
|
||||||
padding: 2px;
|
|
||||||
}
|
|
||||||
@media print {
|
|
||||||
.ol-zoom {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.ol-zoom a {
|
|
||||||
display: block;
|
|
||||||
margin: 1px;
|
|
||||||
padding: 0;
|
|
||||||
color: white;
|
|
||||||
font-size: 18px;
|
|
||||||
font-family: 'Lucida Grande',Verdana,Geneva,Lucida,Arial,Helvetica,sans-serif;
|
|
||||||
font-weight: bold;
|
|
||||||
text-decoration: none;
|
|
||||||
text-align: center;
|
|
||||||
height: 22px;
|
|
||||||
width: 22px;
|
|
||||||
line-height: 19px;
|
|
||||||
background: rgba(0,60,136,0.5);
|
|
||||||
}
|
|
||||||
.ol-touch .ol-zoom a {
|
|
||||||
font-size: 20px;
|
|
||||||
height: 30px;
|
|
||||||
width: 30px;
|
|
||||||
line-height: 26px;
|
|
||||||
}
|
|
||||||
.ol-zoom a:hover {
|
|
||||||
background: rgba(0,60,136,0.7);
|
|
||||||
}
|
|
||||||
|
|
||||||
.ol-zoom-in {
|
|
||||||
border-radius: 2px 2px 0 0;
|
|
||||||
}
|
|
||||||
.ol-zoom-in:before {
|
|
||||||
content: "+";
|
|
||||||
}
|
|
||||||
|
|
||||||
.ol-zoom-out {
|
|
||||||
border-radius: 0 0 2px 2px;
|
|
||||||
}
|
|
||||||
.ol-zoom-out:before {
|
|
||||||
content: "\2212";
|
|
||||||
}
|
|
||||||
|
|
||||||
.ol-zoomslider {
|
|
||||||
position: absolute;
|
|
||||||
top: 67px;
|
|
||||||
left: 8px;
|
|
||||||
background: rgba(255, 255, 255, 0.4);
|
|
||||||
border-radius: 4px;
|
|
||||||
width: 28px;
|
|
||||||
height: 200px;
|
|
||||||
outline: none;
|
|
||||||
overflow: hidden;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
.ol-zoomslider-thumb {
|
|
||||||
position: absolute;
|
|
||||||
display: block;
|
|
||||||
padding: 0;
|
|
||||||
margin: 2px;
|
|
||||||
background: rgba(0,60,136,0.5);
|
|
||||||
border-radius: 2px;
|
|
||||||
outline: none;
|
|
||||||
overflow: hidden;
|
|
||||||
height: 20px;
|
|
||||||
width: 24px;
|
|
||||||
}
|
|
||||||
.ol-zoom-extent {
|
|
||||||
position: absolute;
|
|
||||||
background: rgba(255,255,255,0.4);
|
|
||||||
border-radius: 4px;
|
|
||||||
left: 8px;
|
|
||||||
padding: 2px;
|
|
||||||
top: 65px;
|
|
||||||
}
|
|
||||||
@media print {
|
|
||||||
.ol-zoom-extent {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.ol-zoom-extent a {
|
|
||||||
display: block;
|
|
||||||
margin: 1px;
|
|
||||||
padding: 0;
|
|
||||||
color: white;
|
|
||||||
font-size: 16px;
|
|
||||||
font-family: 'Lucida Grande',Verdana,Geneva,Lucida,Arial,Helvetica,sans-serif;
|
|
||||||
font-weight: bold;
|
|
||||||
text-decoration: none;
|
|
||||||
text-align: center;
|
|
||||||
height: 22px;
|
|
||||||
width: 22px;
|
|
||||||
background-color: rgba(0, 60, 136, 0.5);
|
|
||||||
border-radius: 2px;
|
|
||||||
}
|
|
||||||
.ol-touch .ol-zoom-extent a {
|
|
||||||
font-size: 20px;
|
|
||||||
height: 30px;
|
|
||||||
width: 30px;
|
|
||||||
line-height: 26px;
|
|
||||||
}
|
|
||||||
.ol-zoom-extent a:hover {
|
|
||||||
background-color: rgba(0, 60, 136, 0.7);
|
|
||||||
}
|
|
||||||
.ol-zoom-extent a:after {
|
|
||||||
content: "E";
|
|
||||||
}
|
|
||||||
9
doc/Ajax.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
OpenLayers contains a number of helper functions for working with AJAX.
|
||||||
|
|
||||||
|
* Methods
|
||||||
|
OpenLayers.loadURL({String|uri}, {String|params}, {Object|caller}, {function|onComplete}, {function|onFailure}) -- none -- This function sends an XMLHTTPRequest to a remote site, specified by URI, with the params string given as the params argument. Caller is bound as 'this' to the function specified by either onComplete or onFailure.
|
||||||
|
OpenLayers.parseXMLString({String|text}) -- {AJAXResponse} -- Accepts a block of text, and creates a DOM response document from the text.
|
||||||
|
|
||||||
|
* Parameters
|
||||||
|
OpenLayers.ProxyHost -- When initiating an AJAX request, any URL that is absolute is prefixed with OpenLayers.ProxyHost. The ProxyHost is designed to accept a URL and return the content, in an effort to work around cross-browser security restrictions. This defaults to null, but if you wish to access content from another domain that Javascript would restrict access to, you must set this to be the URL which will accept a URL encoded version of the passed URL and return the content at that URL. An example is available as proxy.txt in the examples/ directory.
|
||||||
|
|
||||||
21
doc/Bounds.txt
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
OpenLayers.Bounds
|
||||||
|
|
||||||
|
This class represents a bounding box. Data stores as left, bottom, right, top floats.
|
||||||
|
|
||||||
|
* Constructor
|
||||||
|
OpenLayers.Bounds(left, bottom, right, top) -- Create new Bounds.
|
||||||
|
|
||||||
|
* Methods
|
||||||
|
clone() -- {OpenLayers.Bounds} -- Return copy of the current bounds.
|
||||||
|
toString() -- {String} -- Return bounds as string.
|
||||||
|
toBBOX() -- {String} -- Return bounds as simple string, usable for WMS.
|
||||||
|
getWidth() -- {float} -- Return width of bounds.
|
||||||
|
getHeight() -- {float} -- Return height of bounds.
|
||||||
|
getSize() -- {OpenLayers.Size} -- Return size of bounds.
|
||||||
|
getCenterPixel() -- {OpenLayers.Pixel} -- Return center of bounds as pixel.
|
||||||
|
getCenterLonLat() -- {OpenLayers.LonLat} -- Return center of bounds as LonLat.
|
||||||
|
equals({OpenLayers.Bounds|bounds}) -- {Boolean} -- whether or not the bounds are equivilant.
|
||||||
|
add({float|x}, {float|y}) -- {OpenLayers.Bounds} -- Shift bounds by x and y.
|
||||||
|
contains({float|x}, {float|y}, {Boolean|inclusive}) -- {Boolean} -- Return Whether or not the passed-in coordinates are within this bounds
|
||||||
|
containsBounds({OpenLayers.Bounds|bounds}, {Boolean|partial}, {Boolean|inclusive}) -- {Boolean} -- Returns whether or not the passed-in OpenLayers.Bounds object is contained within this bounds. partial indicates whether bounds must be contained or only overlap. Inclusive determines whether border is included.
|
||||||
|
determineQuadrant({OpenLayers.LonLat|lonlat}) -- {String} -- Determine which quadrant the LonLat is in. Returns combination of "b" or "t" and "l" or "r".
|
||||||
14
doc/Control.LayerSwitcher.txt
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
OpenLayers.Control.LayerSwitcher
|
||||||
|
|
||||||
|
This control will by default display a small image in the upper right corner of the map. When clicked, this image expands into a control which allows one to select between multiple types of layers, seperated into two types: Base Layers and Overlays. Only one base layer can be selected at a time, and is enforced by a radio button control being used. Multiple overlays can be selected at once, and a checkbox control is visible for this functionality.
|
||||||
|
* Constructor
|
||||||
|
OpenLayers.Control.LayerSwitcher({Object|options}?) -- Creates a new control.
|
||||||
|
|
||||||
|
* Methods
|
||||||
|
maximizeControl() -- none -- Expand the layer switcher control.
|
||||||
|
minimizeControl() -- none -- Close the layer switcher control.
|
||||||
|
|
||||||
|
* Parameters
|
||||||
|
position -- (inherited from {OpenLayers.Control}) {OpenLayers.Pixel} to use as the top-left corner of the control div, relative to the map area.
|
||||||
|
activeColor -- The color to use for the background of the layer switcher div.
|
||||||
|
ascending -- Ascending determines whether layers are added to the layer switcher in ascending or descending order. If ascending is true, the lowest layer is appended to the list first. If ascending is false, the lowest layer is at the very bottom of the LayerSwitcher. Default is true.
|
||||||
19
doc/Control.MouseDefaults.txt
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
OpenLayers.Control.MouseDefaults
|
||||||
|
|
||||||
|
Control to set up mouse handling. This includes clicks, double clicks, scrollwheel events, and mouse movement. There are a number of functions which act as the default handlers for these events: if you wish to create your own mouse control which behaves differently, you should create a subclass of MouseDefaults, replacing the functions whose behavior you wish to change.
|
||||||
|
|
||||||
|
|
||||||
|
* Constructor
|
||||||
|
OpenLayers.Control() -- Creates a new control. No options available.
|
||||||
|
|
||||||
|
* Methods
|
||||||
|
defaultClick -- none -- This event takes place when a click event occurs on the map.
|
||||||
|
defaultDblClick -- none -- This event re-centers the map on the clicked location.
|
||||||
|
defaultMouseDown -- none -- This event starts a dragging event, so that the map can be dragged. If the shift key is held, it starts a 'zoombox' or rubber-band-zoom action instead.
|
||||||
|
defaultMouseMove -- none -- If a mouseDrag is in operation, this function causes the map to move to follow the cursor. If a zoombox is in place, this increases the size of the zoombox element to match the cursor.
|
||||||
|
defaultMouseUp -- none -- This function is called when a mouseup event is received, and either sets the center of the map to be the final location or zooms to the zoombox if enabled.
|
||||||
|
defaultMouseOut -- none -- This calls defaultMouseUp, so that when you mouse out of the map div, the events are stopped.
|
||||||
|
defaultWheelUp -- none -- Zooms in one level. Called by onWheelEvent
|
||||||
|
defaultWheelDown -- none -- Zooms out one level. Called by onWheelEvent.
|
||||||
|
onWheelEvent -- none -- catches the map wheel event, and handles it, zooming appropriately.
|
||||||
|
|
||||||
32
doc/Control.MousePosition.txt
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
OpenLayers.Control.MousePosition
|
||||||
|
|
||||||
|
A small control which displays the Longitude and Latitude of the current mouse position, by defualt in the lower right of the map viewport.
|
||||||
|
|
||||||
|
* Constructor
|
||||||
|
OpenLayers.Control.MousePosition({Object|options}) -- Creates a new MousePosition control.
|
||||||
|
|
||||||
|
|
||||||
|
* Parameters
|
||||||
|
|
||||||
|
element -- if not null, div in which to display the MousePosition
|
||||||
|
prefix -- html to precede the longitude value (default: '')
|
||||||
|
separator -- html to separate the longitude and latitude values (default: '<br />')
|
||||||
|
suffix -- html to follow the latitude value (default: '')
|
||||||
|
numdigits -- number of digits to the right of the decimal (default: 5)
|
||||||
|
granularity -- Don't refresh display if mouse has moved more than this (default: 10)
|
||||||
|
|
||||||
|
prefix, separator, and suffix are used to format the lon/lat values.
|
||||||
|
|
||||||
|
With:
|
||||||
|
prefix = 'Lon: '
|
||||||
|
suffix = '<br />Lat: '
|
||||||
|
suffix = ''
|
||||||
|
nudigits = 3
|
||||||
|
Lon/Lat is displayed as:
|
||||||
|
Lon: 95.123
|
||||||
|
Lat: 35.456
|
||||||
|
|
||||||
|
If the mouse has never been over the map, Lon/Lat will equal 0/0. If the mouse is over the map, Lon/Lat will equal the current mouse position. If the mouse has been moved off the map, Lon/Lat will equal the value displayed at the time the mouse was moved off the map.
|
||||||
|
|
||||||
|
If the mouse is moving slowly, the Lon/Lat will refresh continuously. If the mouse is moving rapidly, the refresh of Lon/Lat will be suspended until the mouse has slowed down or stopped. (Trying to update the Lon/Lat value while the mouse is in rapid movemement makes the movement of the mouse unacceptably jerky.)
|
||||||
|
|
||||||
15
doc/Control.MouseToolbar.txt
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
OpenLayers.Control.MouseToolbar
|
||||||
|
|
||||||
|
Control to set up mouse handling. This includes clicks, double clicks, scrollwheel events, and mouse movement. There are a number of functions which act as the default handlers for these events: if you wish to create your own mouse control which behaves differently, you should create a subclass of MouseToolbar, replacing the functions whose behavior you wish to change. Additionally, a toolbar of images can be clicked to start events, as well as using the keyboard shortcuts. Note that if you wish to use the MouseToolbar, you *must* add a 'controls' option to the map constructor, otherwise you will have both MouseDefaults and MouseToolbar on the map, which will not work.
|
||||||
|
|
||||||
|
* Constructor
|
||||||
|
OpenLayers.Control.MouseToolbar({OpenLayers.Pixel|position}, {String|direction}) -- Creates a new control. The direction of the control can be either "vertical" or "horizontal". The default is vertical.
|
||||||
|
|
||||||
|
* Methods
|
||||||
|
defaultClick -- none -- This event takes place when a click event occurs on the map.
|
||||||
|
defaultDblClick -- none -- This event re-centers the map on the clicked location.
|
||||||
|
defaultMouseDown -- none -- This event starts a dragging event, so that the map can be dragged. If the shift key is held, it starts a 'zoombox' or rubber-band-zoom action instead.
|
||||||
|
defaultMouseMove -- none -- If a mouseDrag is in operation, this function causes the map to move to follow the cursor. If a zoombox is in place, this increases the size of the zoombox element to match the cursor.
|
||||||
|
defaultMouseUp -- none -- This function is called when a mouseup event is received, and either sets the center of the map to be the final location or zooms to the zoombox if enabled.
|
||||||
|
defaultMouseOut -- none -- This calls defaultMouseUp, so that when you mouse out of the map div, the events are stopped.
|
||||||
|
|
||||||
9
doc/Control.PanZoom.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
OpenLayers.Control.PanZoom
|
||||||
|
|
||||||
|
Creates a small toolset for controlling the location of the map with panning and zooming, including four directional arrows, a zoom in and zoom out, and one button which zooms to the max extent of the map.
|
||||||
|
|
||||||
|
* Constructor
|
||||||
|
OpenLayers.Control.PanZoom({Object|options}) -- Creates a new panzoom control.
|
||||||
|
|
||||||
|
* Parameters
|
||||||
|
slideFactor -- Number of pixels by which to slide the map when a pan arrow is clicked.
|
||||||
6
doc/Control.PanZoomBar.txt
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
OpenLayers.Control.PanZoom
|
||||||
|
|
||||||
|
Creates a small toolset for controlling the location of the map with panning and zooming, including four directional arrows, a zoom in and zoom out, and a bar on which a slider can be moved to zoom in or out by multiple stops at once.
|
||||||
|
|
||||||
|
* Constructor
|
||||||
|
OpenLayers.Control.PanZoomBar() -- Creates a new panzoombar control.
|
||||||
6
doc/Control.Permalink.txt
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
OpenLayers.Control.Permalink
|
||||||
|
|
||||||
|
A small control which updates a "Permalink" to the map every time the viewport changes. This allows users to copy a link to a specfic map view. By default, it places itself in the lower right corner of the map. This control must be added to the map after a baselayer has been set.
|
||||||
|
|
||||||
|
* Constructor
|
||||||
|
OpenLayers.Control.Scale({DOMElement|element}?, {String|base}) -- Creates a new permalink control. The DOMElement is used, if passed, as the element on which the 'href' is set. If you prefer to put this link on an element outside of the map, set this element to an anchor element to have its href updated when the map moves. If you wish to make the link go to some other URL (for example, an editing interface rather than the current URL), the 'base' property can be used, to which the ?lat=&lon=&zoom= will be appended after the map has moved.
|
||||||
6
doc/Control.Scale.txt
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
OpenLayers.Control.Scale
|
||||||
|
|
||||||
|
A small control which displays an informative scale value, a la "1:50K" , by defualt in the lower right of the map viewport.
|
||||||
|
|
||||||
|
* Constructor
|
||||||
|
OpenLayers.Control.Scale({DOMElement|element}?) -- Creates a new scale control. The DOMElement is used, if passed, to put the scale inside -- this allows you to have the scale displayed in some location outside the map.
|
||||||
9
doc/Control.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
OpenLayers.Control
|
||||||
|
|
||||||
|
Base class from which controls are derived. Controls are elements of the map used to control things like zoom, layer status, or to provide information to the user about the status of the map, such as scale or copyright information.
|
||||||
|
|
||||||
|
* Constructor
|
||||||
|
OpenLayers.Control({Object|options}?) -- Creates a new control. The options here are used to control parameters of the control. The base control defines only "position", which is designed to be an {OpenLayers.Pixel} which is the top-left of the location of the control relative to the map div.
|
||||||
|
|
||||||
|
* Parameters
|
||||||
|
position -- {OpenLayers.Pixel} to use as the top-left corner of the control div, relative to the map area.
|
||||||
9
doc/Icon.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
OpenLayers.Icon
|
||||||
|
|
||||||
|
Icon is used as the visual representation of a Marker. Creating such a representation requres up to three parts: An Icon URL, a size, and an offset. The icon URL is a pointer to an image to use as an icon. The size is the size of the image, as an {OpenLayers.Size} object, and the offset is the position of the top left corner of the image in pixels, relative to the latitude and longitude of the Marker.
|
||||||
|
|
||||||
|
* Constructor
|
||||||
|
OpenLayers.Icon({String|url}, {OpenLayers.Size|size}, {OpenLayers.Pixel|offset}) -- creates a new icon.
|
||||||
|
|
||||||
|
* Methods
|
||||||
|
clone() -- {OpenLayers.Icon} -- Create an exact copy of the icon.
|
||||||
7
doc/Layer.Boxes.txt
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
OpenLayers.Layer.Boxes
|
||||||
|
|
||||||
|
A subclass of the markers layer, this layer draws boxes using div elements
|
||||||
|
instead of icons using images.
|
||||||
|
|
||||||
|
* Constructor
|
||||||
|
OpenLayers.Layer.Boxes(name, options) -- Same as OpenLayers.Layer.Markers.
|
||||||
6
doc/Layer.EventPane.txt
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
OpenLayers.Layer.EventPane
|
||||||
|
|
||||||
|
Designed to act as a super-class for layers which need OpenLayers to intercept click events. Google Maps and Microsoft Virtual Earth both use this functionality, in order to allow for actions like the rubber-band-zoom/zoombox functionality. This Layer is not designed to be used on its own, but instead to act as an intermediary between the user and layers which have their own click handlers.
|
||||||
|
|
||||||
|
* Constructor
|
||||||
|
OpenLayers.Layer.EventPane(name, options) -- Only designed to be used by subclasses.
|
||||||
12
doc/Layer.GeoRSS.txt
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
OpenLayers.Layer.GeoRSS
|
||||||
|
|
||||||
|
GeoRSS layer. Pass a name and location of a GeoRSS file on the web, and a marker will be added to the map for each item in the GeoRSS feed. Uses OpenLayers.loadURL to load the XML, parses the data, and adds markers to the map. The GeoRSS layer supports 1.0 and 2.0 in IE and Firefox, and supports 2.0 in Safari. (Ticket #111 explains the reason for this difference.)
|
||||||
|
|
||||||
|
|
||||||
|
* Constructor
|
||||||
|
OpenLayers.Layer.GeoRSS(name, url) -- Name and location of GeoRSS XML file.
|
||||||
|
|
||||||
|
* Methods
|
||||||
|
parseData(ajaxResponse) -- none -- Callback for the loadURL call. This function parses the XML for the GeoRSS feed, creating markers for the data and adding a popup to each marker. It populates an array of features as 'this.features'.
|
||||||
|
markerClick(Event) -- none -- Action to perform when a marker is clicked.
|
||||||
|
clearFeatures() -- none -- Removes all features and markers from the map.
|
||||||
16
doc/Layer.Google.txt
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
OpenLayers.Layer.Google
|
||||||
|
|
||||||
|
The Google Layer in OpenLayers allows you to include Google Maps functionality in your OpenLayers maps. In order to use the Google Layer, you must first obtain an API key for Google Maps, and include the Google Maps API script in your page. Once you have done this,
|
||||||
|
|
||||||
|
* Constructor
|
||||||
|
OpenLayers.Layer.Google(name, options?) -- Constructor for Google layer. Accepts name and options.
|
||||||
|
|
||||||
|
* Methods
|
||||||
|
getOLLonLatFromGLatLng(GLonLat) -- {OpenLayers.LonLat} -- Convert from GLatLon to OpenLayers LonLat
|
||||||
|
getGLatLngFromOLLonLat({OpenLayers.LonLat|lonlat}) -- GLatLon -- Convert From OpenLayers LonLat to GLatLon
|
||||||
|
getOLPixelFromGPoint(GPoint) -- {OpenLayers.Pixel} -- Convert from GPoint to OpenLayers.Pixel
|
||||||
|
getGPointFromOLPixel({OpenLayers.Pixel|pixel}) -- GPoint -- Create GPoint from OpenLayers Pixel.
|
||||||
|
|
||||||
|
* Parameters
|
||||||
|
type -- one of G_MAP, G_SATELLITE_MAP, G_HYBRID_MAP, used to choose the type of map to display.
|
||||||
|
|
||||||
31
doc/Layer.Grid.txt
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
OpenLayers.Layer.Grid
|
||||||
|
|
||||||
|
The Grid layer is the base layer for almost all image layers. This is a subclass of HTTPRequest.
|
||||||
|
|
||||||
|
* Constructor
|
||||||
|
OpenLayers.Layer.Grid(name, url, params, options) -- URL is the base URL to the layer. Params is a set of params to be included in the HTTP Request. Options is a set of options, extending the parameters of the layer.
|
||||||
|
|
||||||
|
* Methods
|
||||||
|
getGridBounds() -- {OpenLayers.Bounds} -- return geographic extent of the grid of tiles.
|
||||||
|
_initTiles() -- none -- Used to initialize the tile grid, creating image elements as neccesary and filling them with the correct images.
|
||||||
|
spiralTileLoad() -- none -- Called from _initTiles. Rotates through the grid filling in the images for the grid.
|
||||||
|
clone() -- {OpenLayers.Layer.Grid} -- create a clone of the layer. Subclassed from {OpenLayers.Layer}.
|
||||||
|
setMap(map) -- none -- Set the map property of the layer. Also set the parameters which are inherited from the map. This is also where the tileSize is retrieved from the map. Subclassed from {OpenLayers.Layer}.
|
||||||
|
moveTo({OpenLayers.Bounds|bounds}, {Boolean|zoomChanged}) -- none -- Not implemented here, but the general function called on dragging or setCenter, to move the Layer to a new geographic location. Subclassed from {OpenLayers.Layer}.
|
||||||
|
getResolution() -- {float} -- Return the current resolution of the map, in units/pixel. Subclassed from {OpenLayers.Layer}.
|
||||||
|
getExtent() -- {OpenLayers.Bounds} -- Return the geographic extent of the current map viewport. Subclassed from {OpenLayers.Layer}.
|
||||||
|
getZoomForExtent({OpenLayers.Bounds|bounds}) -- {Integer} -- return the integer zoom which most closely matches the passed bounds. Subclassed from {OpenLayers.Layer}.
|
||||||
|
getLonLatFromViewPortPx({OpenLayers.Pixel|pixel}) -- {OpenLayers.LonLat} -- Returns an OpenLayers.LonLat which is the passed-in view port OpenLayers.Pixel, translated into lon/lat by the layer. Subclassed from {OpenLayers.Layer}.
|
||||||
|
getViewPortPxFromLonLat({OpenLayers.LonLat|lonlat}) -- {OpenLayers.Pixel} -- Returns An OpenLayers.Pixel which is the passed-in OpenLayers.LonLat, translated into view port pixels. Subclassed from {OpenLayers.Layer}.
|
||||||
|
|
||||||
|
* Parameters
|
||||||
|
buffer -- Default 2. Number of tiles around the central map area which OpenLayers will preload so that dragging goes more smoothly.
|
||||||
|
* Subclassed from OpenLayers.Layer
|
||||||
|
isBaseLayer -- This determines whether the layer is a base layer or an overlay. Only one Base Layer can be displayed on the map at once. Default is false.
|
||||||
|
projection -- SRS string to describe the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map.
|
||||||
|
maxExtent -- an OpenLayers.Bounds for the layer. This is the maximum geographic extent of the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map.
|
||||||
|
maxResolution -- The number of degrees per pixel at zoom level 0. If this is set on the map before the Layer is added to the map, it will inherit from the map.
|
||||||
|
maxZoomLevel -- The maximum zoom level for the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map.
|
||||||
|
minScale -- The scale at zoom level 0. If this is set on the map before the Layer is added to the map, it will inherit from the map.
|
||||||
|
maxScale -- The scale at the highest zoom level. If this is set on the map before the Layer is added to the map, it will inherit from the map.
|
||||||
|
units -- The units the map is projected into. If this is set on the map before the Layer is added to the map, it will inherit from the map.
|
||||||
13
doc/Layer.HTTPRequest.txt
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
OpenLayers.Layer.HTTPRequest
|
||||||
|
|
||||||
|
Sublass of Layer used for services which require initiating multiple HTTPRequests.
|
||||||
|
|
||||||
|
* Constructor
|
||||||
|
OpenLayers.Layer.HTTPRequest(name, url, params, options) -- URL is the base URL to the layer. Params is a set of params to be included in the HTTP Request. Options is a set of options, extending the parameters of the layer.
|
||||||
|
|
||||||
|
* Methods
|
||||||
|
initResolutions() -- none -- Based on the current minScale/maxScale/maxResolution/numZoomLevel/scales/resolutions parameters, initializes an array of 'zoom levels' as this.resolutions, which are then used as an index into when zooming.
|
||||||
|
getFullRequestString(newParams) -- {String} -- Returns the full request string for a combination of the defaults on this layer and the parameters passed via newParams.
|
||||||
|
|
||||||
|
* Options
|
||||||
|
reproject -- If reproject is true, then the layer will alter the bounding boxes of its tiles to be based on the geographic location of the pixel bounds in the base layer. This is important for reprojecting WMS tiles onto something like Google Maps. Tile locations are calculated, and then when creating the tile request, the bounding box is adjusted to match the bounding box of the base layer at that location.
|
||||||
9
doc/Layer.Image.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
OpenLayers.Layer.Image
|
||||||
|
|
||||||
|
The Image Layer allows you to load a single image and use it as a layer in your
|
||||||
|
map.
|
||||||
|
|
||||||
|
|
||||||
|
* Constructor
|
||||||
|
OpenLayers.Layer(name, url, {OpenLayers.Bounds|bounds}, {OpenLayers.Size|size}, {options}) -- Image Layer constructor requires a name, URL of the image, geographic bounds of the image, pixel size of the image, and an optional options parameter.
|
||||||
|
|
||||||
7
doc/Layer.KaMap.txt
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
OpenLayers.Layer.KaMap
|
||||||
|
|
||||||
|
ka-Map is a Mapserver wrapper which performs caching and works around many of the deficiencies with tiling when using Mapserver as a WMS client.
|
||||||
|
|
||||||
|
* Construtor
|
||||||
|
OpenLayers.Layer.KaMap(name, url, params, options) -- URL is the url of the tile.php for KaMap.
|
||||||
|
|
||||||
13
doc/Layer.Markers.txt
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
OpenLayers.Layer.Markers
|
||||||
|
|
||||||
|
The base class for all vector drawing, The OpenLayers.Layer.Markers layer is the primary way to get annotations into your map.
|
||||||
|
|
||||||
|
* Constructor
|
||||||
|
OpenLayers.Layer.Markers(name, options) -- Name and options for layer.
|
||||||
|
|
||||||
|
* Methods
|
||||||
|
addMarker({OpenLayers.Marker|Marker}) -- none -- Adds a marker to the layer, sets the map object on the marker, and calls drawMarker on the marker.
|
||||||
|
removeMarker({OpenLayers.Marker|Marker}) -- none -- Remove the marker from the layer and map.
|
||||||
|
clearMarkers() -- none -- Remove all markers from the layer with removeMarker.
|
||||||
|
redraw() -- none -- Redraw all markers. Used so that markers can change their position when a base layer changes.
|
||||||
|
drawMarker -- none -- Call marker.draw(px), which passes the Pixel of the latitude/longitude in the map viewport to the marker. adds the marker to the div, and marks the marker as drawn.
|
||||||
10
doc/Layer.Text.txt
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
OpenLayers.Layer.Text
|
||||||
|
|
||||||
|
Subclass of Markers layer which retrieves CSV file from the web, and parses content to create markers and popups.
|
||||||
|
|
||||||
|
* Constructor
|
||||||
|
OpenLayers.Layer.Text(name, options) -- Pass in name, and set location: 'URL of CSV file' in the options hash.
|
||||||
|
|
||||||
|
* Methods
|
||||||
|
parseData(ajaxRequest) -- none -- Parses returned CSV file.
|
||||||
|
|
||||||
14
doc/Layer.VirtualEarth.txt
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
OpenLayers.Layer.VirtualEarth
|
||||||
|
|
||||||
|
The Virtual Earth Layer in OpenLayers allows you to include Virtual Earth Maps in your OpenLayers maps. In order to use the Virtual Earth Layer, you must first include the Virtual Earth API script in your page. Once you have done this, simply add the layer to your map.
|
||||||
|
|
||||||
|
* Constructor
|
||||||
|
OpenLayers.Layer.VirtualEarth(name) -- Constructor for Virtual Earth layer. Accepts name.
|
||||||
|
|
||||||
|
* Methods
|
||||||
|
getOLLonLatFromVELatLng(VELatLon) -- {OpenLayers.LonLat} -- Convert from VELatLon to OpenLayers LonLat
|
||||||
|
getVELatLngFromOLLonLat({OpenLayers.LonLat|lonlat}) -- VELatLon -- Convert From OpenLayers LonLat to VELatLon
|
||||||
|
getOLPixelFromVEPoint(Msn.VE.Pixel) -- {OpenLayers.Pixel} -- Convert from VEPoint to OpenLayers.Pixel
|
||||||
|
getGPointFromOLPixel({OpenLayers.Pixel|pixel}) -- Msn.VE.Pixel -- Create Msvn.VE.Pixel from OpenLayers Pixel.
|
||||||
|
|
||||||
|
|
||||||
15
doc/Layer.WMS.txt
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
OpenLayers.Layer.WMS
|
||||||
|
|
||||||
|
The WMS layer allows one to connect to a WMS server to obtain images. Params are available as a hash on the layer object, however, all keys are upper-cased automatically for maximum compatibility with WMS servers, so a parameter which is set as 'layers' will be uppercased to LAYERS. Where 'layer' is your Javscript variable for the layer, layer.params.LAYERS is the value of the layers param as set by the constructor.
|
||||||
|
|
||||||
|
If you wish to change params, you should use mergeNewParams, rather than accessing the parameters directly.
|
||||||
|
|
||||||
|
* Constructor
|
||||||
|
OpenLayers.Layer.WMS(name, url, params, options) -- URL is the base URL to the layer. Params is a set of params to be included in the HTTP Request. Options is a set of options, extending the parameters of the layer.
|
||||||
|
|
||||||
|
* Methods
|
||||||
|
getURL({OpenLayers.Bounds|bounds}) -- {String} -- Returns a WMS URL for the given bounds based on the properties of the layer.
|
||||||
|
All other methods are inherited from {OpenLayers.Layer.Grid}
|
||||||
|
|
||||||
|
* Options
|
||||||
|
isBaseLayer -- WMS layers default to being base layers unless one of their parameters is 'transparent':'true'.
|
||||||
40
doc/Layer.txt
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
OpenLayers.Layer
|
||||||
|
|
||||||
|
Layers are the most important and central aspect of OpenLayers. They are the
|
||||||
|
core functionality for the software: Everything that ends up on the map comes
|
||||||
|
from a layer. The base layer class is designed to be subclassed by any number
|
||||||
|
of different layers.
|
||||||
|
|
||||||
|
* Constructor
|
||||||
|
OpenLayers.Layer(name, options) -- All layers have a name as their first param. This name is used to display the layer in the LayerSwitcher, and for other purposes. The options parameter is used to replace any parameters of the Layer which need to be different.
|
||||||
|
|
||||||
|
* Methods
|
||||||
|
clone() -- {OpenLayers.Layer} -- create a clone of the layer.
|
||||||
|
setName({String|name}) -- none -- Set the name of the layer to something different.
|
||||||
|
moveTo({OpenLayers.Bounds|bounds}, {Boolean|zoomChanged}) -- none -- Not implemented here, but the general function called on dragging or setCenter, to move the Layer to a new geographic location.
|
||||||
|
setMap(map) -- none -- Set the map property of the layer. Also set the parameters which are inherited from the map.
|
||||||
|
getVisibility() -- {Boolean} -- Return true or false based on visibility of the layer.
|
||||||
|
setVisibility({Boolean|visible}) -- none -- Set the layer visibility, and trigger the appropriate events.
|
||||||
|
getResolution() -- {float} -- Return the current resolution of the map, in units/pixel.
|
||||||
|
getExtent() -- {OpenLayers.Bounds} -- Return the geographic extent of the current map viewport.
|
||||||
|
getZoomForExtent({OpenLayers.Bounds|bounds}) -- {Integer} -- return the integer zoom which most closely matches the passed bounds.
|
||||||
|
getLonLatFromViewPortPx({OpenLayers.Pixel|pixel}) -- {OpenLayers.LonLat} -- Returns an OpenLayers.LonLat which is the passed-in view port OpenLayers.Pixel, translated into lon/lat by the laye
|
||||||
|
getViewPortPxFromLonLat({OpenLayers.LonLat|lonlat}) -- {OpenLayers.Pixel} -- Returns An OpenLayers.Pixel which is the passed-in OpenLayers.LonLat, translated into view port pixels
|
||||||
|
addOptions({options})) -- none -- Change the options on the layer. This is the supported way to change properties of the layer.
|
||||||
|
|
||||||
|
* Parameters
|
||||||
|
displayOutsideMaxExtent -- Determine whether images or data are loaded outside the maxExtent. Default is false.
|
||||||
|
isBaseLayer -- This determines whether the layer is a base layer or an overlay. Only one Base Layer can be displayed on the map at once. Default is false.
|
||||||
|
projection -- SRS string to describe the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map.
|
||||||
|
maxExtent -- an OpenLayers.Bounds for the layer. This is the maximum geographic extent of the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map.
|
||||||
|
maxResolution -- The number of degrees per pixel at zoom level 0. If this is set on the map before the Layer is added to the map, it will inherit from the map.
|
||||||
|
maxZoomLevel -- The maximum zoom level for the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map.
|
||||||
|
minScale -- The scale at zoom level 0. If this is set on the map before the Layer is added to the map, it will inherit from the map.
|
||||||
|
maxScale -- The scale at the highest zoom level. If this is set on the map before the Layer is added to the map, it will inherit from the map.
|
||||||
|
units -- The units the map is projected into. If this is set on the map before the Layer is added to the map, it will inherit from the map.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
13
doc/LonLat.txt
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
OpenLayers.LonLat
|
||||||
|
|
||||||
|
This class represents a geographic coordinate pair, either projected or unprojected.
|
||||||
|
|
||||||
|
* Constructor
|
||||||
|
OpenLayers.LonLat({float|lon}, {float|lat}) -- Create LonLat.
|
||||||
|
|
||||||
|
* Methods
|
||||||
|
toString() -- {String} -- Converts to human readable string.
|
||||||
|
toShortString() -- {String} -- Converts to short human readable string.
|
||||||
|
clone() -- {OpenLayers.Size} -- Returns a copy of the pixel.
|
||||||
|
equals({OpenLayers.LonLat|ll}) -- {Boolean} -- Compares two LonLats.
|
||||||
|
add({int|lon}, {int|lat}) -- {OpenLayers.LonLat} -- add x and y to the current coordinates.
|
||||||
77
doc/Map.txt
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
OpenLayers.Map
|
||||||
|
|
||||||
|
Instantiate class {OpenLayers.Map} in order to create a map. This is the central class in the API. Everything else is auxiliary.
|
||||||
|
|
||||||
|
* Constructor
|
||||||
|
OpenLayers.Map(container, opts?) -- Creates a new map inside of the given HTML container, which is typically a DIV element. The opts variable is an object with various options, as described in the options section below.
|
||||||
|
|
||||||
|
* Methods
|
||||||
|
* Layer Management
|
||||||
|
addLayer({OpenLayers.Layer|layer}) -- none -- adds a layer to the list currently set for the map.
|
||||||
|
addLayers([ {OpenLayers.Layer|layer}, {OpenLayers.Layer|layer} ]) -- none -- Adds multiple layers to a map.
|
||||||
|
removeLayer({OpenLayers.Layer|layer}) -- none -- Remove a layer from the map.
|
||||||
|
setBaseLayer({OpenLayers.Layer|layer}) -- none -- Sets a new base layer for the map. The provided layer should have already been added to the map. Changing the base layer causes all other base layers to be turned off, and all overlays to reproject themselves.
|
||||||
|
|
||||||
|
* Control Management
|
||||||
|
addControl({OpenLayers.Control|control}) -- none -- Adds a control to the map.
|
||||||
|
|
||||||
|
* Popup Management
|
||||||
|
addPopup({OpenLayers.Popup|popup}, {Boolean|exclusive}) -- none -- adds a popup to the map. If exclusive is set to true, then all other popups are closed first.
|
||||||
|
removePopup({OpenLayers.Popup|popup}) -- none -- removes an existing popup from the map.
|
||||||
|
|
||||||
|
* Center management
|
||||||
|
setCenter({OpenLayers.LonLat|lonlat}, {int|zoom}) -- none -- Set the center point of the map. This then moves all the layers to the new center location as well, using each layer's 'moveTo' function. The 'zoom' is an integer from 0 to maxZoomLevel.
|
||||||
|
pan({Integer|dx}, {Integer|dy}) -- none -- Allows user to pan by a value of screen pixels
|
||||||
|
|
||||||
|
* Zoom Management
|
||||||
|
zoomTo({int|zoom}) -- none -- zoom to the given zoom level.
|
||||||
|
zoomIn() -- none -- zoom in one level.
|
||||||
|
zoomOut() -- none -- zoom out one level.
|
||||||
|
zoomToExtent({OpenLayers.Bounds|bounds}) -- none -- Set the map such that the bounds fits within the current viewport area.
|
||||||
|
zoomToMaxExtent() -- none -- Zoom such that the entire bounds of the map is contained in the viewport.
|
||||||
|
zoomToScale({float}) -- none -- Zoom as close to the given scale as possible. Scale can be given as a ratio (1/24000) or as the denominator of the scale value (24000). zoomToScale will find the zoom level which most closely fits the requested scale and set that as the current zoom level.
|
||||||
|
|
||||||
|
* Current Map Information
|
||||||
|
getLonLatFromPixel({OpenLayers.Pixel|pixel}) -- {OpenLayers.LonLat} -- Returns OpenLayers.LonLat corresponding to the given OpenLayers.Pixel, translated into lon/lat by the current base layer
|
||||||
|
getPixelFromLonLat({OpenLayers.LonLat|lonlat}) -- {OpenLayers.Pixel} -- Returns OpenLayers.Pixel corresponding to the given OpenLayers.LonLat, translated by the current base layer
|
||||||
|
getCenter() -- {OpenLayers.LonLat} -- Returns a LonLat for the current center of the map
|
||||||
|
getZoom() -- {Integer} -- Returns the current zoom level as an integer
|
||||||
|
getExtent() -- {OpenLayers.Bounds} -- Returns a Bounds object which represents the geographic bounds of the current viewPort.
|
||||||
|
getSize() -- {OpenLayers.Pixel} -- Returns the pixel size of the current map window.
|
||||||
|
getTileSize() -- {OpenLayers.Size} -- Returns tile size currently set for map.
|
||||||
|
getResolution() -- {float} -- Returns the current resolution (units/pixel) of the map
|
||||||
|
getZoomForExtent({OpenLayers.Bounds|bounds}) -- Zoom level in which the given bounds will fit -- zooming to this level and setting the center of the map in the center of the bounds will always fit the given bounds in the map.
|
||||||
|
|
||||||
|
* Default Map Information
|
||||||
|
getMaxResolution() -- {float} -- returns The Map's Maximum Resolution, the units/pixel at zoom level 0. The default is 1.40625, to match the approximate MaxResolution used by the commercial providers.
|
||||||
|
getMaxExtent() -- {OpenLayers.Bounds} -- Return the max extent of the current base layer as defined on the layer. The default maxExtent for OpenLayers is -180,-90,180,90
|
||||||
|
getMaxZoomLevel() -- {int} -- Returns the maximum zoom level that can be reached in the map for the current base layer
|
||||||
|
getMinZoomLevel() -- {int} -- Returns the minimum zoom level that can be reached in the map for the current base layer
|
||||||
|
|
||||||
|
* Events
|
||||||
|
addlayer -- a layer is added to the map
|
||||||
|
removelayer -- a layer is removed from the map
|
||||||
|
changelayer -- a layer has some property of it, typically visibility, changed.
|
||||||
|
changebaselayer -- the current base layer changes
|
||||||
|
movestart -- start of a movement in the map
|
||||||
|
move -- end of movement in a map. this happens while te mouse is dragging as well as for all other events.
|
||||||
|
moveend -- end of movement in a map, but does not happen when the 'dragging' flag is set, as is the case when the move event is in the middle of a drag action.
|
||||||
|
zoomend -- end of a zoom action
|
||||||
|
mouseover -- map is moused over
|
||||||
|
mouseout -- map is no longer mousedout
|
||||||
|
mousemove -- mouse moves inside map
|
||||||
|
dragstart -- drag action starts
|
||||||
|
dragend -- drag action ends
|
||||||
|
|
||||||
|
* Options:
|
||||||
|
* controls -- an array of control objects to be added to the map. The default is [new OpenLayers.Control.MouseDefaults(), new OpenLayers.Control.PanZoom()]
|
||||||
|
* projection -- used by WMS layers, should be an SRS identifier.
|
||||||
|
* maxZoomLevel -- The number of zoom levels to use in the map.
|
||||||
|
* maxExtent -- {OpenLayers.Bounds} to be used as the maximum extent of a map. The center of the map can not leave the maxExtent of the map when dragging.
|
||||||
|
* maxResolution -- The units/pixel measurement at zoom level 0. Default is 1.40625
|
||||||
|
* resolutions -- An array of resolutions to be used as an index when zooming. Overrides maxZoomLevel and maxResolution if present.
|
||||||
|
* minScale -- The smallest scale value. minScale is preferred over maxResolution, if present.
|
||||||
|
* maxScale -- The maximum scale the map should include. Overrides maxZoomLevel if present.
|
||||||
|
* units -- The units of the map. Defaults to degrees. Neccesary when using scale in any way.
|
||||||
|
* scales -- An array of scale values. Overrides maxResolution, maxZoomLevel, resolutions, and min/max scale if present.
|
||||||
|
|
||||||
10
doc/Marker.Box.txt
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
OpenLayers.Marker.Box
|
||||||
|
|
||||||
|
A different kind of Marker, designed to be added to a Boxes layer instead of a Markers layer.
|
||||||
|
|
||||||
|
* Constructor
|
||||||
|
OpenLayers.Marker.Box({OpenLayers.Bounds|bounds}, borderColor, borderWidth) -- Set up a box. Defaults are red, with a width of 2.
|
||||||
|
|
||||||
|
* Methods
|
||||||
|
setBorder(color, width) -- sets properties of border color and width.
|
||||||
|
|
||||||
15
doc/Marker.txt
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
OpenLayers.Marker
|
||||||
|
|
||||||
|
Instantiate class {OpenLayers.Marker} in order to create a marker.
|
||||||
|
|
||||||
|
* Constructor
|
||||||
|
OpenLayers.Marker({OpenLayers.LonLat|lonlat}, {OpenLayers.Icon|icon}? ) -- Creates a new marker object. This object must be added to a Marker layer and will then be displayed. The icon can be left null -- if this is the case, then the default OpenLayers icon will be used.
|
||||||
|
|
||||||
|
* Methods
|
||||||
|
onScreen() -- {boolean} -- Returns whether or not the marker is currently visible on screen.
|
||||||
|
inflate({float}) -- none -- Changes the size of the Icon by a factor of the passed float.
|
||||||
|
display({string}) -- none -- Sets the style.display property of the Icon.
|
||||||
|
|
||||||
|
* Events
|
||||||
|
Standard browser events are available.
|
||||||
|
|
||||||
13
doc/Pixel.txt
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
OpenLayers.Pixel
|
||||||
|
|
||||||
|
This class represents a screen coordinate in x and y coordinates.
|
||||||
|
|
||||||
|
* Constructor
|
||||||
|
OpenLayers.Pixel({float|x}, {float|y}) -- Create Pixel.
|
||||||
|
|
||||||
|
* Methods
|
||||||
|
toString() -- {String} -- Converts to human readable string.
|
||||||
|
clone() -- {OpenLayers.Pixel} -- Returns a copy of the pixel.
|
||||||
|
equals({OpenLayers.Pixel|px}) -- {Boolean} -- Tests for equivilance.
|
||||||
|
add({int|x}, {int|y}) -- {OpenLayers.Pixel} -- add x and y to the current coordinates.
|
||||||
|
offset({OpenLayers.Pixel|pixel}) -- {OpenLayers.Pixel} -- Add pixels together.
|
||||||
11
doc/Size.txt
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
OpenLayers.Size
|
||||||
|
|
||||||
|
This class represents a width/height pair.
|
||||||
|
|
||||||
|
* Constructor
|
||||||
|
OpenLayers.Size({float|h}, {float|w}) -- Create Size.
|
||||||
|
|
||||||
|
* Methods
|
||||||
|
toString() -- {String} -- Converts to human readable string.
|
||||||
|
clone() -- {OpenLayers.Size} -- Returns a copy of the pixel.
|
||||||
|
add({int|x}, {int|y}) -- {OpenLayers.Size} -- add x and y to the current coordinates.
|
||||||