diff --git a/build_docs.js b/build_docs.js deleted file mode 100644 index 15668665..00000000 --- a/build_docs.js +++ /dev/null @@ -1,10 +0,0 @@ -var exec = require('child_process').exec; - -var command = 'java -jar lib/jsdoc-toolkit/jsrun.jar \ - lib/jsdoc-toolkit/app/run.js -a \ - -t=lib/jsdoc-toolkit/templates/jsdoc \ - -d=site/docs HEADER.js src/ src/util/'; - -exec(command, function (error, output) { - console.log(output); -}); \ No newline at end of file diff --git a/lib/jsdoc-toolkit/README.txt b/lib/jsdoc-toolkit/README.txt deleted file mode 100644 index 3782da88..00000000 --- a/lib/jsdoc-toolkit/README.txt +++ /dev/null @@ -1,183 +0,0 @@ -====================================================================== - -DESCRIPTION: - -This is the source code for JsDoc Toolkit, an automatic documentation -generation tool for JavaScript. It is written in JavaScript and is run -from a command line (or terminal) using Java and Mozilla's Rhino -JavaScript runtime engine. - -Using this tool you can automatically turn JavaDoc-like comments in -your JavaScript source code into published output files, such as HTML -or XML. - -For more information, to report a bug, or to browse the technical -documentation for this tool please visit the official JsDoc Toolkit -project homepage at http://code.google.com/p/jsdoc-toolkit/ - -For the most up-to-date documentation on JsDoc Toolkit see the -official wiki at http://code.google.com/p/jsdoc-toolkit/w/list - -====================================================================== - -REQUIREMENTS: - -JsDoc Toolkit is known to work with: -java version "1.6.0_03" -Java(TM) SE Runtime Environment (build 1.6.0_03-b05) -on Windows XP, -and java version "1.5.0_19" -Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_19-b02-304) -on Mac OS X 10.5. - -Other versions of java may or may not work with JsDoc Toolkit. - -====================================================================== - -USAGE: - -Running JsDoc Toolkit requires you to have Java installed on your -computer. For more information see http://www.java.com/getjava/ - -Before running the JsDoc Toolkit app you should change your current -working directory to the jsdoc-toolkit folder. Then follow the -examples below, or as shown on the project wiki. - -On a computer running Windows a valid command line to run JsDoc -Toolkit might look like this: - -> java -jar jsrun.jar app\run.js -a -t=templates\jsdoc mycode.js - -On Mac OS X or Linux the same command would look like this: - -$ java -jar jsrun.jar app/run.js -a -t=templates/jsdoc mycode.js - -The above assumes your current working directory contains jsrun.jar, -the "app" and "templates" subdirectories from the standard JsDoc -Toolkit distribution and that the relative path to the code you wish -to document is "mycode.js". - -The output documentation files will be saved to a new directory named -"out" (by default) in the current directory, or if you specify a --d=somewhere_else option, to the somewhere_else directory. - -For help (usage notes) enter this on the command line: - -$ java -jar jsrun.jar app/run.js --help - -More information about the various command line options used by JsDoc -Toolkit are available on the project wiki. - -====================================================================== - -RUNNING VIA SHELL SCRIPT - -Avi Deitcher has contributed the file jsrun.sh with the following usage notes: - -A script to simplify running jsdoc from the command-line, especially when -running from within a development or build environment such as ant. - -Normally, to run jsdoc, you need a command-line as the following: -java -Djsdoc.dir=/some/long/dir/path/to/jsdoc -jar -/some/long/dir/path/to/jsdoc/jsrun.jar /some/long/dir/path/to/jsdoc/app/run.js --t=template -r=4 /some/long/dir/path/to/my/src/code - -This can get tedious to redo time and again, and difficult to use from within a build environment. - -To simplify the process, jsrun.sh will automatically run this path, as well as passing through any arguments. - -Usage: jsrun.sh - -All will be passed through. -Additionally, jsrun.sh will take the following actions: -1) If the environment variable JSDOCDIR is set, it will add -"-Djsdoc.dir=$JSDOCDIR" to the command-line -2) If the environment variable JSDOCTEMPLATEDIR is set, it will add -"-Djsdoc.template.dir=$JSDOCTEMPLATEDIR" to the command-line -3) java with the appropriate path to jsrun.jar and run.js will be instantiated - -If not variables are set, it is assumed that the path to jsrun.jar and app/ is in the current working directory. - -Example: -# jsrun.sh ./src/ -Assuming JSDOCDIR=/some/path/to/my/jsdoc will cause the following command to -execute: -java -Djsdoc.dir=/some/path/to/my/jsdoc -jar /some/path/to/my/jsdoc/jsrun.jar -/some/path/to/my/jsdoc/app/run.js ./src/ - -====================================================================== - -TESTING: - -To run the suite of unit tests included with JsDoc Toolkit enter this -on the command line: - -$ java -jar jsrun.jar app/run.js -T - -To see a dump of the internal data structure that JsDoc Toolkit has -built from your source files use this command: - -$ java -jar jsrun.jar app/run.js mycode.js -Z - -====================================================================== - -LICENSE: - -JSDoc.pm - -This project is based on the JSDoc.pm tool, created by Michael -Mathews and Gabriel Reid. More information on JsDoc.pm can -be found on the JSDoc.pm homepage: http://jsdoc.sourceforge.net/ - -Complete documentation on JsDoc Toolkit can be found on the project -wiki at http://code.google.com/p/jsdoc-toolkit/w/list - -Rhino - -Rhino (JavaScript in Java) is open source and licensed by Mozilla -under the MPL 1.1 or later/GPL 2.0 or later licenses, the text of -which is available at http://www.mozilla.org/MPL/ - -You can obtain the source code for Rhino from the Mozilla web site at -http://www.mozilla.org/rhino/download.html - -JsDoc Toolkit is a larger work that uses the Rhino JavaScript engine -but is not derived from it in any way. The Rhino library is used -without modification and without any claims whatsoever. - -The Rhino Debugger - -You can obtain more information about the Rhino Debugger from the -Mozilla web site at http://www.mozilla.org/rhino/debugger.html - -JsDoc Toolkit is a larger work that uses the Rhino Debugger but -is not derived from it in any way. The Rhino Debugger is used -without modification and without any claims whatsoever. - -JsDoc Toolkit - -All code specific to JsDoc Toolkit are free, open source and licensed -for use under the X11/MIT License. - -JsDoc Toolkit is Copyright (c)2009 Michael Mathews - -This program is free software; you can redistribute it and/or -modify it under the terms below. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: The above copyright notice and this -permission notice must be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/lib/jsdoc-toolkit/app/frame.js b/lib/jsdoc-toolkit/app/frame.js deleted file mode 100644 index 1beb4055..00000000 --- a/lib/jsdoc-toolkit/app/frame.js +++ /dev/null @@ -1,33 +0,0 @@ -IO.include("frame/Opt.js"); -IO.include("frame/Chain.js"); -IO.include("frame/Link.js"); -IO.include("frame/String.js"); -IO.include("frame/Hash.js"); -IO.include("frame/Namespace.js"); -//IO.include("frame/Reflection.js"); - -/** A few helper functions to make life a little easier. */ - -function defined(o) { - return (o !== undefined); -} - -function copy(o) { // todo check for circular refs - if (o == null || typeof(o) != 'object') return o; - var c = new o.constructor(); - for(var p in o) c[p] = copy(o[p]); - return c; -} - -function isUnique(arr) { - var l = arr.length; - for(var i = 0; i < l; i++ ) { - if (arr.lastIndexOf(arr[i]) > i) return false; - } - return true; -} - -/** Returns the given string with all regex meta characters backslashed. */ -RegExp.escapeMeta = function(str) { - return str.replace(/([$^\\\/()|?+*\[\]{}.-])/g, "\\$1"); -} diff --git a/lib/jsdoc-toolkit/app/frame/Chain.js b/lib/jsdoc-toolkit/app/frame/Chain.js deleted file mode 100644 index 506469d1..00000000 --- a/lib/jsdoc-toolkit/app/frame/Chain.js +++ /dev/null @@ -1,102 +0,0 @@ -/**@constructor*/ -function ChainNode(object, link) { - this.value = object; - this.link = link; // describes this node's relationship to the previous node -} - -/**@constructor*/ -function Chain(valueLinks) { - this.nodes = []; - this.cursor = -1; - - if (valueLinks && valueLinks.length > 0) { - this.push(valueLinks[0], "//"); - for (var i = 1, l = valueLinks.length; i < l; i+=2) { - this.push(valueLinks[i+1], valueLinks[i]); - } - } -} - -Chain.prototype.push = function(o, link) { - if (this.nodes.length > 0 && link) this.nodes.push(new ChainNode(o, link)); - else this.nodes.push(new ChainNode(o)); -} - -Chain.prototype.unshift = function(o, link) { - if (this.nodes.length > 0 && link) this.nodes[0].link = link; - this.nodes.unshift(new ChainNode(o)); - this.cursor++; -} - -Chain.prototype.get = function() { - if (this.cursor < 0 || this.cursor > this.nodes.length-1) return null; - return this.nodes[this.cursor]; -} - -Chain.prototype.first = function() { - this.cursor = 0; - return this.get(); -} - -Chain.prototype.last = function() { - this.cursor = this.nodes.length-1; - return this.get(); -} - -Chain.prototype.next = function() { - this.cursor++; - return this.get(); -} - -Chain.prototype.prev = function() { - this.cursor--; - return this.get(); -} - -Chain.prototype.toString = function() { - var string = ""; - for (var i = 0, l = this.nodes.length; i < l; i++) { - if (this.nodes[i].link) string += " -("+this.nodes[i].link+")-> "; - string += this.nodes[i].value.toString(); - } - return string; -} - -Chain.prototype.joinLeft = function() { - var result = ""; - for (var i = 0, l = this.cursor; i < l; i++) { - if (result && this.nodes[i].link) result += this.nodes[i].link; - result += this.nodes[i].value.toString(); - } - return result; -} - - -/* USAGE: - -var path = "one/two/three.four/five-six"; -var pathChain = new Chain(path.split(/([\/.-])/)); -print(pathChain); - -var lineage = new Chain(); -lineage.push("Port"); -lineage.push("Les", "son"); -lineage.push("Dawn", "daughter"); -lineage.unshift("Purdie", "son"); - -print(lineage); - -// walk left -for (var node = lineage.last(); node !== null; node = lineage.prev()) { - print("< "+node.value); -} - -// walk right -var node = lineage.first() -while (node !== null) { - print(node.value); - node = lineage.next(); - if (node && node.link) print("had a "+node.link+" named"); -} - -*/ \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/frame/Dumper.js b/lib/jsdoc-toolkit/app/frame/Dumper.js deleted file mode 100644 index d8b007b1..00000000 --- a/lib/jsdoc-toolkit/app/frame/Dumper.js +++ /dev/null @@ -1,144 +0,0 @@ -/** - * @class -
-This is a lightly modified version of Kevin Jones' JavaScript
-library Data.Dump. To download the original visit:
-    http://openjsan.org/doc/k/ke/kevinj/Data/Dump/
-
-AUTHORS
-
-The Data.Dump JavaScript module is written by Kevin Jones 
-(kevinj@cpan.org), based on Data::Dump by Gisle Aas (gisle@aas.no),
-based on Data::Dumper by Gurusamy Sarathy (gsar@umich.edu).
-
-COPYRIGHT
-
-Copyright 2007 Kevin Jones. Copyright 1998-2000,2003-2004 Gisle Aas.
-Copyright 1996-1998 Gurusamy Sarathy.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the Perl Artistic License
-
-See http://www.perl.com/perl/misc/Artistic.html
-
- * @static - */ -Dumper = { - /** @param [...] The objects to dump. */ - dump: function () { - if (arguments.length > 1) - return this._dump(arguments); - else if (arguments.length == 1) - return this._dump(arguments[0]); - else - return "()"; - }, - - _dump: function (obj) { - if (typeof obj == 'undefined') return 'undefined'; - var out; - if (obj.serialize) { return obj.serialize(); } - var type = this._typeof(obj); - if (obj.circularReference) obj.circularReference++; - switch (type) { - case 'circular': - out = "{ //circularReference\n}"; - break; - case 'object': - var pairs = new Array; - - for (var prop in obj) { - if (prop != "circularReference" && obj.hasOwnProperty(prop)) { //hide inherited properties - pairs.push(prop + ': ' + this._dump(obj[prop])); - } - } - - out = '{' + this._format_list(pairs) + '}'; - break; - - case 'string': - for (var prop in Dumper.ESC) { - if (Dumper.ESC.hasOwnProperty(prop)) { - obj = obj.replace(prop, Dumper.ESC[prop]); - } - } - - // Escape UTF-8 Strings - if (obj.match(/^[\x00-\x7f]*$/)) { - out = '"' + obj.replace(/\"/g, "\\\"").replace(/([\n\r]+)/g, "\\$1") + '"'; - } - else { - out = "unescape('"+escape(obj)+"')"; - } - break; - - case 'array': - var elems = new Array; - - for (var i=0; i 60 ? '\n' : ' '; - return nl + list.join(',' + nl) + nl; - }, - - _typeof: function (obj) { - if (obj && obj.circularReference && obj.circularReference > 1) return 'circular'; - if (Array.prototype.isPrototypeOf(obj)) return 'array'; - if (Date.prototype.isPrototypeOf(obj)) return 'date'; - if (typeof obj.nodeType != 'undefined') return 'element'; - return typeof(obj); - }, - - _dump_dom: function (obj) { - return '"' + Dumper.nodeTypes[obj.nodeType] + '"'; - } -}; - -Dumper.ESC = { - "\t": "\\t", - "\n": "\\n", - "\f": "\\f" -}; - -Dumper.nodeTypes = { - 1: "ELEMENT_NODE", - 2: "ATTRIBUTE_NODE", - 3: "TEXT_NODE", - 4: "CDATA_SECTION_NODE", - 5: "ENTITY_REFERENCE_NODE", - 6: "ENTITY_NODE", - 7: "PROCESSING_INSTRUCTION_NODE", - 8: "COMMENT_NODE", - 9: "DOCUMENT_NODE", - 10: "DOCUMENT_TYPE_NODE", - 11: "DOCUMENT_FRAGMENT_NODE", - 12: "NOTATION_NODE" -}; \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/frame/Hash.js b/lib/jsdoc-toolkit/app/frame/Hash.js deleted file mode 100644 index 62cfad64..00000000 --- a/lib/jsdoc-toolkit/app/frame/Hash.js +++ /dev/null @@ -1,84 +0,0 @@ -/** - @constructor - @example - var _index = new Hash(); - _index.set("a", "apple"); - _index.set("b", "blue"); - _index.set("c", "coffee"); - - for (var p = _index.first(); p; p = _index.next()) { - print(p.key+" is for "+p.value); - } - - */ -var Hash = function() { - this._map = {}; - this._keys = []; - this._vals = []; - this.reset(); -} - -Hash.prototype.set = function(k, v) { - if (k != "") { - this._keys.push(k); - this._map["="+k] = this._vals.length; - this._vals.push(v); - } -} - -Hash.prototype.replace = function(k, k2, v) { - if (k == k2) return; - - var offset = this._map["="+k]; - this._keys[offset] = k2; - if (typeof v != "undefined") this._vals[offset] = v; - this._map["="+k2] = offset; - delete(this._map["="+k]); -} - -Hash.prototype.drop = function(k) { - if (k != "") { - var offset = this._map["="+k]; - this._keys.splice(offset, 1); - this._vals.splice(offset, 1); - delete(this._map["="+k]); - for (var p in this._map) { - if (this._map[p] >= offset) this._map[p]--; - } - if (this._cursor >= offset && this._cursor > 0) this._cursor--; - } -} - -Hash.prototype.get = function(k) { - if (k != "") { - return this._vals[this._map["="+k]]; - } -} - -Hash.prototype.keys = function() { - return this._keys; -} - -Hash.prototype.hasKey = function(k) { - if (k != "") { - return (typeof this._map["="+k] != "undefined"); - } -} - -Hash.prototype.values = function() { - return this._vals; -} - -Hash.prototype.reset = function() { - this._cursor = 0; -} - -Hash.prototype.first = function() { - this.reset(); - return this.next(); -} - -Hash.prototype.next = function() { - if (this._cursor++ < this._keys.length) - return {key: this._keys[this._cursor-1], value: this._vals[this._cursor-1]}; -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/frame/Link.js b/lib/jsdoc-toolkit/app/frame/Link.js deleted file mode 100644 index 1e6241bf..00000000 --- a/lib/jsdoc-toolkit/app/frame/Link.js +++ /dev/null @@ -1,173 +0,0 @@ -/** Handle the creation of HTML links to documented symbols. - @constructor -*/ -function Link() { - this.alias = ""; - this.src = ""; - this.file = ""; - this.text = ""; - this.innerName = ""; - this.classLink = false; - this.targetName = ""; - - this.target = function(targetName) { - if (defined(targetName)) this.targetName = targetName; - return this; - } - this.inner = function(inner) { - if (defined(inner)) this.innerName = inner; - return this; - } - this.withText = function(text) { - if (defined(text)) this.text = text; - return this; - } - this.toSrc = function(filename) { - if (defined(filename)) this.src = filename; - return this; - } - this.toSymbol = function(alias) { - if (defined(alias)) this.alias = new String(alias); - return this; - } - this.toClass = function(alias) { - this.classLink = true; - return this.toSymbol(alias); - } - this.toFile = function(file) { - if (defined(file)) this.file = file; - return this; - } - - this.toString = function() { - var linkString; - var thisLink = this; - - if (this.alias) { - linkString = this.alias.replace(/(^|[^a-z$0-9_#.:^-])([|a-z$0-9_#.:^-]+)($|[^a-z$0-9_#.:^-])/i, - function(match, prematch, symbolName, postmatch) { - var symbolNames = symbolName.split("|"); - var links = []; - for (var i = 0, l = symbolNames.length; i < l; i++) { - thisLink.alias = symbolNames[i]; - links.push(thisLink._makeSymbolLink(symbolNames[i])); - } - return prematch+links.join("|")+postmatch; - } - ); - } - else if (this.src) { - linkString = thisLink._makeSrcLink(this.src); - } - else if (this.file) { - linkString = thisLink._makeFileLink(this.file); - } - - return linkString; - } -} - -/** prefixed for hashes */ -Link.hashPrefix = ""; - -/** Appended to the front of relative link paths. */ -Link.base = ""; - -Link.symbolNameToLinkName = function(symbol) { - var linker = "", - ns = ""; - - if (symbol.isStatic) linker = "."; - else if (symbol.isInner) linker = "-"; - - if (symbol.isEvent && !/^event:/.test(symbol.name)) { - ns = "event:"; - } - return Link.hashPrefix+linker+ns+symbol.name; -} - -Link.getSymbol= function(alias) { - var symbol= Link.symbolSet.getSymbol(alias); - - if (symbol) - return symbol; - - if ('#'!==alias.charAt(0) || !Link.currentSymbol) - return null; - - // resolve relative name - var container= Link.currentSymbol; - - while (container) - { - symbol= Link.symbolSet.getSymbol(container.alias + alias); - if (symbol) - return symbol; - - // No superclass - if (!container.augments.length) - return null; - - container= Link.symbolSet.getSymbol(container.augments[0].desc); - } - - return null; -} - -/** Create a link to another symbol. */ -Link.prototype._makeSymbolLink = function(alias) { - var linkBase = Link.base+publish.conf.symbolsDir; - var linkTo = Link.getSymbol(alias); - var linkPath; - var target = (this.targetName)? " target=\""+this.targetName+"\"" : ""; - - // if there is no symbol by that name just return the name unaltered - if (!linkTo) - return this.text || alias; - - // it's a symbol in another file - else { - if (!linkTo.is("CONSTRUCTOR") && !linkTo.isNamespace) { // it's a method or property - linkPath= (Link.filemap) ? Link.filemap[linkTo.memberOf] : - escape(linkTo.memberOf) || "_global_"; - linkPath += publish.conf.ext + "#" + Link.symbolNameToLinkName(linkTo); - } - else { - linkPath = (Link.filemap)? Link.filemap[linkTo.alias] : escape(linkTo.alias); - linkPath += publish.conf.ext;// + (this.classLink? "":"#" + Link.hashPrefix + "constructor"); - } - linkPath = linkBase + linkPath - } - - var linkText= this.text || alias; - - var link = {linkPath: linkPath, linkText: linkText, linkInner: (this.innerName? "#"+this.innerName : "")}; - - if (typeof JSDOC.PluginManager != "undefined") { - JSDOC.PluginManager.run("onSymbolLink", link); - } - - return ""+link.linkText+""; -} - -/** Create a link to a source file. */ -Link.prototype._makeSrcLink = function(srcFilePath) { - var target = (this.targetName)? " target=\""+this.targetName+"\"" : ""; - - // transform filepath into a filename - var srcFile = srcFilePath.replace(/\.\.?[\\\/]/g, "").replace(/[:\\\/]/g, "_"); - var outFilePath = Link.base + publish.conf.srcDir + srcFile + publish.conf.ext; - - if (!this.text) this.text = FilePath.fileName(srcFilePath); - return ""+this.text+""; -} - -/** Create a link to a source file. */ -Link.prototype._makeFileLink = function(filePath) { - var target = (this.targetName)? " target=\""+this.targetName+"\"" : ""; - - var outFilePath = Link.base + filePath; - - if (!this.text) this.text = filePath; - return ""+this.text+""; -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/frame/Namespace.js b/lib/jsdoc-toolkit/app/frame/Namespace.js deleted file mode 100644 index fa1e41d1..00000000 --- a/lib/jsdoc-toolkit/app/frame/Namespace.js +++ /dev/null @@ -1,10 +0,0 @@ -_global_ = this; - -function Namespace(name, f) { - var n = name.split("."); - for (var o = _global_, i = 0, l = n.length; i < l; i++) { - o = o[n[i]] = o[n[i]] || {}; - } - - if (f) f(); -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/frame/Opt.js b/lib/jsdoc-toolkit/app/frame/Opt.js deleted file mode 100644 index 352f1590..00000000 --- a/lib/jsdoc-toolkit/app/frame/Opt.js +++ /dev/null @@ -1,134 +0,0 @@ -/** @namespace */ -Opt = { - /** - * Get commandline option values. - * @param {Array} args Commandline arguments. Like ["-a=xml", "-b", "--class=new", "--debug"] - * @param {object} optNames Map short names to long names. Like {a:"accept", b:"backtrace", c:"class", d:"debug"}. - * @return {object} Short names and values. Like {a:"xml", b:true, c:"new", d:true} - */ - get: function(args, optNames) { - var opt = {"_": []}; // the unnamed option allows multiple values - for (var i = 0; i < args.length; i++) { - var arg = new String(args[i]); - var name; - var value; - if (arg.charAt(0) == "-") { - if (arg.charAt(1) == "-") { // it's a longname like --foo - arg = arg.substring(2); - var m = arg.split("="); - name = m.shift(); - value = m.shift(); - if (typeof value == "undefined") value = true; - - for (var n in optNames) { // convert it to a shortname - if (name == optNames[n]) { - name = n; - } - } - } - else { // it's a shortname like -f - arg = arg.substring(1); - var m = arg.split("="); - name = m.shift(); - value = m.shift(); - if (typeof value == "undefined") value = true; - - for (var n in optNames) { // find the matching key - if (name == n || name+'[]' == n) { - name = n; - break; - } - } - } - if (name.match(/(.+)\[\]$/)) { // it's an array type like n[] - name = RegExp.$1; - if (!opt[name]) opt[name] = []; - } - - if (opt[name] && opt[name].push) { - opt[name].push(value); - } - else { - opt[name] = value; - } - } - else { // not associated with any optname - opt._.push(args[i]); - } - } - return opt; - } -} - -/*t: - plan(11, "Testing Opt."); - - is( - typeof Opt, - "object", - "Opt is an object." - ); - - is( - typeof Opt.get, - "function", - "Opt.get is a function." - ); - - var optNames = {a:"accept", b:"backtrace", c:"class", d:"debug", "e[]":"exceptions"}; - var t_options = Opt.get(["-a=xml", "-b", "--class=new", "--debug", "-e=one", "-e=two", "foo", "bar"], optNames); - - is( - t_options.a, - "xml", - "an option defined with a short name can be accessed by its short name." - ); - - is( - t_options.b, - true, - "an option defined with a short name and no value are true." - ); - - is( - t_options.c, - "new", - "an option defined with a long name can be accessed by its short name." - ); - - is( - t_options.d, - true, - "an option defined with a long name and no value are true." - ); - - is( - typeof t_options.e, - "object", - "an option that can accept multiple values is defined." - ); - - is( - t_options.e.length, - 2, - "an option that can accept multiple values can have more than one value." - ); - - is( - t_options.e[1], - "two", - "an option that can accept multiple values can be accessed as an array." - ); - - is( - typeof t_options._, - "object", - "the property '_' is defined for unnamed options." - ); - - is( - t_options._[0], - "foo", - "the property '_' can be accessed as an array." - ); - */ \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/frame/Reflection.js b/lib/jsdoc-toolkit/app/frame/Reflection.js deleted file mode 100644 index 0968f1c6..00000000 --- a/lib/jsdoc-toolkit/app/frame/Reflection.js +++ /dev/null @@ -1,26 +0,0 @@ -/**@constructor*/ -function Reflection(obj) { - this.obj = obj; -} - -Reflection.prototype.getConstructorName = function() { - if (this.obj.constructor.name) return this.obj.constructor.name; - var src = this.obj.constructor.toSource(); - var name = src.substring(name.indexOf("function")+8, src.indexOf('(')).replace(/ /g,''); - return name; -} - -Reflection.prototype.getMethod = function(name) { - for (var p in this.obj) { - if (p == name && typeof(this.obj[p]) == "function") return this.obj[p]; - } - return null; -} - -Reflection.prototype.getParameterNames = function() { - var src = this.obj.toSource(); - src = src.substring( - src.indexOf("(", 8)+1, src.indexOf(")") - ); - return src.split(/, ?/); -} diff --git a/lib/jsdoc-toolkit/app/frame/String.js b/lib/jsdoc-toolkit/app/frame/String.js deleted file mode 100644 index c183c27d..00000000 --- a/lib/jsdoc-toolkit/app/frame/String.js +++ /dev/null @@ -1,93 +0,0 @@ -/** - @name String - @class Additions to the core string object. -*/ - -/** @author Steven Levithan, released as public domain. */ -String.prototype.trim = function() { - var str = this.replace(/^\s+/, ''); - for (var i = str.length - 1; i >= 0; i--) { - if (/\S/.test(str.charAt(i))) { - str = str.substring(0, i + 1); - break; - } - } - return str; -} -/*t: - plan(6, "Testing String.prototype.trim."); - - var s = " a bc ".trim(); - is(s, "a bc", "multiple spaces front and back are trimmed."); - - s = "a bc\n\n".trim(); - is(s, "a bc", "newlines only in back are trimmed."); - - s = "\ta bc".trim(); - is(s, "a bc", "tabs only in front are trimmed."); - - s = "\n \t".trim(); - is(s, "", "an all-space string is trimmed to empty."); - - s = "a b\nc".trim(); - is(s, "a b\nc", "a string with no spaces in front or back is trimmed to itself."); - - s = "".trim(); - is(s, "", "an empty string is trimmed to empty."); - -*/ - -String.prototype.balance = function(open, close) { - var i = 0; - while (this.charAt(i) != open) { - if (i == this.length) return [-1, -1]; - i++; - } - - var j = i+1; - var balance = 1; - while (j < this.length) { - if (this.charAt(j) == open) balance++; - if (this.charAt(j) == close) balance--; - if (balance == 0) break; - j++; - if (j == this.length) return [-1, -1]; - } - - return [i, j]; -} -/*t: - plan(16, "Testing String.prototype.balance."); - - var s = "{abc}".balance("{","}"); - is(s[0], 0, "opener in first is found."); - is(s[1], 4, "closer in last is found."); - - s = "ab{c}de".balance("{","}"); - is(s[0], 2, "opener in middle is found."); - is(s[1], 4, "closer in middle is found."); - - s = "a{b{c}de}f".balance("{","}"); - is(s[0], 1, "nested opener is found."); - is(s[1], 8, "nested closer is found."); - - s = "{}".balance("{","}"); - is(s[0], 0, "opener with no content is found."); - is(s[1], 1, "closer with no content is found."); - - s = "".balance("{","}"); - is(s[0], -1, "empty string opener is -1."); - is(s[1], -1, "empty string closer is -1."); - - s = "{abc".balance("{","}"); - is(s[0], -1, "opener with no closer returns -1."); - is(s[1], -1, "no closer returns -1."); - - s = "abc".balance("{","}"); - is(s[0], -1, "no opener or closer returns -1 for opener."); - is(s[1], -1, "no opener or closer returns -1 for closer."); - - s = "aX11/MIT License - * (See the accompanying README file for full details.) - */ - -/** - Yet another unit testing tool for JavaScript. - @author Michael Mathews micmath@gmail.com - @param {object} testCases Properties are testcase names, values are functions to execute as tests. -*/ -function testrun(testCases) { - var ran = 0; - for (t in testCases) { - var result = testCases[t](); - ran++; - } - - return testrun.reportOut+"-------------------------------\n"+((testrun.fails>0)? ":( Failed "+testrun.fails+"/" : ":) Passed all ")+testrun.count+" test"+((testrun.count == 1)? "":"s")+".\n"; -} - - -testrun.count = 0; -testrun.current = null; -testrun.passes = 0; -testrun.fails = 0; -testrun.reportOut = ""; - -/** @private */ -testrun.report = function(text) { - testrun.reportOut += text+"\n"; -} - -/** - Check if test evaluates to true. - @param {string} test To be evaluated. - @param {string} message Optional. To be displayed in the report. - @return {boolean} True if the string test evaluates to true. -*/ -ok = function(test, message) { - testrun.count++; - - var result; - try { - result = eval(test); - - if (result) { - testrun.passes++; - testrun.report(" OK "+testrun.count+" - "+((message != null)? message : "")); - } - else { - testrun.fails++; - testrun.report("NOT OK "+testrun.count+" - "+((message != null)? message : "")); - } - } - catch(e) { - testrun.fails++ - testrun.report("NOT OK "+testrun.count+" - "+((message != null)? message : "")); - - } -} - -/** - Check if test is same as expected. - @param {string} test To be evaluated. - @param {string} expected - @param {string} message Optional. To be displayed in the report. - @return {boolean} True if (test == expected). Note that the comparison is not a strict equality check. -*/ -is = function(test, expected, message) { - testrun.count++; - - var result; - try { - result = eval(test); - - if (result == expected) { - testrun.passes++ - testrun.report(" OK "+testrun.count+" - "+((message != null)? message : "")); - } - else { - testrun.fails++ - testrun.report("NOT OK "+testrun.count+" - "+((message != null)? message : "")); - testrun.report("expected: "+expected); - testrun.report(" got: "+result); - } - } - catch(e) { - testrun.fails++ - testrun.report("NOT OK "+testrun.count+" - "+((message != null)? message : "")); - testrun.report("expected: "+expected); - testrun.report(" got: "+result);} -} - -/** - Check if test matches pattern. - @param {string} test To be evaluated. - @param {string} pattern Used to create a RegExp. - @param {string} message Optional. To be displayed in the report. - @return {boolean} True if test matches pattern. -*/ -like = function(test, pattern, message) { - testrun.count++; - - var result; - try { - result = eval(test); - var rgx = new RegExp(pattern); - - if (rgx.test(result)) { - testrun.passes++ - testrun.report(" OK "+testrun.count+" - "+((message != null)? message : "")); - } - else { - testrun.fails++ - testrun.report("NOT OK "+testrun.count+" - "+((message != null)? message : "")); - testrun.report(" this: "+result); - testrun.report("is not like: "+pattern); - } - } - catch(e) { - testrun.fails++ - testrun.report("NOT OK "+testrun.count+" - "+((message != null)? message : "")); - } -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/handlers/FOODOC.js b/lib/jsdoc-toolkit/app/handlers/FOODOC.js deleted file mode 100644 index b208f55b..00000000 --- a/lib/jsdoc-toolkit/app/handlers/FOODOC.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - This is the main container for the FOODOC handler. - @namespace -*/ -FOODOC = { -}; - -/** The current version string of this application. */ -FOODOC.VERSION = "1.0"; - -FOODOC.handle = function(srcFile, src) { - LOG.inform("Handling file '" + srcFile + "'"); - - return [ - new JSDOC.Symbol( - "foo", - [], - "VIRTUAL", - new JSDOC.DocComment("/** This is a foo. */") - ) - ]; -}; - -FOODOC.publish = function(symbolgroup) { - LOG.inform("Publishing symbolgroup."); -}; diff --git a/lib/jsdoc-toolkit/app/handlers/XMLDOC.js b/lib/jsdoc-toolkit/app/handlers/XMLDOC.js deleted file mode 100755 index 40f87b35..00000000 --- a/lib/jsdoc-toolkit/app/handlers/XMLDOC.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * This is the main container for the XMLDOC handler. - * @namespace - * @author Brett Fattori (bfattori@fry.com) - * @version $Revision: 498 $ - */ -XMLDOC = { - -}; - -/** The current version string of this application. */ -XMLDOC.VERSION = "1.0"; - -/** Include the library necessary to handle XML files */ -IO.includeDir("handlers/XMLDOC/"); - -/** - * @type Symbol[] - */ -XMLDOC.handle = function(srcFile, src) { - -}; - -XMLDOC.publish = function(symbolgroup) { - -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/handlers/XMLDOC/DomReader.js b/lib/jsdoc-toolkit/app/handlers/XMLDOC/DomReader.js deleted file mode 100755 index 240563da..00000000 --- a/lib/jsdoc-toolkit/app/handlers/XMLDOC/DomReader.js +++ /dev/null @@ -1,159 +0,0 @@ -LOG.inform("XMLDOC.DomReader loaded"); - -XMLDOC.DomReader = function(root) { - - this.dom = root; - - /** - * The current node the reader is on - */ - this.node = root; - - /** - * Get the current node the reader is on - * @type XMLDOC.Parser.node - */ - XMLDOC.DomReader.prototype.getNode = function() { - return this.node; - }; - - /** - * Set the node the reader should be positioned on. - * @param node {XMLDOC.Parser.node} - */ - XMLDOC.DomReader.prototype.setNode = function(node) { - this.node = node; - }; - - /** - * A helper method to make sure the current node will - * never return null, unless null is passed as the root. - * @param step {String} An expression to evaluate - should return a node or null - */ - XMLDOC.DomReader.prototype.navigate = function(step) { - var n; - if ((n = step) != null) - { - this.node = n; - return this.node; - } - return null; - }; - - /** - * Get the root node of the current node's document. - */ - XMLDOC.DomReader.prototype.root = function() { - this.navigate(this.dom); - }; - - /** - * Get the parent of the current node. - */ - XMLDOC.DomReader.prototype.parent = function() { - return this.navigate(this.node.parentNode()); - }; - - /** - * Get the first child of the current node. - */ - XMLDOC.DomReader.prototype.firstChild = function() { - return this.navigate(this.node.firstChild()); - }; - - /** - * Get the last child of the current node. - */ - XMLDOC.DomReader.prototype.lastChild = function() { - return this.navigate(this.node.lastChild()); - }; - - /** - * Get the next sibling of the current node. - */ - XMLDOC.DomReader.prototype.nextSibling = function() { - return this.navigate(this.node.nextSibling()); - }; - - /** - * Get the previous sibling of the current node. - */ - XMLDOC.DomReader.prototype.prevSibling = function() { - return this.navigate(this.node.prevSibling()); - }; - - //=============================================================================================== - // Support methods - - /** - * Walk the tree starting with the current node, calling the plug-in for - * each node visited. Each time the plug-in is called, the DomReader - * is passed as the only parameter. Use the {@link XMLDOC.DomReader#getNode} method - * to access the current node. This method uses a depth first traversal pattern. - * - * @param srcFile {String} The source file being evaluated - */ - XMLDOC.DomReader.prototype.getSymbols = function(srcFile) - { - XMLDOC.DomReader.symbols = []; - XMLDOC.DomReader.currentFile = srcFile; - JSDOC.Symbol.srcFile = (srcFile || ""); - - if (defined(JSDOC.PluginManager)) { - JSDOC.PluginManager.run("onDomGetSymbols", this); - } - - return XMLDOC.DomReader.symbols; - }; - - /** - * Find the node with the given name using a depth first traversal. - * Does not modify the DomReader's current node. - * - * @param name {String} The name of the node to find - * @return the node that was found, or null if not found - */ - XMLDOC.DomReader.prototype.findNode = function(name) - { - var findNode = null; - - // Start at the current node and move into the subtree, - // looking for the node with the given name - function deeper(node, find) - { - var look = null; - - if (node) { - if (node.name == find) - { - return node; - } - - if (node.firstChild()) - { - look = deeper(node.firstChild(), find); - } - - if (!look && node.nextSibling()) - { - look = deeper(node.nextSibling(), find); - } - } - - return look; - } - - return deeper(this.getNode().firstChild(), name); - }; - - /** - * Find the next node with the given name using a depth first traversal. - * - * @param name {String} The name of the node to find - */ - XMLDOC.DomReader.prototype.findPreviousNode = function(name) - { - }; - -}; - diff --git a/lib/jsdoc-toolkit/app/handlers/XMLDOC/XMLDoc.js b/lib/jsdoc-toolkit/app/handlers/XMLDOC/XMLDoc.js deleted file mode 100755 index e9b3e3ce..00000000 --- a/lib/jsdoc-toolkit/app/handlers/XMLDOC/XMLDoc.js +++ /dev/null @@ -1,16 +0,0 @@ -LOG.inform("XMLDOC.symbolize loaded"); - -/** - * Convert the source file to a set of symbols - */ -XMLDOC.symbolize = function(srcFile, src) { - - LOG.inform("Symbolizing file '" + srcFile + "'"); - - // XML files already have a defined structure, so we don't need to - // do anything but parse them. The DOM reader can create a symbol - // table from the parsed XML. - var dr = new XMLDOC.DomReader(XMLDOC.Parser.parse(src)); - return dr.getSymbols(srcFile); - -}; diff --git a/lib/jsdoc-toolkit/app/handlers/XMLDOC/XMLParse.js b/lib/jsdoc-toolkit/app/handlers/XMLDOC/XMLParse.js deleted file mode 100755 index 78e8f455..00000000 --- a/lib/jsdoc-toolkit/app/handlers/XMLDOC/XMLParse.js +++ /dev/null @@ -1,292 +0,0 @@ -LOG.inform("XMLDOC.Parser loaded"); - -/** - * XML Parser object. Returns an {@link #XMLDOC.Parser.node} which is - * the root element of the parsed document. - *

- * By default, this parser will only handle well formed XML. To - * allow the parser to handle HTML, set the XMLDOC.Parser.strictMode - * variable to false before calling XMLDOC.Parser.parse(). - *

- * Note: If you pass poorly formed XML, it will cause the parser to throw - * an exception. - * - * @author Brett Fattori (bfattori@fry.com) - * @author $Author: micmath $ - * @version $Revision: 497 $ - */ -XMLDOC.Parser = {}; - -/** - * Strict mode setting. Setting this to false allows HTML-style source to - * be parsed. Normally, well formed XML has defined end tags, or empty tags - * are properly formed. Default: true - * @type Boolean - */ -XMLDOC.Parser.strictMode = true; - -/** - * A node in an XML Document. Node types are ROOT, ELEMENT, COMMENT, PI, and TEXT. - * @param parent {XMLDOC.Parser.node} The parent node - * @param name {String} The node name - * @param type {String} One of the types - */ -XMLDOC.Parser.node = function(parent, name, type) -{ - this.name = name; - this.type = type || "ELEMENT"; - this.parent = parent; - this.charData = ""; - this.attrs = {}; - this.nodes = []; - this.cPtr = 0; - - XMLDOC.Parser.node.prototype.getAttributeNames = function() { - var a = []; - for (var o in this.attrs) - { - a.push(o); - } - - return a; - }; - - XMLDOC.Parser.node.prototype.getAttribute = function(attr) { - return this.attrs[attr]; - }; - - XMLDOC.Parser.node.prototype.setAttribute = function(attr, val) { - this.attrs[attr] = val; - }; - - XMLDOC.Parser.node.prototype.getChild = function(idx) { - return this.nodes[idx]; - }; - - XMLDOC.Parser.node.prototype.parentNode = function() { - return this.parent; - }; - - XMLDOC.Parser.node.prototype.firstChild = function() { - return this.nodes[0]; - }; - - XMLDOC.Parser.node.prototype.lastChild = function() { - return this.nodes[this.nodes.length - 1]; - }; - - XMLDOC.Parser.node.prototype.nextSibling = function() { - var p = this.parent; - if (p && (p.nodes.indexOf(this) + 1 != p.nodes.length)) - { - return p.getChild(p.nodes.indexOf(this) + 1); - } - return null; - }; - - XMLDOC.Parser.node.prototype.prevSibling = function() { - var p = this.parent; - if (p && (p.nodes.indexOf(this) - 1 >= 0)) - { - return p.getChild(p.nodes.indexOf(this) - 1); - } - return null; - }; -}; - -/** - * Parse an XML Document from the specified source. The XML should be - * well formed, unless strict mode is disabled, then the parser will - * handle HTML-style XML documents. - * @param src {String} The source to parse - */ -XMLDOC.Parser.parse = function(src) -{ - var A = []; - - // Normailize whitespace - A = src.split("\r\n"); - src = A.join("\n"); - A = src.split("\r"); - src = A.join("\n"); - - // Remove XML and DOCTYPE specifier - src.replace(/<\?XML .*\?>/i, ""); - src.replace(//i, ""); - - // The document is the root node and cannot be modified or removed - var doc = new XMLDOC.Parser.node(null, "ROOT", "DOCUMENT"); - - // Let's break it down - XMLDOC.Parser.eat(doc, src); - - return doc; -}; - -/** - * The XML fragment processing routine. This method is private and should not be called - * directly. - * @param parentNode {XMLDOC.Parser.node} The node which is the parent of this fragment - * @param src {String} The source within the fragment to process - * @private - */ -XMLDOC.Parser.eat = function(parentNode, src) -{ - // A simple tag def - var reTag = new RegExp("<(!|)(\\?|--|)((.|\\s)*?)\\2>","g"); - - // Special tag types - var reCommentTag = //; - var rePITag = /<\?((.|\s)*?)\?>/; - - // A start tag (with potential empty marker) - var reStartTag = /<(.*?)( +([\w_\-]*)=(\"|')(.*)\4)*(\/)?>/; - - // An empty HTML style tag (not proper XML, but we'll accept it so we can process HTML) - var reHTMLEmptyTag = /<(.*?)( +([\w_\-]*)=(\"|')(.*)\4)*>/; - - // Fully enclosing tag with nested tags - var reEnclosingTag = /<(.*?)( +([\w_\-]*)=(\"|')(.*?)\4)*>((.|\s)*?)<\/\1>/; - - // Breaks down attributes - var reAttributes = new RegExp(" +([\\w_\\-]*)=(\"|')(.*?)\\2","g"); - - // Find us a tag - var tag; - while ((tag = reTag.exec(src)) != null) - { - if (tag.index > 0) - { - // The next tag has some text before it - var text = src.substring(0, tag.index).replace(/^[ \t\n]+((.|\n)*?)[ \t\n]+$/, "$1"); - - if (text.length > 0 && (text != "\n")) - { - var txtnode = new XMLDOC.Parser.node(parentNode, "", "TEXT"); - txtnode.charData = text; - - // Append the new text node - parentNode.nodes.push(txtnode); - } - - // Reset the lastIndex of reTag - reTag.lastIndex -= src.substring(0, tag.index).length; - - // Eat the text - src = src.substring(tag.index); - } - - if (reCommentTag.test(tag[0])) - { - // Is this a comment? - var comment = new XMLDOC.Parser.node(parentNode, "", "COMMENT"); - comment.charData = reCommentTag.exec(tag[0])[1]; - - // Append the comment - parentNode.nodes.push(comment); - - // Move the lastIndex of reTag - reTag.lastIndex -= tag[0].length; - - // Eat the tag - src = src.replace(reCommentTag, ""); - } - else if (rePITag.test(tag[0])) - { - // Is this a processing instruction? - var pi = new XMLDOC.Parser.node(parentNode, "", "PI"); - pi.charData = rePITag.exec(tag[0])[1]; - - // Append the processing instruction - parentNode.nodes.push(pi); - - // Move the lastIndex of reTag - reTag.lastIndex -= tag[0].length; - - // Eat the tag - src = src.replace(rePITag, ""); - } - else if (reStartTag.test(tag[0])) - { - // Break it down - var e = reStartTag.exec(tag[0]); - var elem = new XMLDOC.Parser.node(parentNode, e[1], "ELEMENT"); - - // Get attributes from the tag - var a; - while ((a = reAttributes.exec(e[2])) != null ) - { - elem.attrs[a[1]] = a[3]; - } - - // Is this an empty XML-style tag? - if (e[6] == "/") - { - // Append the empty element - parentNode.nodes.push(elem); - - // Move the lastIndex of reTag (include the start tag length) - reTag.lastIndex -= e[0].length; - - // Eat the tag - src = src.replace(reStartTag, ""); - } - else - { - // Check for malformed XML tags - var htmlParsed = false; - var htmlStartTag = reHTMLEmptyTag.exec(src); - - // See if there isn't an end tag within this block - var reHTMLEndTag = new RegExp(""); - var htmlEndTag = reHTMLEndTag.exec(src); - - if (XMLDOC.Parser.strictMode && htmlEndTag == null) - { - // Poorly formed XML fails in strict mode - var err = new Error("Malformed XML passed to XMLDOC.Parser... Error contains malformed 'src'"); - err.src = src; - throw err; - } - else if (htmlEndTag == null) - { - // This is an HTML-style empty tag, store the element for it in non-strict mode - parentNode.nodes.push(elem); - - // Eat the tag - src = src.replace(reHTMLEmptyTag, ""); - htmlParsed = true; - } - - // If we didn't parse HTML-style, it must be an enclosing tag - if (!htmlParsed) - { - var enc = reEnclosingTag.exec(src); - - // Go deeper into the document - XMLDOC.Parser.eat(elem, enc[6]); - - // Append the new element node - parentNode.nodes.push(elem); - - // Eat the tag - src = src.replace(reEnclosingTag, ""); - } - } - - // Reset the lastIndex of reTag - reTag.lastIndex = 0; - } - } - - // No tag was found... append the text if there is any - src = src.replace(/^[ \t\n]+((.|\n)*?)[ \t\n]+$/, "$1"); - if (src.length > 0 && (src != "\n")) - { - var txtNode = new XMLDOC.Parser.node(parentNode, "", "TEXT"); - txtNode.charData = src; - - // Append the new text node - parentNode.nodes.push(txtNode); - } -}; diff --git a/lib/jsdoc-toolkit/app/lib/JSDOC.js b/lib/jsdoc-toolkit/app/lib/JSDOC.js deleted file mode 100644 index 5de7b9ef..00000000 --- a/lib/jsdoc-toolkit/app/lib/JSDOC.js +++ /dev/null @@ -1,106 +0,0 @@ -/** - @overview - @date $Date: 2010-06-13 22:02:44 +0100 (Sun, 13 Jun 2010) $ - @version $Revision: 837 $ - @location $HeadURL: https://jsdoc-toolkit.googlecode.com/svn/tags/jsdoc_toolkit-2.4.0/jsdoc-toolkit/app/lib/JSDOC.js $ - @name JSDOC.js - */ - -/** - This is the main container for the JSDOC application. - @namespace -*/ -JSDOC = { -}; - -/** - @requires Opt - */ -if (typeof arguments == "undefined") arguments = []; -JSDOC.opt = Opt.get( - arguments, - { - a: "allfunctions", - c: "conf", - d: "directory", - "D[]": "define", - e: "encoding", - "E[]": "exclude", - h: "help", - m: "multiple", - n: "nocode", - o: "out", - p: "private", - q: "quiet", - r: "recurse", - S: "securemodules", - s: "suppress", - t: "template", - T: "testmode", - u: "unique", - v: "verbose", - x: "ext" - } -); - -/** The current version string of this application. */ -JSDOC.VERSION = "2.4.0"; - -/** Print out usage information and quit. */ -JSDOC.usage = function() { - print("USAGE: java -jar jsrun.jar app/run.js [OPTIONS] ..."); - print(""); - print("OPTIONS:"); - print(" -a or --allfunctions\n Include all functions, even undocumented ones.\n"); - print(" -c or --conf\n Load a configuration file.\n"); - print(" -d= or --directory=\n Output to this directory (defaults to \"out\").\n"); - print(" -D=\"myVar:My value\" or --define=\"myVar:My value\"\n Multiple. Define a variable, available in JsDoc as JSDOC.opt.D.myVar.\n"); - print(" -e= or --encoding=\n Use this encoding to read and write files.\n"); - print(" -E=\"REGEX\" or --exclude=\"REGEX\"\n Multiple. Exclude files based on the supplied regex.\n"); - print(" -h or --help\n Show this message and exit.\n"); - print(" -m or --multiples\n Don't warn about symbols being documented more than once.\n"); - print(" -n or --nocode\n Ignore all code, only document comments with @name tags.\n"); - print(" -o= or --out=\n Print log messages to a file (defaults to stdout).\n"); - print(" -p or --private\n Include symbols tagged as private, underscored and inner symbols.\n"); - print(" -q or --quiet\n Do not output any messages, not even warnings.\n"); - print(" -r= or --recurse=\n Descend into src directories.\n"); - print(" -s or --suppress\n Suppress source code output.\n"); - print(" -S or --securemodules\n Use Secure Modules mode to parse source code.\n"); - print(" -t= or --template=\n Required. Use this template to format the output.\n"); - print(" -T or --test\n Run all unit tests and exit.\n"); - print(" -u or --unique\n Force file names to be unique, but not based on symbol names.\n"); - print(" -v or --verbose\n Provide verbose feedback about what is happening.\n"); - print(" -x=[,EXT]... or --ext=[,EXT]...\n Scan source files with the given extension/s (defaults to js).\n"); - - quit(); -} - -/*t: - plan(4, "Testing JSDOC namespace."); - - is( - typeof JSDOC, - "object", - "JSDOC.usage is a function." - ); - - is( - typeof JSDOC.VERSION, - "string", - "JSDOC.VERSION is a string." - ); - - is( - typeof JSDOC.usage, - "function", - "JSDOC.usage is a function." - ); - - is( - typeof JSDOC.opt, - "object", - "JSDOC.opt is a object." - ); - */ - -if (this.IO) IO.includeDir("lib/JSDOC/"); diff --git a/lib/jsdoc-toolkit/app/lib/JSDOC/DocComment.js b/lib/jsdoc-toolkit/app/lib/JSDOC/DocComment.js deleted file mode 100644 index 4b21cd71..00000000 --- a/lib/jsdoc-toolkit/app/lib/JSDOC/DocComment.js +++ /dev/null @@ -1,204 +0,0 @@ -if (typeof JSDOC == "undefined") JSDOC = {}; - -/** - Create a new DocComment. This takes a raw documentation comment, - and wraps it in useful accessors. - @class Represents a documentation comment object. - */ -JSDOC.DocComment = function(/**String*/comment) { - this.init(); - if (typeof comment != "undefined") { - this.parse(comment); - } -} - -JSDOC.DocComment.prototype.init = function() { - this.isUserComment = true; - this.src = ""; - this.meta = ""; - this.tagTexts = []; - this.tags = []; -} - -/** - @requires JSDOC.DocTag - */ -JSDOC.DocComment.prototype.parse = function(/**String*/comment) { - if (comment == "") { - comment = "/** @desc */"; - this.isUserComment = false; - } - - this.src = JSDOC.DocComment.unwrapComment(comment); - - this.meta = ""; - if (this.src.indexOf("#") == 0) { - this.src.match(/#(.+[+-])([\s\S]*)$/); - if (RegExp.$1) this.meta = RegExp.$1; - if (RegExp.$2) this.src = RegExp.$2; - } - - if (typeof JSDOC.PluginManager != "undefined") { - JSDOC.PluginManager.run("onDocCommentSrc", this); - } - - this.fixDesc(); - - this.src = JSDOC.DocComment.shared+"\n"+this.src; - - this.tagTexts = - this.src - .split(/(^|[\r\n])\s*@/) - .filter(function($){return $.match(/\S/)}); - - /** - The tags found in the comment. - @type JSDOC.DocTag[] - */ - this.tags = this.tagTexts.map(function($){return new JSDOC.DocTag($)}); - - if (typeof JSDOC.PluginManager != "undefined") { - JSDOC.PluginManager.run("onDocCommentTags", this); - } -} - -/*t: - plan(5, "testing JSDOC.DocComment"); - requires("../frame/String.js"); - requires("../lib/JSDOC/DocTag.js"); - - var com = new JSDOC.DocComment("/**@foo some\n* comment here*"+"/"); - is(com.tagTexts[0], "foo some\ncomment here", "first tag text is found."); - is(com.tags[0].title, "foo", "the title is found in a comment with one tag."); - - var com = new JSDOC.DocComment("/** @foo first\n* @bar second*"+"/"); - is(com.getTag("bar").length, 1, "getTag() returns one tag by that title."); - - JSDOC.DocComment.shared = "@author John Smith"; - var com = new JSDOC.DocComment("/**@foo some\n* comment here*"+"/"); - is(com.tags[0].title, "author", "shared comment is added."); - is(com.tags[1].title, "foo", "shared comment is added to existing tag."); -*/ - -/** - If no @desc tag is provided, this function will add it. - */ -JSDOC.DocComment.prototype.fixDesc = function() { - if (this.meta && this.meta != "@+") return; - if (/^\s*[^@\s]/.test(this.src)) { - this.src = "@desc "+this.src; - } -} - -/*t: - plan(5, "testing JSDOC.DocComment#fixDesc"); - - var com = new JSDOC.DocComment(); - - com.src = "this is a desc\n@author foo"; - com.fixDesc(); - is(com.src, "@desc this is a desc\n@author foo", "if no @desc tag is provided one is added."); - - com.src = "x"; - com.fixDesc(); - is(com.src, "@desc x", "if no @desc tag is provided one is added to a single character."); - - com.src = "\nx"; - com.fixDesc(); - is(com.src, "@desc \nx", "if no @desc tag is provided one is added to return and character."); - - com.src = " "; - com.fixDesc(); - is(com.src, " ", "if no @desc tag is provided one is not added to just whitespace."); - - com.src = ""; - com.fixDesc(); - is(com.src, "", "if no @desc tag is provided one is not added to empty."); -*/ - -/** - Remove slash-star comment wrapper from a raw comment string. - @type String - */ -JSDOC.DocComment.unwrapComment = function(/**String*/comment) { - if (!comment) return ""; - var unwrapped = comment.replace(/(^\/\*\*|\*\/$)/g, "").replace(/^\s*\* ?/gm, ""); - return unwrapped; -} - -/*t: - plan(5, "testing JSDOC.DocComment.unwrapComment"); - - var com = "/**x*"+"/"; - var unwrapped = JSDOC.DocComment.unwrapComment(com); - is(unwrapped, "x", "a single character jsdoc is found."); - - com = "/***x*"+"/"; - unwrapped = JSDOC.DocComment.unwrapComment(com); - is(unwrapped, "x", "three stars are allowed in the opener."); - - com = "/****x*"+"/"; - unwrapped = JSDOC.DocComment.unwrapComment(com); - is(unwrapped, "*x", "fourth star in the opener is kept."); - - com = "/**x\n * y\n*"+"/"; - unwrapped = JSDOC.DocComment.unwrapComment(com); - is(unwrapped, "x\ny\n", "leading stars and spaces are trimmed."); - - com = "/**x\n * y\n*"+"/"; - unwrapped = JSDOC.DocComment.unwrapComment(com); - is(unwrapped, "x\n y\n", "only first space after leading stars are trimmed."); -*/ - -/** - Provides a printable version of the comment. - @type String - */ -JSDOC.DocComment.prototype.toString = function() { - return this.src; -} - -/*t: - plan(1, "testing JSDOC.DocComment#fixDesc"); - var com = new JSDOC.DocComment(); - com.src = "foo"; - is(""+com, "foo", "stringifying a comment returns the unwrapped src."); -*/ - -/** - Given the title of a tag, returns all tags that have that title. - @type JSDOC.DocTag[] - */ -JSDOC.DocComment.prototype.getTag = function(/**String*/tagTitle) { - return this.tags.filter(function($){return $.title == tagTitle}); -} - -JSDOC.DocComment.prototype.deleteTag = function(/**String*/tagTitle) { - this.tags = this.tags.filter(function($){return $.title != tagTitle}) -} - -/*t: - plan(1, "testing JSDOC.DocComment#getTag"); - requires("../frame/String.js"); - requires("../lib/JSDOC/DocTag.js"); - - var com = new JSDOC.DocComment("/**@foo some\n* @bar\n* @bar*"+"/"); - is(com.getTag("bar").length, 2, "getTag returns expected number of tags."); -*/ - -/** - Used to store the currently shared tag text. -*/ -JSDOC.DocComment.shared = ""; - -/*t: - plan(2, "testing JSDOC.DocComment.shared"); - requires("../frame/String.js"); - requires("../lib/JSDOC/DocTag.js"); - - JSDOC.DocComment.shared = "@author Michael"; - - var com = new JSDOC.DocComment("/**@foo\n* @foo*"+"/"); - is(com.getTag("author").length, 1, "getTag returns shared tag."); - is(com.getTag("foo").length, 2, "getTag returns unshared tags too."); -*/ \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/lib/JSDOC/DocTag.js b/lib/jsdoc-toolkit/app/lib/JSDOC/DocTag.js deleted file mode 100644 index 77ec07ca..00000000 --- a/lib/jsdoc-toolkit/app/lib/JSDOC/DocTag.js +++ /dev/null @@ -1,294 +0,0 @@ -if (typeof JSDOC == "undefined") JSDOC = {}; - -/** - @constructor - */ -JSDOC.DocTag = function(src) { - this.init(); - if (typeof src != "undefined") { - this.parse(src); - } -} - -/** - Create and initialize the properties of this. - */ -JSDOC.DocTag.prototype.init = function() { - this.title = ""; - this.type = ""; - this.name = ""; - this.isOptional = false; - this.defaultValue = ""; - this.desc = ""; - - return this; -} - -/** - Populate the properties of this from the given tag src. - @param {string} src - */ -JSDOC.DocTag.prototype.parse = function(src) { - if (typeof src != "string") throw "src must be a string not "+(typeof src); - - try { - src = this.nibbleTitle(src); - if (JSDOC.PluginManager) { - JSDOC.PluginManager.run("onDocTagSynonym", this); - } - - src = this.nibbleType(src); - - // only some tags are allowed to have names. - if (this.title == "param" || this.title == "property" || this.title == "config") { // @config is deprecated - src = this.nibbleName(src); - } - } - catch(e) { - if (LOG) LOG.warn(e); - else throw e; - } - this.desc = src; // whatever is left - - // example tags need to have whitespace preserved - if (this.title != "example") this.desc = this.desc.trim(); - - if (JSDOC.PluginManager) { - JSDOC.PluginManager.run("onDocTag", this); - } -} - -/** - Automatically called when this is stringified. - */ -JSDOC.DocTag.prototype.toString = function() { - return this.desc; -} - -/*t: - plan(1, "testing JSDOC.DocTag#toString"); - - var tag = new JSDOC.DocTag("param {object} date A valid date."); - is(""+tag, "A valid date.", "stringifying a tag returns the desc."); - */ - -/** - Find and shift off the title of a tag. - @param {string} src - @return src - */ -JSDOC.DocTag.prototype.nibbleTitle = function(src) { - if (typeof src != "string") throw "src must be a string not "+(typeof src); - - var parts = src.match(/^\s*(\S+)(?:\s([\s\S]*))?$/); - - if (parts && parts[1]) this.title = parts[1]; - if (parts && parts[2]) src = parts[2]; - else src = ""; - - return src; -} - -/*t: - plan(8, "testing JSDOC.DocTag#nibbleTitle"); - - var tag = new JSDOC.DocTag(); - - tag.init().nibbleTitle("aTitleGoesHere"); - is(tag.title, "aTitleGoesHere", "a title can be found in a single-word string."); - - var src = tag.init().nibbleTitle("aTitleGoesHere and the rest"); - is(tag.title, "aTitleGoesHere", "a title can be found in a multi-word string."); - is(src, "and the rest", "the rest is returned when the title is nibbled off."); - - src = tag.init().nibbleTitle(""); - is(tag.title, "", "given an empty string the title is empty."); - is(src, "", "the rest is empty when the tag is empty."); - - var src = tag.init().nibbleTitle(" aTitleGoesHere\n a description"); - is(tag.title, "aTitleGoesHere", "leading and trailing spaces are not part of the title."); - is(src, " a description", "leading spaces (less one) are part of the description."); - - tag.init().nibbleTitle("a.Title::Goes_Here foo"); - is(tag.title, "a.Title::Goes_Here", "titles with punctuation are allowed."); - */ - -/** - Find and shift off the type of a tag. - @requires frame/String.js - @param {string} src - @return src - */ -JSDOC.DocTag.prototype.nibbleType = function(src) { - if (typeof src != "string") throw "src must be a string not "+(typeof src); - - if (src.match(/^\s*\{/)) { - var typeRange = src.balance("{", "}"); - if (typeRange[1] == -1) { - throw "Malformed comment tag ignored. Tag type requires an opening { and a closing }: "+src; - } - this.type = src.substring(typeRange[0]+1, typeRange[1]).trim(); - this.type = this.type.replace(/\s*,\s*/g, "|"); // multiples can be separated by , or | - src = src.substring(typeRange[1]+1); - } - - return src; -} - -/*t: - plan(5, "testing JSDOC.DocTag.parser.nibbleType"); - requires("../frame/String.js"); - - var tag = new JSDOC.DocTag(); - - tag.init().nibbleType("{String[]} aliases"); - is(tag.type, "String[]", "type can have non-alpha characters."); - - tag.init().nibbleType("{ aTypeGoesHere } etc etc"); - is(tag.type, "aTypeGoesHere", "type is trimmed."); - - tag.init().nibbleType("{ oneType, twoType ,\n threeType } etc etc"); - is(tag.type, "oneType|twoType|threeType", "multiple types can be separated by commas."); - - var error; - try { tag.init().nibbleType("{widget foo"); } - catch(e) { error = e; } - is(typeof error, "string", "malformed tag type throws error."); - isnt(error.indexOf("Malformed"), -1, "error message tells tag is malformed."); - */ - -/** - Find and shift off the name of a tag. - @requires frame/String.js - @param {string} src - @return src - */ -JSDOC.DocTag.prototype.nibbleName = function(src) { - if (typeof src != "string") throw "src must be a string not "+(typeof src); - - src = src.trim(); - - // is optional? - if (src.charAt(0) == "[") { - var nameRange = src.balance("[", "]"); - if (nameRange[1] == -1) { - throw "Malformed comment tag ignored. Tag optional name requires an opening [ and a closing ]: "+src; - } - this.name = src.substring(nameRange[0]+1, nameRange[1]).trim(); - this.isOptional = true; - - src = src.substring(nameRange[1]+1); - - // has default value? - var nameAndValue = this.name.split("="); - if (nameAndValue.length) { - this.name = nameAndValue.shift().trim(); - this.defaultValue = nameAndValue.join("="); - } - } - else { - var parts = src.match(/^(\S+)(?:\s([\s\S]*))?$/); - if (parts) { - if (parts[1]) this.name = parts[1]; - if (parts[2]) src = parts[2].trim(); - else src = ""; - } - } - - return src; -} - -/*t: - requires("../frame/String.js"); - plan(9, "testing JSDOC.DocTag.parser.nibbleName"); - - var tag = new JSDOC.DocTag(); - - tag.init().nibbleName("[foo] This is a description."); - is(tag.isOptional, true, "isOptional syntax is detected."); - is(tag.name, "foo", "optional param name is found."); - - tag.init().nibbleName("[foo] This is a description."); - is(tag.isOptional, true, "isOptional syntax is detected when no type."); - is(tag.name, "foo", "optional param name is found when no type."); - - tag.init().nibbleName("[foo=7] This is a description."); - is(tag.name, "foo", "optional param name is found when default value."); - is(tag.defaultValue, 7, "optional param default value is found when default value."); - - //tag.init().nibbleName("[foo= a value] This is a description."); - //is(tag.defaultValue, " a value", "optional param default value is found when default value has spaces (issue #112)."); - - tag.init().nibbleName("[foo=[]] This is a description."); - is(tag.defaultValue, "[]", "optional param default value is found when default value is [] (issue #95)."); - - tag.init().nibbleName("[foo=a=b] This is a description."); - is(tag.name, "foo", "optional param name is found when default value is a=b."); - is(tag.defaultValue, "a=b", "optional param default value is found when default value is a=b.") - */ - -/*t: - plan(32, "Testing JSDOC.DocTag.parser."); - requires("../frame/String.js"); - - var tag = new JSDOC.DocTag(); - - is(typeof tag, "object", "JSDOC.DocTag.parser with an empty string returns an object."); - is(typeof tag.title, "string", "returned object has a string property 'title'."); - is(typeof tag.type, "string", "returned object has a string property 'type'."); - is(typeof tag.name, "string", "returned object has a string property 'name'."); - is(typeof tag.defaultValue, "string", "returned object has a string property 'defaultValue'."); - is(typeof tag.isOptional, "boolean", "returned object has a boolean property 'isOptional'."); - is(typeof tag.desc, "string", "returned object has a string property 'desc'."); - - tag = new JSDOC.DocTag("param {widget} foo"); - is(tag.title, "param", "param title is found."); - is(tag.name, "foo", "param name is found when desc is missing."); - is(tag.desc, "", "param desc is empty when missing."); - - tag = new JSDOC.DocTag("param {object} date A valid date."); - is(tag.name, "date", "param name is found with a type."); - is(tag.type, "object", "param type is found."); - is(tag.desc, "A valid date.", "param desc is found with a type."); - - tag = new JSDOC.DocTag("param aName a description goes\n here."); - is(tag.name, "aName", "param name is found without a type."); - is(tag.desc, "a description goes\n here.", "param desc is found without a type."); - - tag = new JSDOC.DocTag("param {widget}"); - is(tag.name, "", "param name is empty when it is not given."); - - tag = new JSDOC.DocTag("param {widget} [foo] This is a description."); - is(tag.name, "foo", "optional param name is found."); - - tag = new JSDOC.DocTag("return {aType} This is a description."); - is(tag.type, "aType", "when return tag has no name, type is found."); - is(tag.desc, "This is a description.", "when return tag has no name, desc is found."); - - tag = new JSDOC.DocTag("author Joe Coder "); - is(tag.title, "author", "author tag has a title."); - is(tag.type, "", "the author tag has no type."); - is(tag.name, "", "the author tag has no name."); - is(tag.desc, "Joe Coder ", "author tag has desc."); - - tag = new JSDOC.DocTag("private \t\n "); - is(tag.title, "private", "private tag has a title."); - is(tag.type, "", "the private tag has no type."); - is(tag.name, "", "the private tag has no name."); - is(tag.desc, "", "private tag has no desc."); - - tag = new JSDOC.DocTag("example\n example(code);\n more();"); - is(tag.desc, " example(code);\n more();", "leading whitespace (less one) in examples code is preserved."); - - tag = new JSDOC.DocTag("param theName \n"); - is(tag.name, "theName", "name only is found."); - - tag = new JSDOC.DocTag("type theDesc \n"); - is(tag.desc, "theDesc", "desc only is found."); - - tag = new JSDOC.DocTag("type {theType} \n"); - is(tag.type, "theType", "type only is found."); - - tag = new JSDOC.DocTag(""); - is(tag.title, "", "title is empty when tag is empty."); - */ \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/lib/JSDOC/JsDoc.js b/lib/jsdoc-toolkit/app/lib/JSDOC/JsDoc.js deleted file mode 100644 index 02275a69..00000000 --- a/lib/jsdoc-toolkit/app/lib/JSDOC/JsDoc.js +++ /dev/null @@ -1,140 +0,0 @@ -/** - @constructor - @param [opt] Used to override the commandline options. Useful for testing. - @version $Id: JsDoc.js 831 2010-03-09 14:24:56Z micmath $ -*/ -JSDOC.JsDoc = function(/**object*/ opt) { - if (opt) { - JSDOC.opt = opt; - } - - if (JSDOC.opt.h) { - JSDOC.usage(); - quit(); - } - - // defend against options that are not sane - if (JSDOC.opt._.length == 0) { - LOG.warn("No source files to work on. Nothing to do."); - quit(); - } - if (JSDOC.opt.t === true || JSDOC.opt.d === true) { - JSDOC.usage(); - } - - if (typeof JSDOC.opt.d == "string") { - if (!JSDOC.opt.d.charAt(JSDOC.opt.d.length-1).match(/[\\\/]/)) { - JSDOC.opt.d = JSDOC.opt.d+"/"; - } - LOG.inform("Output directory set to '"+JSDOC.opt.d+"'."); - IO.mkPath(JSDOC.opt.d); - } - if (JSDOC.opt.e) IO.setEncoding(JSDOC.opt.e); - - // the -r option: scan source directories recursively - if (typeof JSDOC.opt.r == "boolean") JSDOC.opt.r = 10; - else if (!isNaN(parseInt(JSDOC.opt.r))) JSDOC.opt.r = parseInt(JSDOC.opt.r); - else JSDOC.opt.r = 1; - - // the -D option: define user variables - var D = {}; - if (JSDOC.opt.D) { - for (var i = 0; i < JSDOC.opt.D.length; i++) { - var param = JSDOC.opt.D[i]; - // remove first and last character if both == " - if ( - param.length > 1 - && param.charAt(0) == '"' - && param.charAt(param.length-1) == '"' - ) { - param = param.substr(1, param.length-2); - } - var defineParts = param.split(":"); - if (defineParts && defineParts.length > 1) { - for ( var dpIdx = 2; dpIdx < defineParts.length; dpIdx++ ) { - defineParts[1] += ':' + defineParts[dpIdx]; - } - D[defineParts[0]] = defineParts[1]; - } - } - } - JSDOC.opt.D = D; - // combine any conf file D options with the commandline D options - if (defined(JSDOC.conf)) for (var c in JSDOC.conf.D) { - if (!defined(JSDOC.opt.D[c])) { - JSDOC.opt.D[c] = JSDOC.conf.D[c]; - } - } - - // Give plugins a chance to initialize - if (defined(JSDOC.PluginManager)) { - JSDOC.PluginManager.run("onInit", JSDOC.opt); - } - - JSDOC.opt.srcFiles = JSDOC.JsDoc._getSrcFiles(); - JSDOC.JsDoc._parseSrcFiles(); - JSDOC.JsDoc.symbolSet = JSDOC.Parser.symbols; -} - -/** - Retrieve source file list. - @returns {String[]} The pathnames of the files to be parsed. - */ -JSDOC.JsDoc._getSrcFiles = function() { - JSDOC.JsDoc.srcFiles = []; - - var ext = ["js"]; - if (JSDOC.opt.x) { - ext = JSDOC.opt.x.split(",").map(function($) {return $.toLowerCase()}); - } - - for (var i = 0; i < JSDOC.opt._.length; i++) { - JSDOC.JsDoc.srcFiles = JSDOC.JsDoc.srcFiles.concat( - IO.ls(JSDOC.opt._[i], JSDOC.opt.r).filter( - function($) { - var thisExt = $.split(".").pop().toLowerCase(); - - if (JSDOC.opt.E) { - for(var n = 0; n < JSDOC.opt.E.length; n++) { - if ($.match(new RegExp(JSDOC.opt.E[n]))) { - LOG.inform("Excluding " + $); - return false; // if the file matches the regex then it's excluded. - } - } - } - - return (ext.indexOf(thisExt) > -1); // we're only interested in files with certain extensions - } - ) - ); - } - - return JSDOC.JsDoc.srcFiles; -} - -JSDOC.JsDoc._parseSrcFiles = function() { - JSDOC.Parser.init(); - for (var i = 0, l = JSDOC.JsDoc.srcFiles.length; i < l; i++) { - var srcFile = JSDOC.JsDoc.srcFiles[i]; - - if (JSDOC.opt.v) LOG.inform("Parsing file: " + srcFile); - - try { - var src = IO.readFile(srcFile); - } - catch(e) { - LOG.warn("Can't read source file '"+srcFile+"': "+e.message); - } - - var tr = new JSDOC.TokenReader(); - var ts = new JSDOC.TokenStream(tr.tokenize(new JSDOC.TextStream(src))); - - JSDOC.Parser.parse(ts, srcFile); - - } - JSDOC.Parser.finish(); - - if (JSDOC.PluginManager) { - JSDOC.PluginManager.run("onFinishedParsing", JSDOC.Parser.symbols); - } -} diff --git a/lib/jsdoc-toolkit/app/lib/JSDOC/JsPlate.js b/lib/jsdoc-toolkit/app/lib/JSDOC/JsPlate.js deleted file mode 100644 index bcaebc9c..00000000 --- a/lib/jsdoc-toolkit/app/lib/JSDOC/JsPlate.js +++ /dev/null @@ -1,109 +0,0 @@ -/** - @constructor -*/ -JSDOC.JsPlate = function(templateFile) { - if (templateFile) this.template = IO.readFile(templateFile); - - this.templateFile = templateFile; - this.code = ""; - this.parse(); -} - -JSDOC.JsPlate.prototype.parse = function() { - this.template = this.template.replace(/\{#[\s\S]+?#\}/gi, ""); - this.code = "var output=\u001e"+this.template; - - this.code = this.code.replace( - //gi, - function (match, eachName, inName) { - return "\u001e;\rvar $"+eachName+"_keys = keys("+inName+");\rfor(var $"+eachName+"_i = 0; $"+eachName+"_i < $"+eachName+"_keys.length; $"+eachName+"_i++) {\rvar $"+eachName+"_last = ($"+eachName+"_i == $"+eachName+"_keys.length-1);\rvar $"+eachName+"_key = $"+eachName+"_keys[$"+eachName+"_i];\rvar "+eachName+" = "+inName+"[$"+eachName+"_key];\routput+=\u001e"; - } - ); - this.code = this.code.replace(//g, "\u001e;\rif ($1) { output+=\u001e"); - this.code = this.code.replace(//g, "\u001e;}\relse if ($1) { output+=\u001e"); - this.code = this.code.replace(//g, "\u001e;}\relse { output+=\u001e"); - this.code = this.code.replace(/<\/(if|for)>/g, "\u001e;\r};\routput+=\u001e"); - this.code = this.code.replace( - /\{\+\s*([\s\S]+?)\s*\+\}/gi, - function (match, code) { - code = code.replace(/"/g, "\u001e"); // prevent qoute-escaping of inline code - code = code.replace(/(\r?\n)/g, " "); - return "\u001e+ ("+code+") +\u001e"; - } - ); - this.code = this.code.replace( - /\{!\s*([\s\S]+?)\s*!\}/gi, - function (match, code) { - code = code.replace(/"/g, "\u001e"); // prevent qoute-escaping of inline code - code = code.replace(/(\n)/g, " "); - return "\u001e; "+code+";\routput+=\u001e"; - } - ); - this.code = this.code+"\u001e;"; - - this.code = this.code.replace(/(\r?\n)/g, "\\n"); - this.code = this.code.replace(/"/g, "\\\""); - this.code = this.code.replace(/\u001e/g, "\""); -} - -JSDOC.JsPlate.prototype.toCode = function() { - return this.code; -} - -JSDOC.JsPlate.keys = function(obj) { - var keys = []; - if (obj.constructor.toString().indexOf("Array") > -1) { - for (var i = 0; i < obj.length; i++) { - keys.push(i); - } - } - else { - for (var i in obj) { - keys.push(i); - } - } - return keys; -}; - -JSDOC.JsPlate.values = function(obj) { - var values = []; - if (obj.constructor.toString().indexOf("Array") > -1) { - for (var i = 0; i < obj.length; i++) { - values.push(obj[i]); - } - } - else { - for (var i in obj) { - values.push(obj[i]); - } - } - return values; -}; - -JSDOC.JsPlate.prototype.process = function(data, compact) { - var keys = JSDOC.JsPlate.keys; - var values = JSDOC.JsPlate.values; - - try { - eval(this.code); - } - catch (e) { - print(">> There was an error evaluating the compiled code from template: "+this.templateFile); - print(" The error was on line "+e.lineNumber+" "+e.name+": "+e.message); - var lines = this.code.split("\r"); - if (e.lineNumber-2 >= 0) print("line "+(e.lineNumber-1)+": "+lines[e.lineNumber-2]); - print("line "+e.lineNumber+": "+lines[e.lineNumber-1]); - print(""); - } - - if (compact) { // patch by mcbain.asm - // Remove lines that contain only space-characters, usually left by lines in the template - // which originally only contained JSPlate tags or code. This makes it easier to write - // non-tricky templates which still put out nice code (not bloated with extra lines). - // Lines purposely left blank (just a line ending) are left alone. - output = output.replace(/\s+?(\r?)\n/g, "$1\n"); - } - - /*debug*///print(this.code); - return output; -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/lib/JSDOC/Lang.js b/lib/jsdoc-toolkit/app/lib/JSDOC/Lang.js deleted file mode 100644 index 62919d7d..00000000 --- a/lib/jsdoc-toolkit/app/lib/JSDOC/Lang.js +++ /dev/null @@ -1,144 +0,0 @@ -/** - @namespace -*/ -JSDOC.Lang = { -} - -JSDOC.Lang.isBuiltin = function(name) { - return (JSDOC.Lang.isBuiltin.coreObjects.indexOf(name) > -1); -} -JSDOC.Lang.isBuiltin.coreObjects = ['_global_', 'Array', 'Boolean', 'Date', 'Error', 'Function', 'Math', 'Number', 'Object', 'RegExp', 'String']; - -JSDOC.Lang.whitespace = function(ch) { - return JSDOC.Lang.whitespace.names[ch]; -} -JSDOC.Lang.whitespace.names = { - " ": "SPACE", - "\f": "FORMFEED", - "\t": "TAB", - "\u0009": "UNICODE_TAB", - "\u000A": "UNICODE_NBR", - "\u0008": "VERTICAL_TAB" -}; - -JSDOC.Lang.newline = function(ch) { - return JSDOC.Lang.newline.names[ch]; -} -JSDOC.Lang.newline.names = { - "\n": "NEWLINE", - "\r": "RETURN", - "\u000A": "UNICODE_LF", - "\u000D": "UNICODE_CR", - "\u2029": "UNICODE_PS", - "\u2028": "UNICODE_LS" -}; - -JSDOC.Lang.keyword = function(word) { - return JSDOC.Lang.keyword.names["="+word]; -} -JSDOC.Lang.keyword.names = { - "=break": "BREAK", - "=case": "CASE", - "=catch": "CATCH", - "=const": "VAR", - "=continue": "CONTINUE", - "=default": "DEFAULT", - "=delete": "DELETE", - "=do": "DO", - "=else": "ELSE", - "=false": "FALSE", - "=finally": "FINALLY", - "=for": "FOR", - "=function": "FUNCTION", - "=if": "IF", - "=in": "IN", - "=instanceof": "INSTANCEOF", - "=new": "NEW", - "=null": "NULL", - "=return": "RETURN", - "=switch": "SWITCH", - "=this": "THIS", - "=throw": "THROW", - "=true": "TRUE", - "=try": "TRY", - "=typeof": "TYPEOF", - "=void": "VOID", - "=while": "WHILE", - "=with": "WITH", - "=var": "VAR" -}; - -JSDOC.Lang.punc = function(ch) { - return JSDOC.Lang.punc.names[ch]; -} -JSDOC.Lang.punc.names = { - ";": "SEMICOLON", - ",": "COMMA", - "?": "HOOK", - ":": "COLON", - "||": "OR", - "&&": "AND", - "|": "BITWISE_OR", - "^": "BITWISE_XOR", - "&": "BITWISE_AND", - "===": "STRICT_EQ", - "==": "EQ", - "=": "ASSIGN", - "!==": "STRICT_NE", - "!=": "NE", - "<<": "LSH", - "<=": "LE", - "<": "LT", - ">>>": "URSH", - ">>": "RSH", - ">=": "GE", - ">": "GT", - "++": "INCREMENT", - "--": "DECREMENT", - "+": "PLUS", - "-": "MINUS", - "*": "MUL", - "/": "DIV", - "%": "MOD", - "!": "NOT", - "~": "BITWISE_NOT", - ".": "DOT", - "[": "LEFT_BRACKET", - "]": "RIGHT_BRACKET", - "{": "LEFT_CURLY", - "}": "RIGHT_CURLY", - "(": "LEFT_PAREN", - ")": "RIGHT_PAREN" -}; - -JSDOC.Lang.matching = function(name) { - return JSDOC.Lang.matching.names[name]; -} -JSDOC.Lang.matching.names = { - "LEFT_PAREN": "RIGHT_PAREN", - "RIGHT_PAREN": "LEFT_PAREN", - "LEFT_CURLY": "RIGHT_CURLY", - "RIGHT_CURLY": "LEFT_CURLY", - "LEFT_BRACE": "RIGHT_BRACE", - "RIGHT_BRACE": "LEFT_BRACE" -} - -JSDOC.Lang.isNumber = function(str) { - return /^(\.[0-9]|[0-9]+\.|[0-9])[0-9]*([eE][+-][0-9]+)?$/i.test(str); -} - -JSDOC.Lang.isHexDec = function(str) { - return /^0x[0-9A-F]+$/i.test(str); -} - -JSDOC.Lang.isWordChar = function(str) { - return /^[a-zA-Z0-9$_.]+$/.test(str); -} - -JSDOC.Lang.isSpace = function(str) { - return (typeof JSDOC.Lang.whitespace(str) != "undefined"); -} - -JSDOC.Lang.isNewline = function(str) { - return (typeof JSDOC.Lang.newline(str) != "undefined"); -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/lib/JSDOC/Parser.js b/lib/jsdoc-toolkit/app/lib/JSDOC/Parser.js deleted file mode 100644 index e489c61d..00000000 --- a/lib/jsdoc-toolkit/app/lib/JSDOC/Parser.js +++ /dev/null @@ -1,146 +0,0 @@ -if (typeof JSDOC == "undefined") JSDOC = {}; - -/** - @namespace - @requires JSDOC.Walker - @requires JSDOC.Symbol - @requires JSDOC.DocComment -*/ -JSDOC.Parser = { - conf: { - ignoreCode: JSDOC.opt.n, - ignoreAnonymous: true, // factory: true - treatUnderscoredAsPrivate: true, // factory: true - explain: false // factory: false - }, - - addSymbol: function(symbol) { - - if (JSDOC.Parser.rename) { - for (var n in JSDOC.Parser.rename) { - if (symbol.alias.indexOf(n) == 0) { - if (symbol.name == symbol.alias) { - symbol.name = symbol.name.replace(n, JSDOC.Parser.rename[n]); - } - symbol.alias = symbol.alias.replace(n, JSDOC.Parser.rename[n]); - } - } - } - - if (JSDOC.opt.S) { - if (typeof JSDOC.Parser.secureModules == "undefined") JSDOC.Parser.secureModules = {}; - if (/^exports\./.test(symbol.alias)) { - symbol.srcFile.match(/(^|[\\\/])([^\\\/]+)\.js/i); - var fileNS = RegExp.$2; - - // need to create the namespace associated with this file first - if (!JSDOC.Parser.secureModules[fileNS]) { - JSDOC.Parser.secureModules[fileNS] = 1; - var nsSymbol = new JSDOC.Symbol(fileNS, [], "GLOBAL", new JSDOC.DocComment("")); - nsSymbol.isNamespace = true; - nsSymbol.srcFile = ""; - nsSymbol.isPrivate = false; - nsSymbol.srcFile = symbol.srcFile; - nsSymbol.desc = (JSDOC.Parser.symbols.getSymbol(symbol.srcFile) || {desc: ""}).desc; - JSDOC.Parser.addSymbol(nsSymbol); - } - - symbol.alias = symbol.alias.replace(/^exports\./, fileNS + '.'); - symbol.name = symbol.name.replace(/^exports\./, ''); - symbol.memberOf = fileNS; - symbol.isStatic = true; - } - } - - // if a symbol alias is documented more than once the first one with the user docs wins - if (JSDOC.Parser.symbols.hasSymbol(symbol.alias)) { - var oldSymbol = JSDOC.Parser.symbols.getSymbol(symbol.alias); - if (oldSymbol.comment.isUserComment) { - if (JSDOC.opt.m) return; - if (symbol.comment.isUserComment) { // old and new are both documented - LOG.warn("The symbol '"+symbol.alias+"' is documented more than once."); - return; - } - else { // old is documented but new isn't - return; - } - } - } - - // we don't document anonymous things - if (JSDOC.Parser.conf.ignoreAnonymous && symbol.name.match(/\$anonymous\b/)) return; - - // uderscored things may be treated as if they were marked private, this cascades - if (JSDOC.Parser.conf.treatUnderscoredAsPrivate && symbol.name.match(/[.#-]_[^.#-]+$/)) { - if (!symbol.comment.getTag("public").length > 0) symbol.isPrivate = true; - } - - // -p flag is required to document private things - if (!JSDOC.opt.p && symbol.isPrivate) return; // issue #161 fixed by mcbain.asm - - // ignored things are not documented, this doesn't cascade - if (symbol.isIgnored) return; - JSDOC.Parser.symbols.addSymbol(symbol); - }, - - addBuiltin: function(name) { - var builtin = new JSDOC.Symbol(name, [], "CONSTRUCTOR", new JSDOC.DocComment("")); - builtin.isNamespace = true; - builtin.srcFile = ""; - builtin.isPrivate = false; - JSDOC.Parser.addSymbol(builtin); - return builtin; - }, - - init: function() { - JSDOC.Parser.symbols = new JSDOC.SymbolSet(); - JSDOC.Parser.walker = new JSDOC.Walker(); - }, - - finish: function() { - JSDOC.Parser.symbols.relate(); - - // make a litle report about what was found - if (JSDOC.Parser.conf.explain) { - var symbols = JSDOC.Parser.symbols.toArray(); - var srcFile = ""; - for (var i = 0, l = symbols.length; i < l; i++) { - var symbol = symbols[i]; - if (srcFile != symbol.srcFile) { - srcFile = symbol.srcFile; - print("\n"+srcFile+"\n-------------------"); - } - print(i+":\n alias => "+symbol.alias + "\n name => "+symbol.name+ "\n isa => "+symbol.isa + "\n memberOf => " + symbol.memberOf + "\n isStatic => " + symbol.isStatic + ", isInner => " + symbol.isInner+ ", isPrivate => " + symbol.isPrivate); - } - print("-------------------\n"); - } - } -} - -JSDOC.Parser.parse = function(/**JSDOC.TokenStream*/ts, /**String*/srcFile) { - JSDOC.Symbol.srcFile = (srcFile || ""); - JSDOC.DocComment.shared = ""; // shared comments don't cross file boundaries - - if (!JSDOC.Parser.walker) JSDOC.Parser.init(); - JSDOC.Parser.walker.walk(ts); // adds to our symbols - - // filter symbols by option - for (var p = JSDOC.Parser.symbols._index.first(); p; p = JSDOC.Parser.symbols._index.next()) { - var symbol = p.value; - - if (!symbol) continue; - - if (symbol.is("FILE") || symbol.is("GLOBAL")) { - continue; - } - else if (!JSDOC.opt.a && !symbol.comment.isUserComment) { - JSDOC.Parser.symbols.deleteSymbol(symbol.alias); - } - - if (/#$/.test(symbol.alias)) { // we don't document prototypes - JSDOC.Parser.symbols.deleteSymbol(symbol.alias); - } - } - - return JSDOC.Parser.symbols.toArray(); -} diff --git a/lib/jsdoc-toolkit/app/lib/JSDOC/PluginManager.js b/lib/jsdoc-toolkit/app/lib/JSDOC/PluginManager.js deleted file mode 100644 index 9c911931..00000000 --- a/lib/jsdoc-toolkit/app/lib/JSDOC/PluginManager.js +++ /dev/null @@ -1,33 +0,0 @@ -/** - @namespace Holds functionality related to running plugins. -*/ -JSDOC.PluginManager = { -} - -/** - @param name A unique name that identifies that plugin. - @param handlers A collection of named functions. The names correspond to hooks in the core code. -*/ -JSDOC.PluginManager.registerPlugin = function(/**String*/name, /**Object*/handlers) { - if (!defined(JSDOC.PluginManager.plugins)) - /** The collection of all plugins. Requires a unique name for each. - */ - JSDOC.PluginManager.plugins = {}; - - - JSDOC.PluginManager.plugins[name] = handlers; -} - -/** - @param hook The name of the hook that is being caught. - @param target Any object. This will be passed as the only argument to the handler whose - name matches the hook name. Handlers cannot return a value, so must modify the target - object to have an effect. -*/ -JSDOC.PluginManager.run = function(/**String*/hook, /**Mixed*/target) { - for (var name in JSDOC.PluginManager.plugins) { - if (defined(JSDOC.PluginManager.plugins[name][hook])) { - JSDOC.PluginManager.plugins[name][hook](target); - } - } -} diff --git a/lib/jsdoc-toolkit/app/lib/JSDOC/Symbol.js b/lib/jsdoc-toolkit/app/lib/JSDOC/Symbol.js deleted file mode 100644 index 1aa44da8..00000000 --- a/lib/jsdoc-toolkit/app/lib/JSDOC/Symbol.js +++ /dev/null @@ -1,644 +0,0 @@ -if (typeof JSDOC == "undefined") JSDOC = {}; - -/** - Create a new Symbol. - @class Represents a symbol in the source code. - */ -JSDOC.Symbol = function() { - this.init(); - if (arguments.length) this.populate.apply(this, arguments); -} - -JSDOC.Symbol.count = 0; - -JSDOC.Symbol.prototype.init = function() { - this._name = ""; - this._params = []; - this.$args = []; - this.addOn = ""; - this.alias = ""; - this.augments = []; - this.author = ""; - this.classDesc = ""; - this.comment = {}; - this.defaultValue = undefined; - this.deprecated = ""; - this.desc = ""; - this.example = []; - this.exceptions = []; - this.fires = []; - this.id = JSDOC.Symbol.count++; - this.inherits = []; - this.inheritsFrom = []; - this.isa = "OBJECT"; - this.isConstant = false; - this.isEvent = false; - this.isIgnored = false; - this.isInner = false; - this.isNamespace = false; - this.isPrivate = false; - this.isStatic = false; - this.memberOf = ""; - this.methods = []; - this.properties = []; - this.requires = []; - this.returns = []; - this.see = []; - this.since = ""; - this.srcFile = {}; - this.type = ""; - this.version = ""; -} - -JSDOC.Symbol.prototype.serialize = function() { - var keys = []; - for (var p in this) { - keys.push (p); - } - keys = keys.sort(); - - var out = ""; - for (var i in keys) { - if (typeof this[keys[i]] == "function") continue; - out += keys[i]+" => "+Dumper.dump(this[keys[i]])+",\n"; - } - return "\n{\n" + out + "}\n"; -} - -JSDOC.Symbol.prototype.clone = function() { - var clone = new JSDOC.Symbol(); - clone.populate.apply(clone, this.$args); // repopulate using the original arguments - clone.srcFile = this.srcFile; // not the current srcFile, the one when the original was made - return clone; -} - -JSDOC.Symbol.prototype.__defineSetter__("name", - function(n) { n = n.replace(/^_global_[.#-]/, ""); n = n.replace(/\.prototype\.?/g, '#'); this._name = n; } -); -JSDOC.Symbol.prototype.__defineGetter__("name", - function() { return this._name; } -); -JSDOC.Symbol.prototype.__defineSetter__("params", - function(v) { - for (var i = 0, l = v.length; i < l; i++) { - if (v[i].constructor != JSDOC.DocTag) { // may be a generic object parsed from signature, like {type:..., name:...} - this._params[i] = new JSDOC.DocTag("param"+((v[i].type)?" {"+v[i].type+"}":"")+" "+v[i].name); - } - else { - this._params[i] = v[i]; - } - } - } -); -JSDOC.Symbol.prototype.__defineGetter__("params", - function() { return this._params; } -); - -JSDOC.Symbol.prototype.getEvents = function() { - var events = []; - for (var i = 0, l = this.methods.length; i < l; i++) { - if (this.methods[i].isEvent) { - this.methods[i].name = this.methods[i].name.replace("event:", ""); - events.push(this.methods[i]); - } - } - return events; -} - -JSDOC.Symbol.prototype.getMethods = function() { - var nonEvents = []; - for (var i = 0, l = this.methods.length; i < l; i++) { - if (!this.methods[i].isEvent) { - nonEvents.push(this.methods[i]); - } - } - return nonEvents; -} - - -JSDOC.Symbol.prototype.populate = function( - /** String */ name, - /** Object[] */ params, - /** String */ isa, - /** JSDOC.DocComment */ comment -) { - this.$args = arguments; - - this.name = name; - this.alias = this.name; - - this.params = params; - this.isa = (isa == "VIRTUAL")? "OBJECT":isa; - this.comment = comment || new JSDOC.DocComment(""); - this.srcFile = JSDOC.Symbol.srcFile; - - if (this.is("FILE") && !this.alias) this.alias = this.srcFile; - - this.setTags(); - - if (typeof JSDOC.PluginManager != "undefined") { - JSDOC.PluginManager.run("onSymbol", this); - } -} - -JSDOC.Symbol.prototype.setTags = function() { - // @author - var authors = this.comment.getTag("author"); - if (authors.length) { - this.author = authors.map(function($){return $.desc;}).join(", "); - } - - /*t: - plan(34, "testing JSDOC.Symbol"); - - requires("../lib/JSDOC/DocComment.js"); - requires("../frame/String.js"); - requires("../lib/JSDOC/DocTag.js"); - - var sym = new JSDOC.Symbol("foo", [], "OBJECT", new JSDOC.DocComment("/**@author Joe Smith*"+"/")); - is(sym.author, "Joe Smith", "@author tag, author is found."); - */ - - // @desc - var descs = this.comment.getTag("desc"); - if (descs.length) { - this.desc = descs.map(function($){return $.desc;}).join("\n"); // multiple descriptions are concatenated into one - } - - /*t: - var sym = new JSDOC.Symbol("foo", [], "OBJECT", new JSDOC.DocComment("/**@desc This is a description.*"+"/")); - is(sym.desc, "This is a description.", "@desc tag, description is found."); - */ - - // @overview - if (this.is("FILE")) { - if (!this.alias) this.alias = this.srcFile; - - var overviews = this.comment.getTag("overview"); - if (overviews.length) { - this.desc = [this.desc].concat(overviews.map(function($){return $.desc;})).join("\n"); - } - } - - /*t: - var sym = new JSDOC.Symbol("foo", [], "FILE", new JSDOC.DocComment("/**@overview This is an overview.*"+"/")); - is(sym.desc, "\nThis is an overview.", "@overview tag, description is found."); - */ - - // @since - var sinces = this.comment.getTag("since"); - if (sinces.length) { - this.since = sinces.map(function($){return $.desc;}).join(", "); - } - - /*t: - var sym = new JSDOC.Symbol("foo", [], "FILE", new JSDOC.DocComment("/**@since 1.01*"+"/")); - is(sym.since, "1.01", "@since tag, description is found."); - */ - - // @constant - if (this.comment.getTag("constant").length) { - this.isConstant = true; - } - - /*t: - var sym = new JSDOC.Symbol("foo", [], "FILE", new JSDOC.DocComment("/**@constant*"+"/")); - is(sym.isConstant, true, "@constant tag, isConstant set."); - */ - - // @version - var versions = this.comment.getTag("version"); - if (versions.length) { - this.version = versions.map(function($){return $.desc;}).join(", "); - } - - /*t: - var sym = new JSDOC.Symbol("foo", [], "FILE", new JSDOC.DocComment("/**@version 2.0x*"+"/")); - is(sym.version, "2.0x", "@version tag, version is found."); - */ - - // @deprecated - var deprecateds = this.comment.getTag("deprecated"); - if (deprecateds.length) { - this.deprecated = deprecateds.map(function($){return $.desc;}).join("\n"); - } - - /*t: - var sym = new JSDOC.Symbol("foo", [], "FILE", new JSDOC.DocComment("/**@deprecated Use other method.*"+"/")); - is(sym.deprecated, "Use other method.", "@deprecated tag, desc is found."); - */ - - // @example - var examples = this.comment.getTag("example"); - if (examples.length) { - this.example = examples.map( - // trim trailing whitespace - function($) { - $.desc = $.desc.replace(/\s+$/, ""); - return $; - } - ); - } - - /*t: - var sym = new JSDOC.Symbol("foo", [], "FILE", new JSDOC.DocComment("/**@example This\n is an example. \n*"+"/")); - isnt(typeof sym.example[0], "undefined", "@example tag, creates sym.example array."); - is(sym.example[0], "This\n is an example.", "@example tag, desc is found."); - */ - - // @see - var sees = this.comment.getTag("see"); - if (sees.length) { - var thisSee = this.see; - sees.map(function($){thisSee.push($.desc);}); - } - - /*t: - var sym = new JSDOC.Symbol("foo", [], "FILE", new JSDOC.DocComment("/**@see The other thing.*"+"/")); - is(sym.see, "The other thing.", "@see tag, desc is found."); - */ - - // @class - var classes = this.comment.getTag("class"); - if (classes.length) { - this.isa = "CONSTRUCTOR"; - this.classDesc = classes[0].desc; // desc can't apply to the constructor as there is none. - } - - /*t: - var sym = new JSDOC.Symbol("foo", [], "OBJECT", new JSDOC.DocComment("/**@class This describes the class.*"+"/")); - is(sym.isa, "CONSTRUCTOR", "@class tag, makes symbol a constructor."); - is(sym.classDesc, "This describes the class.", "@class tag, class description is found."); - */ - - // @namespace - var namespaces = this.comment.getTag("namespace"); - if (namespaces.length) { - this.classDesc = namespaces[0].desc; - this.isNamespace = true; - } - - /*t: - var sym = new JSDOC.Symbol("foo", [], "OBJECT", new JSDOC.DocComment("/**@namespace This describes the namespace.*"+"/")); - is(sym.classDesc, "This describes the namespace.", "@namespace tag, class description is found."); - */ - - // @param - var params = this.comment.getTag("param"); - if (params.length) { - // user-defined params overwrite those with same name defined by the parser - var thisParams = this.params; - - if (thisParams.length == 0) { // none exist yet, so just bung all these user-defined params straight in - this.params = params; - } - else { // need to overlay these user-defined params on to existing parser-defined params - for (var i = 0, l = params.length; i < l; i++) { - if (thisParams[i]) { - if (params[i].type) thisParams[i].type = params[i].type; - thisParams[i].name = params[i].name; - thisParams[i].desc = params[i].desc; - thisParams[i].isOptional = params[i].isOptional; - thisParams[i].defaultValue = params[i].defaultValue; - } - else thisParams[i] = params[i]; - } - } - } - - /*t: - var sym = new JSDOC.Symbol("foo", [{type: "array", name: "pages"}], "FUNCTION", new JSDOC.DocComment("/**Description.*"+"/")); - is(sym.params.length, 1, "parser defined param is found."); - - sym = new JSDOC.Symbol("foo", [], "FUNCTION", new JSDOC.DocComment("/**Description.\n@param {array} pages*"+"/")); - is(sym.params.length, 1, "user defined param is found."); - is(sym.params[0].type, "array", "user defined param type is found."); - is(sym.params[0].name, "pages", "user defined param name is found."); - - sym = new JSDOC.Symbol("foo", [{type: "array", name: "pages"}], "FUNCTION", new JSDOC.DocComment("/**Description.\n@param {string} uid*"+"/")); - is(sym.params.length, 1, "user defined param overwrites parser defined param."); - is(sym.params[0].type, "string", "user defined param type overwrites parser defined param type."); - is(sym.params[0].name, "uid", "user defined param name overwrites parser defined param name."); - - sym = new JSDOC.Symbol("foo", [{type: "array", name: "pages"}, {type: "number", name: "count"}], "FUNCTION", new JSDOC.DocComment("/**Description.\n@param {string} uid*"+"/")); - is(sym.params.length, 2, "user defined params overlay parser defined params."); - is(sym.params[1].type, "number", "user defined param type overlays parser defined param type."); - is(sym.params[1].name, "count", "user defined param name overlays parser defined param name."); - - sym = new JSDOC.Symbol("foo", [], "FUNCTION", new JSDOC.DocComment("/**Description.\n@param {array} pages The pages description.*"+"/")); - is(sym.params.length, 1, "user defined param with description is found."); - is(sym.params[0].desc, "The pages description.", "user defined param description is found."); - */ - - // @constructor - if (this.comment.getTag("constructor").length) { - this.isa = "CONSTRUCTOR"; - } - - /*t: - var sym = new JSDOC.Symbol("foo", [], "OBJECT", new JSDOC.DocComment("/**@constructor*"+"/")); - is(sym.isa, "CONSTRUCTOR", "@constructor tag, makes symbol a constructor."); - */ - - // @static - if (this.comment.getTag("static").length) { - this.isStatic = true; - if (this.isa == "CONSTRUCTOR") { - this.isNamespace = true; - } - } - - /*t: - var sym = new JSDOC.Symbol("foo", [], "OBJECT", new JSDOC.DocComment("/**@static\n@constructor*"+"/")); - is(sym.isStatic, true, "@static tag, makes isStatic true."); - is(sym.isNamespace, true, "@static and @constructor tag, makes isNamespace true."); - */ - - // @inner - if (this.comment.getTag("inner").length) { - this.isInner = true; - this.isStatic = false; - } - - /*t: - var sym = new JSDOC.Symbol("foo", [], "OBJECT", new JSDOC.DocComment("/**@inner*"+"/")); - is(sym.isStatic, false, "@inner tag, makes isStatic false."); - is(sym.isInner, true, "@inner makes isInner true."); - */ - - // @name - var names = this.comment.getTag("name"); - if (names.length) { - this.name = names[0].desc; - } - - /*t: - // todo - */ - - // @field - if (this.comment.getTag("field").length) { - this.isa = "OBJECT"; - } - - /*t: - var sym = new JSDOC.Symbol("foo", [], "FUNCTION", new JSDOC.DocComment("/**@field*"+"/")); - is(sym.isa, "OBJECT", "@field tag, makes symbol an object."); - */ - - // @function - if (this.comment.getTag("function").length) { - this.isa = "FUNCTION"; - if (/event:/.test(this.alias)) this.isEvent = true; - } - - /*t: - var sym = new JSDOC.Symbol("foo", [], "OBJECT", new JSDOC.DocComment("/**@function*"+"/")); - is(sym.isa, "FUNCTION", "@function tag, makes symbol a function."); - */ - - // @event - var events = this.comment.getTag("event"); - if (events.length) { - this.isa = "FUNCTION"; - this.isEvent = true; - if (!/event:/.test(this.alias)) - this.alias = this.alias.replace(/^(.*[.#-])([^.#-]+)$/, "$1event:$2"); - } - - /*t: - var sym = new JSDOC.Symbol("foo", [], "OBJECT", new JSDOC.DocComment("/**@event*"+"/")); - is(sym.isa, "FUNCTION", "@event tag, makes symbol a function."); - is(sym.isEvent, true, "@event makes isEvent true."); - */ - - // @fires - var fires = this.comment.getTag("fires"); - if (fires.length) { - for (var i = 0; i < fires.length; i++) { - this.fires.push(fires[i].desc); - } - } - - /*t: - // todo - */ - - // @property - var properties = this.comment.getTag("property"); - if (properties.length) { - thisProperties = this.properties; - for (var i = 0; i < properties.length; i++) { - var property = new JSDOC.Symbol(this.alias+"#"+properties[i].name, [], "OBJECT", new JSDOC.DocComment("/**"+properties[i].desc+"*/")); - // TODO: shouldn't the following happen in the addProperty method of Symbol? - if (properties[i].type) property.type = properties[i].type; - if (properties[i].defaultValue) property.defaultValue = properties[i].defaultValue; - this.addProperty(property); - if (!JSDOC.Parser.symbols.getSymbolByName(property.name)) - JSDOC.Parser.addSymbol(property); - } - } - - /*t: - // todo - */ - - // @return - var returns = this.comment.getTag("return"); - if (returns.length) { // there can be many return tags in a single doclet - this.returns = returns; - this.type = returns.map(function($){return $.type}).join(", "); - } - - /*t: - // todo - */ - - // @exception - this.exceptions = this.comment.getTag("throws"); - - /*t: - // todo - */ - - // @requires - var requires = this.comment.getTag("requires"); - if (requires.length) { - this.requires = requires.map(function($){return $.desc}); - } - - /*t: - // todo - */ - - // @type - var types = this.comment.getTag("type"); - if (types.length) { - this.type = types[0].desc; //multiple type tags are ignored - } - - /*t: - // todo - */ - - // @private - if (this.comment.getTag("private").length || this.isInner) { - this.isPrivate = true; - } - - // @ignore - if (this.comment.getTag("ignore").length) { - this.isIgnored = true; - } - - /*t: - // todo - */ - - // @inherits ... as ... - var inherits = this.comment.getTag("inherits"); - if (inherits.length) { - for (var i = 0; i < inherits.length; i++) { - if (/^\s*([a-z$0-9_.#:-]+)(?:\s+as\s+([a-z$0-9_.#:-]+))?/i.test(inherits[i].desc)) { - var inAlias = RegExp.$1; - var inAs = RegExp.$2 || inAlias; - - if (inAlias) inAlias = inAlias.replace(/\.prototype\.?/g, "#"); - - if (inAs) { - inAs = inAs.replace(/\.prototype\.?/g, "#"); - inAs = inAs.replace(/^this\.?/, "#"); - } - - if (inAs.indexOf(inAlias) != 0) { //not a full namepath - var joiner = "."; - if (this.alias.charAt(this.alias.length-1) == "#" || inAs.charAt(0) == "#") { - joiner = ""; - } - inAs = this.alias + joiner + inAs; - } - } - this.inherits.push({alias: inAlias, as: inAs}); - } - } - - /*t: - // todo - */ - - // @augments - this.augments = this.comment.getTag("augments"); - - // @default - var defaults = this.comment.getTag("default"); - if (defaults.length) { - if (this.is("OBJECT")) { - this.defaultValue = defaults[0].desc; - } - } - - /*t: - // todo - */ - - // @memberOf - var memberOfs = this.comment.getTag("memberOf"); - if (memberOfs.length) { - this.memberOf = memberOfs[0].desc; - this.memberOf = this.memberOf.replace(/\.prototype\.?/g, "#"); - } - - /*t: - // todo - */ - - // @public - if (this.comment.getTag("public").length) { - this.isPrivate = false; - } - - /*t: - // todo - */ - - if (JSDOC.PluginManager) { - JSDOC.PluginManager.run("onSetTags", this); - } -} - -JSDOC.Symbol.prototype.is = function(what) { - return this.isa === what; -} - -JSDOC.Symbol.prototype.isBuiltin = function() { - return JSDOC.Lang.isBuiltin(this.alias); -} - -JSDOC.Symbol.prototype.setType = function(/**String*/comment, /**Boolean*/overwrite) { - if (!overwrite && this.type) return; - var typeComment = JSDOC.DocComment.unwrapComment(comment); - this.type = typeComment; -} - -JSDOC.Symbol.prototype.inherit = function(symbol) { - if (!this.hasMember(symbol.name) && !symbol.isInner) { - if (symbol.is("FUNCTION")) - this.methods.push(symbol); - else if (symbol.is("OBJECT")) - this.properties.push(symbol); - } -} - -JSDOC.Symbol.prototype.hasMember = function(name) { - return (this.hasMethod(name) || this.hasProperty(name)); -} - -JSDOC.Symbol.prototype.addMember = function(symbol) { - if (symbol.is("FUNCTION")) { this.addMethod(symbol); } - else if (symbol.is("OBJECT")) { this.addProperty(symbol); } -} - -JSDOC.Symbol.prototype.hasMethod = function(name) { - var thisMethods = this.methods; - for (var i = 0, l = thisMethods.length; i < l; i++) { - if (thisMethods[i].name == name) return true; - if (thisMethods[i].alias == name) return true; - } - return false; -} - -JSDOC.Symbol.prototype.addMethod = function(symbol) { - var methodAlias = symbol.alias; - var thisMethods = this.methods; - for (var i = 0, l = thisMethods.length; i < l; i++) { - if (thisMethods[i].alias == methodAlias) { - thisMethods[i] = symbol; // overwriting previous method - return; - } - } - thisMethods.push(symbol); // new method with this alias -} - -JSDOC.Symbol.prototype.hasProperty = function(name) { - var thisProperties = this.properties; - for (var i = 0, l = thisProperties.length; i < l; i++) { - if (thisProperties[i].name == name) return true; - if (thisProperties[i].alias == name) return true; - } - return false; -} - -JSDOC.Symbol.prototype.addProperty = function(symbol) { - var propertyAlias = symbol.alias; - var thisProperties = this.properties; - for (var i = 0, l = thisProperties.length; i < l; i++) { - if (thisProperties[i].alias == propertyAlias) { - thisProperties[i] = symbol; // overwriting previous property - return; - } - } - - thisProperties.push(symbol); // new property with this alias -} - -JSDOC.Symbol.srcFile = ""; //running reference to the current file being parsed diff --git a/lib/jsdoc-toolkit/app/lib/JSDOC/SymbolSet.js b/lib/jsdoc-toolkit/app/lib/JSDOC/SymbolSet.js deleted file mode 100644 index 8e3a2ebf..00000000 --- a/lib/jsdoc-toolkit/app/lib/JSDOC/SymbolSet.js +++ /dev/null @@ -1,243 +0,0 @@ -/** @constructor */ -JSDOC.SymbolSet = function() { - this.init(); -} - -JSDOC.SymbolSet.prototype.init = function() { - this._index = new Hash(); -} - -JSDOC.SymbolSet.prototype.keys = function() { - return this._index.keys(); -} - -JSDOC.SymbolSet.prototype.hasSymbol = function(alias) { - return this._index.hasKey(alias); -} - -JSDOC.SymbolSet.prototype.addSymbol = function(symbol) { - if (JSDOC.opt.a && this.hasSymbol(symbol.alias)) { - LOG.warn("Overwriting symbol documentation for: " + symbol.alias + "."); - this.deleteSymbol(symbol.alias); - } - this._index.set(symbol.alias, symbol); -} - -JSDOC.SymbolSet.prototype.getSymbol = function(alias) { - if (this.hasSymbol(alias)) return this._index.get(alias); -} - -JSDOC.SymbolSet.prototype.getSymbolByName = function(name) { - for (var p = this._index.first(); p; p = this._index.next()) { - var symbol = p.value; - if (symbol.name == name) return symbol; - } -} - -JSDOC.SymbolSet.prototype.toArray = function() { - return this._index.values(); -} - -JSDOC.SymbolSet.prototype.deleteSymbol = function(alias) { - if (!this.hasSymbol(alias)) return; - this._index.drop(alias); -} - -JSDOC.SymbolSet.prototype.renameSymbol = function(oldName, newName) { - // todo: should check if oldname or newname already exist - this._index.replace(oldName, newName); - this._index.get(newName).alias = newName; - return newName; -} - -JSDOC.SymbolSet.prototype.relate = function() { - this.resolveBorrows(); - this.resolveMemberOf(); - this.resolveAugments(); -} - -JSDOC.SymbolSet.prototype.resolveBorrows = function() { - for (var p = this._index.first(); p; p = this._index.next()) { - var symbol = p.value; - if (symbol.is("FILE") || symbol.is("GLOBAL")) continue; - - var borrows = symbol.inherits; - for (var i = 0; i < borrows.length; i++) { - -if (/#$/.test(borrows[i].alias)) { - LOG.warn("Attempted to borrow entire instance of "+borrows[i].alias+" but that feature is not yet implemented."); - return; -} - var borrowed = this.getSymbol(borrows[i].alias); - - if (!borrowed) { - LOG.warn("Can't borrow undocumented "+borrows[i].alias+"."); - continue; - } - - if (borrows[i].as == borrowed.alias) { - var assumedName = borrowed.name.split(/([#.-])/).pop(); - borrows[i].as = symbol.name+RegExp.$1+assumedName; - LOG.inform("Assuming borrowed as name is "+borrows[i].as+" but that feature is experimental."); - } - - var borrowAsName = borrows[i].as; - var borrowAsAlias = borrowAsName; - if (!borrowAsName) { - LOG.warn("Malformed @borrow, 'as' is required."); - continue; - } - - if (borrowAsName.length > symbol.alias.length && borrowAsName.indexOf(symbol.alias) == 0) { - borrowAsName = borrowAsName.replace(borrowed.alias, "") - } - else { - var joiner = ""; - if (borrowAsName.charAt(0) != "#") joiner = "."; - borrowAsAlias = borrowed.alias + joiner + borrowAsName; - } - - borrowAsName = borrowAsName.replace(/^[#.]/, ""); - - if (this.hasSymbol(borrowAsAlias)) continue; - - var clone = borrowed.clone(); - clone.name = borrowAsName; - clone.alias = borrowAsAlias; - this.addSymbol(clone); - } - } -} - -JSDOC.SymbolSet.prototype.resolveMemberOf = function() { - for (var p = this._index.first(); p; p = this._index.next()) { - var symbol = p.value; - - if (symbol.is("FILE") || symbol.is("GLOBAL")) continue; - - // the memberOf value was provided in the @memberOf tag - else if (symbol.memberOf) { - // like foo.bar is a memberOf foo - if (symbol.alias.indexOf(symbol.memberOf) == 0) { - var memberMatch = new RegExp("^("+symbol.memberOf+")[.#-]?(.+)$"); - var aliasParts = symbol.alias.match(memberMatch); - - if (aliasParts) { - symbol.memberOf = aliasParts[1]; - symbol.name = aliasParts[2]; - } - - var nameParts = symbol.name.match(memberMatch); - - if (nameParts) { - symbol.name = nameParts[2]; - } - } - // like bar is a memberOf foo - else { - var joiner = symbol.memberOf.charAt(symbol.memberOf.length-1); - if (!/[.#-]/.test(joiner)) symbol.memberOf += "."; - this.renameSymbol(symbol.alias, symbol.memberOf + symbol.name); - } - } - // the memberOf must be calculated - else { - var parts = symbol.alias.match(/^(.*[.#-])([^.#-]+)$/); - - if (parts) { - symbol.memberOf = parts[1]; - symbol.name = parts[2]; - } - } - - // set isStatic, isInner - if (symbol.memberOf) { - switch (symbol.memberOf.charAt(symbol.memberOf.length-1)) { - case '#' : - symbol.isStatic = false; - symbol.isInner = false; - break; - case '.' : - symbol.isStatic = true; - symbol.isInner = false; - break; - case '-' : - symbol.isStatic = false; - symbol.isInner = true; - break; - default: // memberOf ends in none of the above - symbol.isStatic = true; - break; - } - } - - // unowned methods and fields belong to the global object - if (!symbol.is("CONSTRUCTOR") && !symbol.isNamespace && symbol.memberOf == "") { - symbol.memberOf = "_global_"; - } - - // clean up - if (symbol.memberOf.match(/[.#-]$/)) { - symbol.memberOf = symbol.memberOf.substr(0, symbol.memberOf.length-1); - } - // add to parent's methods or properties list - if (symbol.memberOf) { - - var container = this.getSymbol(symbol.memberOf); - if (!container) { - if (JSDOC.Lang.isBuiltin(symbol.memberOf)) container = JSDOC.Parser.addBuiltin(symbol.memberOf); - else { - LOG.warn("Trying to document "+symbol.name +" as a member of undocumented symbol "+symbol.memberOf+"."); - } - } - - if (container) container.addMember(symbol); - } - } -} - -JSDOC.SymbolSet.prototype.resolveAugments = function() { - for (var p = this._index.first(); p; p = this._index.next()) { - var symbol = p.value; - - if (symbol.alias == "_global_" || symbol.is("FILE")) continue; - JSDOC.SymbolSet.prototype.walk.apply(this, [symbol]); - } -} - -JSDOC.SymbolSet.prototype.walk = function(symbol) { - var augments = symbol.augments; - for(var i = 0; i < augments.length; i++) { - var contributer = this.getSymbol(augments[i]); - if (!contributer && JSDOC.Lang.isBuiltin(''+augments[i])) { - contributer = new JSDOC.Symbol("_global_."+augments[i], [], augments[i], new JSDOC.DocComment("Built in.")); - contributer.isNamespace = true; - contributer.srcFile = ""; - contributer.isPrivate = false; - JSDOC.Parser.addSymbol(contributer); - } - - if (contributer) { - if (contributer.augments.length) { - JSDOC.SymbolSet.prototype.walk.apply(this, [contributer]); - } - - symbol.inheritsFrom.push(contributer.alias); - //if (!isUnique(symbol.inheritsFrom)) { - // LOG.warn("Can't resolve augments: Circular reference: "+symbol.alias+" inherits from "+contributer.alias+" more than once."); - //} - //else { - var cmethods = contributer.methods; - var cproperties = contributer.properties; - - for (var ci = 0, cl = cmethods.length; ci < cl; ci++) { - if (!cmethods[ci].isStatic) symbol.inherit(cmethods[ci]); - } - for (var ci = 0, cl = cproperties.length; ci < cl; ci++) { - if (!cproperties[ci].isStatic) symbol.inherit(cproperties[ci]); - } - //} - } - else LOG.warn("Can't augment contributer: "+augments[i]+", not found."); - } -} diff --git a/lib/jsdoc-toolkit/app/lib/JSDOC/TextStream.js b/lib/jsdoc-toolkit/app/lib/JSDOC/TextStream.js deleted file mode 100644 index ccc48a87..00000000 --- a/lib/jsdoc-toolkit/app/lib/JSDOC/TextStream.js +++ /dev/null @@ -1,41 +0,0 @@ - -/** - @constructor -*/ -JSDOC.TextStream = function(text) { - if (typeof(text) == "undefined") text = ""; - text = ""+text; - this.text = text; - this.cursor = 0; -} - -JSDOC.TextStream.prototype.look = function(n) { - if (typeof n == "undefined") n = 0; - - if (this.cursor+n < 0 || this.cursor+n >= this.text.length) { - var result = new String(""); - result.eof = true; - return result; - } - return this.text.charAt(this.cursor+n); -} - -JSDOC.TextStream.prototype.next = function(n) { - if (typeof n == "undefined") n = 1; - if (n < 1) return null; - - var pulled = ""; - for (var i = 0; i < n; i++) { - if (this.cursor+i < this.text.length) { - pulled += this.text.charAt(this.cursor+i); - } - else { - var result = new String(""); - result.eof = true; - return result; - } - } - - this.cursor += n; - return pulled; -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/lib/JSDOC/Token.js b/lib/jsdoc-toolkit/app/lib/JSDOC/Token.js deleted file mode 100644 index fb7f9d94..00000000 --- a/lib/jsdoc-toolkit/app/lib/JSDOC/Token.js +++ /dev/null @@ -1,18 +0,0 @@ -if (typeof JSDOC == "undefined") JSDOC = {}; - -/** - @constructor -*/ -JSDOC.Token = function(data, type, name) { - this.data = data; - this.type = type; - this.name = name; -} - -JSDOC.Token.prototype.toString = function() { - return "<"+this.type+" name=\""+this.name+"\">"+this.data+""; -} - -JSDOC.Token.prototype.is = function(what) { - return this.name === what || this.type === what; -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/lib/JSDOC/TokenReader.js b/lib/jsdoc-toolkit/app/lib/JSDOC/TokenReader.js deleted file mode 100644 index 914336b6..00000000 --- a/lib/jsdoc-toolkit/app/lib/JSDOC/TokenReader.js +++ /dev/null @@ -1,332 +0,0 @@ -if (typeof JSDOC == "undefined") JSDOC = {}; - -/** - @class Search a {@link JSDOC.TextStream} for language tokens. -*/ -JSDOC.TokenReader = function() { - this.keepDocs = true; - this.keepWhite = false; - this.keepComments = false; -}; - -/** - @type {JSDOC.Token[]} - */ -JSDOC.TokenReader.prototype.tokenize = function(/**JSDOC.TextStream*/stream) { - var tokens = []; - /**@ignore*/ tokens.last = function() { return tokens[tokens.length-1]; }; - /**@ignore*/ tokens.lastSym = function() { - for (var i = tokens.length-1; i >= 0; i--) { - if (!(tokens[i].is("WHIT") || tokens[i].is("COMM"))) return tokens[i]; - } - }; - - while (!stream.look().eof) { - if (this.read_mlcomment(stream, tokens)) continue; - if (this.read_slcomment(stream, tokens)) continue; - if (this.read_dbquote(stream, tokens)) continue; - if (this.read_snquote(stream, tokens)) continue; - if (this.read_regx(stream, tokens)) continue; - if (this.read_numb(stream, tokens)) continue; - if (this.read_punc(stream, tokens)) continue; - if (this.read_newline(stream, tokens)) continue; - if (this.read_space(stream, tokens)) continue; - if (this.read_word(stream, tokens)) continue; - - // if execution reaches here then an error has happened - tokens.push(new JSDOC.Token(stream.next(), "TOKN", "UNKNOWN_TOKEN")); - } - return tokens; -}; - -/** - @returns {Boolean} Was the token found? - */ -JSDOC.TokenReader.prototype.read_word = function(/**JSDOC.TokenStream*/stream, tokens) { - var found = ""; - while (!stream.look().eof && JSDOC.Lang.isWordChar(stream.look())) { - found += stream.next(); - } - - if (found === "") { - return false; - } - else { - var name; - if ((name = JSDOC.Lang.keyword(found))) tokens.push(new JSDOC.Token(found, "KEYW", name)); - else tokens.push(new JSDOC.Token(found, "NAME", "NAME")); - return true; - } -} - -/** - @returns {Boolean} Was the token found? - */ -JSDOC.TokenReader.prototype.read_punc = function(/**JSDOC.TokenStream*/stream, tokens) { - var found = ""; - var name; - while (!stream.look().eof && JSDOC.Lang.punc(found+stream.look())) { - found += stream.next(); - } - - if (found === "") { - return false; - } - else { - tokens.push(new JSDOC.Token(found, "PUNC", JSDOC.Lang.punc(found))); - return true; - } -} - -/** - @returns {Boolean} Was the token found? - */ -JSDOC.TokenReader.prototype.read_space = function(/**JSDOC.TokenStream*/stream, tokens) { - var found = ""; - - while (!stream.look().eof && JSDOC.Lang.isSpace(stream.look())) { - found += stream.next(); - } - - if (found === "") { - return false; - } - else { - if (this.collapseWhite) found = " "; - if (this.keepWhite) tokens.push(new JSDOC.Token(found, "WHIT", "SPACE")); - return true; - } -} - -/** - @returns {Boolean} Was the token found? - */ -JSDOC.TokenReader.prototype.read_newline = function(/**JSDOC.TokenStream*/stream, tokens) { - var found = ""; - - while (!stream.look().eof && JSDOC.Lang.isNewline(stream.look())) { - found += stream.next(); - } - - if (found === "") { - return false; - } - else { - if (this.collapseWhite) found = "\n"; - if (this.keepWhite) tokens.push(new JSDOC.Token(found, "WHIT", "NEWLINE")); - return true; - } -} - -/** - @returns {Boolean} Was the token found? - */ -JSDOC.TokenReader.prototype.read_mlcomment = function(/**JSDOC.TokenStream*/stream, tokens) { - if (stream.look() == "/" && stream.look(1) == "*") { - var found = stream.next(2); - - while (!stream.look().eof && !(stream.look(-1) == "/" && stream.look(-2) == "*")) { - found += stream.next(); - } - - // to start doclet we allow /** or /*** but not /**/ or /**** - if (/^\/\*\*([^\/]|\*[^*])/.test(found) && this.keepDocs) tokens.push(new JSDOC.Token(found, "COMM", "JSDOC")); - else if (this.keepComments) tokens.push(new JSDOC.Token(found, "COMM", "MULTI_LINE_COMM")); - return true; - } - return false; -} - -/** - @returns {Boolean} Was the token found? - */ -JSDOC.TokenReader.prototype.read_slcomment = function(/**JSDOC.TokenStream*/stream, tokens) { - var found; - if ( - (stream.look() == "/" && stream.look(1) == "/" && (found=stream.next(2))) - || - (stream.look() == "<" && stream.look(1) == "!" && stream.look(2) == "-" && stream.look(3) == "-" && (found=stream.next(4))) - ) { - - while (!stream.look().eof && !JSDOC.Lang.isNewline(stream.look())) { - found += stream.next(); - } - - if (this.keepComments) { - tokens.push(new JSDOC.Token(found, "COMM", "SINGLE_LINE_COMM")); - } - return true; - } - return false; -} - -/** - @returns {Boolean} Was the token found? - */ -JSDOC.TokenReader.prototype.read_dbquote = function(/**JSDOC.TokenStream*/stream, tokens) { - if (stream.look() == "\"") { - // find terminator - var string = stream.next(); - - while (!stream.look().eof) { - if (stream.look() == "\\") { - if (JSDOC.Lang.isNewline(stream.look(1))) { - do { - stream.next(); - } while (!stream.look().eof && JSDOC.Lang.isNewline(stream.look())); - string += "\\\n"; - } - else { - string += stream.next(2); - } - } - else if (stream.look() == "\"") { - string += stream.next(); - tokens.push(new JSDOC.Token(string, "STRN", "DOUBLE_QUOTE")); - return true; - } - else { - string += stream.next(); - } - } - } - return false; // error! unterminated string -} - -/** - @returns {Boolean} Was the token found? - */ -JSDOC.TokenReader.prototype.read_snquote = function(/**JSDOC.TokenStream*/stream, tokens) { - if (stream.look() == "'") { - // find terminator - var string = stream.next(); - - while (!stream.look().eof) { - if (stream.look() == "\\") { // escape sequence - string += stream.next(2); - } - else if (stream.look() == "'") { - string += stream.next(); - tokens.push(new JSDOC.Token(string, "STRN", "SINGLE_QUOTE")); - return true; - } - else { - string += stream.next(); - } - } - } - return false; // error! unterminated string -} - -/** - @returns {Boolean} Was the token found? - */ -JSDOC.TokenReader.prototype.read_numb = function(/**JSDOC.TokenStream*/stream, tokens) { - if (stream.look() === "0" && stream.look(1) == "x") { - return this.read_hex(stream, tokens); - } - - var found = ""; - - while (!stream.look().eof && JSDOC.Lang.isNumber(found+stream.look())){ - found += stream.next(); - } - - if (found === "") { - return false; - } - else { - if (/^0[0-7]/.test(found)) tokens.push(new JSDOC.Token(found, "NUMB", "OCTAL")); - else tokens.push(new JSDOC.Token(found, "NUMB", "DECIMAL")); - return true; - } -} -/*t: - requires("../lib/JSDOC/TextStream.js"); - requires("../lib/JSDOC/Token.js"); - requires("../lib/JSDOC/Lang.js"); - - plan(3, "testing JSDOC.TokenReader.prototype.read_numb"); - - //// setup - var src = "function foo(num){while (num+8.0 >= 0x20 && num < 0777){}}"; - var tr = new JSDOC.TokenReader(); - var tokens = tr.tokenize(new JSDOC.TextStream(src)); - - var hexToken, octToken, decToken; - for (var i = 0; i < tokens.length; i++) { - if (tokens[i].name == "HEX_DEC") hexToken = tokens[i]; - if (tokens[i].name == "OCTAL") octToken = tokens[i]; - if (tokens[i].name == "DECIMAL") decToken = tokens[i]; - } - //// - - is(decToken.data, "8.0", "decimal number is found in source."); - is(hexToken.data, "0x20", "hexdec number is found in source (issue #99)."); - is(octToken.data, "0777", "octal number is found in source."); -*/ - -/** - @returns {Boolean} Was the token found? - */ -JSDOC.TokenReader.prototype.read_hex = function(/**JSDOC.TokenStream*/stream, tokens) { - var found = stream.next(2); - - while (!stream.look().eof) { - if (JSDOC.Lang.isHexDec(found) && !JSDOC.Lang.isHexDec(found+stream.look())) { // done - tokens.push(new JSDOC.Token(found, "NUMB", "HEX_DEC")); - return true; - } - else { - found += stream.next(); - } - } - return false; -} - -/** - @returns {Boolean} Was the token found? - */ -JSDOC.TokenReader.prototype.read_regx = function(/**JSDOC.TokenStream*/stream, tokens) { - var last; - if ( - stream.look() == "/" - && - ( - - ( - !(last = tokens.lastSym()) // there is no last, the regex is the first symbol - || - ( - !last.is("NUMB") - && !last.is("NAME") - && !last.is("RIGHT_PAREN") - && !last.is("RIGHT_BRACKET") - ) - ) - ) - ) { - var regex = stream.next(); - - while (!stream.look().eof) { - if (stream.look() == "\\") { // escape sequence - regex += stream.next(2); - } - else if (stream.look() == "/") { - regex += stream.next(); - - while (/[gmi]/.test(stream.look())) { - regex += stream.next(); - } - - tokens.push(new JSDOC.Token(regex, "REGX", "REGX")); - return true; - } - else { - regex += stream.next(); - } - } - // error: unterminated regex - } - return false; -} diff --git a/lib/jsdoc-toolkit/app/lib/JSDOC/TokenStream.js b/lib/jsdoc-toolkit/app/lib/JSDOC/TokenStream.js deleted file mode 100644 index 1eeb44cb..00000000 --- a/lib/jsdoc-toolkit/app/lib/JSDOC/TokenStream.js +++ /dev/null @@ -1,133 +0,0 @@ -if (typeof JSDOC == "undefined") JSDOC = {}; - -/** - @constructor -*/ -JSDOC.TokenStream = function(tokens) { - this.tokens = (tokens || []); - this.rewind(); -} - -/** - @constructor - @private -*/ -function VoidToken(/**String*/type) { - this.toString = function() {return ""}; - this.is = function(){return false;} -} - -JSDOC.TokenStream.prototype.rewind = function() { - this.cursor = -1; -} - -/** - @type JSDOC.Token -*/ -JSDOC.TokenStream.prototype.look = function(/**Number*/n, /**Boolean*/considerWhitespace) { - if (typeof n == "undefined") n = 0; - - if (considerWhitespace == true) { - if (this.cursor+n < 0 || this.cursor+n > this.tokens.length) return {}; - return this.tokens[this.cursor+n]; - } - else { - var count = 0; - var i = this.cursor; - - while (true) { - if (i < 0) return new JSDOC.Token("", "VOID", "START_OF_STREAM"); - else if (i > this.tokens.length) return new JSDOC.Token("", "VOID", "END_OF_STREAM"); - - if (i != this.cursor && (this.tokens[i] === undefined || this.tokens[i].is("WHIT"))) { - if (n < 0) i--; else i++; - continue; - } - - if (count == Math.abs(n)) { - return this.tokens[i]; - } - count++; - (n < 0)? i-- : i++; - } - - return new JSDOC.Token("", "VOID", "STREAM_ERROR"); // because null isn't an object and caller always expects an object - } -} - -/** - @type JSDOC.Token|JSDOC.Token[] -*/ -JSDOC.TokenStream.prototype.next = function(/**Number*/howMany) { - if (typeof howMany == "undefined") howMany = 1; - if (howMany < 1) return null; - var got = []; - - for (var i = 1; i <= howMany; i++) { - if (this.cursor+i >= this.tokens.length) { - return null; - } - got.push(this.tokens[this.cursor+i]); - } - this.cursor += howMany; - - if (howMany == 1) { - return got[0]; - } - else return got; -} - -/** - @type JSDOC.Token[] -*/ -JSDOC.TokenStream.prototype.balance = function(/**String*/start, /**String*/stop) { - if (!stop) stop = JSDOC.Lang.matching(start); - - var depth = 0; - var got = []; - var started = false; - - while ((token = this.look())) { - if (token.is(start)) { - depth++; - started = true; - } - - if (started) { - got.push(token); - } - - if (token.is(stop)) { - depth--; - if (depth == 0) return got; - } - if (!this.next()) break; - } -} - -JSDOC.TokenStream.prototype.getMatchingToken = function(/**String*/start, /**String*/stop) { - var depth = 0; - var cursor = this.cursor; - - if (!start) { - start = JSDOC.Lang.matching(stop); - depth = 1; - } - if (!stop) stop = JSDOC.Lang.matching(start); - - while ((token = this.tokens[cursor])) { - if (token.is(start)) { - depth++; - } - - if (token.is(stop) && cursor) { - depth--; - if (depth == 0) return this.tokens[cursor]; - } - cursor++; - } -} - -JSDOC.TokenStream.prototype.insertAhead = function(/**JSDOC.Token*/token) { - this.tokens.splice(this.cursor+1, 0, token); -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/lib/JSDOC/Util.js b/lib/jsdoc-toolkit/app/lib/JSDOC/Util.js deleted file mode 100644 index 6d7edb36..00000000 --- a/lib/jsdoc-toolkit/app/lib/JSDOC/Util.js +++ /dev/null @@ -1,32 +0,0 @@ -/** - * @namespace - * @deprecated Use {@link FilePath} instead. - */ -JSDOC.Util = { -} - -/** - * @deprecated Use {@link FilePath.fileName} instead. - */ -JSDOC.Util.fileName = function(path) { - LOG.warn("JSDOC.Util.fileName is deprecated. Use FilePath.fileName instead."); - var nameStart = Math.max(path.lastIndexOf("/")+1, path.lastIndexOf("\\")+1, 0); - return path.substring(nameStart); -} - -/** - * @deprecated Use {@link FilePath.fileExtension} instead. - */ -JSDOC.Util.fileExtension = function(filename) { - LOG.warn("JSDOC.Util.fileExtension is deprecated. Use FilePath.fileExtension instead."); - return filename.split(".").pop().toLowerCase(); -}; - -/** - * @deprecated Use {@link FilePath.dir} instead. - */ -JSDOC.Util.dir = function(path) { - LOG.warn("JSDOC.Util.dir is deprecated. Use FilePath.dir instead."); - var nameStart = Math.max(path.lastIndexOf("/")+1, path.lastIndexOf("\\")+1, 0); - return path.substring(0, nameStart-1); -} diff --git a/lib/jsdoc-toolkit/app/lib/JSDOC/Walker.js b/lib/jsdoc-toolkit/app/lib/JSDOC/Walker.js deleted file mode 100644 index 6ecaea88..00000000 --- a/lib/jsdoc-toolkit/app/lib/JSDOC/Walker.js +++ /dev/null @@ -1,507 +0,0 @@ -if (typeof JSDOC == "undefined") JSDOC = {}; - -/** @constructor */ -JSDOC.Walker = function(/**JSDOC.TokenStream*/ts) { - this.init(); - if (typeof ts != "undefined") { - this.walk(ts); - } -} - -JSDOC.Walker.prototype.init = function() { - this.ts = null; - - var globalSymbol = new JSDOC.Symbol("_global_", [], "GLOBAL", new JSDOC.DocComment("")); - globalSymbol.isNamespace = true; - globalSymbol.srcFile = ""; - globalSymbol.isPrivate = false; - JSDOC.Parser.addSymbol(globalSymbol); - this.lastDoc = null; - this.token = null; - - /** - The chain of symbols under which we are currently nested. - @type Array - */ - this.namescope = [globalSymbol]; - this.namescope.last = function(n){ if (!n) n = 0; return this[this.length-(1+n)] || "" }; -} - -JSDOC.Walker.prototype.walk = function(/**JSDOC.TokenStream*/ts) { - this.ts = ts; - while (this.token = this.ts.look()) { - if (this.token.popNamescope) { - - var symbol = this.namescope.pop(); - if (symbol.is("FUNCTION")) { - if (this.ts.look(1).is("LEFT_PAREN") && symbol.comment.getTag("function").length == 0) { - symbol.isa = "OBJECT"; - } - } - } - this.step(); - if (!this.ts.next()) break; - } -} - -JSDOC.Walker.prototype.step = function() { - if (this.token.is("JSDOC")) { // it's a doc comment - - var doc = new JSDOC.DocComment(this.token.data); - - - if (doc.getTag("exports").length > 0) { - var exports = doc.getTag("exports")[0]; - - exports.desc.match(/(\S+) as (\S+)/i); - var n1 = RegExp.$1; - var n2 = RegExp.$2; - - if (!n1 && n2) throw "@exports tag requires a value like: 'name as ns.name'"; - - JSDOC.Parser.rename = (JSDOC.Parser.rename || {}); - JSDOC.Parser.rename[n1] = n2 - } - - if (doc.getTag("lends").length > 0) { - var lends = doc.getTag("lends")[0]; - - var name = lends.desc - if (!name) throw "@lends tag requires a value."; - - var symbol = new JSDOC.Symbol(name, [], "OBJECT", doc); - - this.namescope.push(symbol); - - var matching = this.ts.getMatchingToken("LEFT_CURLY"); - if (matching) matching.popNamescope = name; - else LOG.warn("Mismatched } character. Can't parse code in file " + symbol.srcFile + "."); - - this.lastDoc = null; - return true; - } - else if (doc.getTag("name").length > 0 && doc.getTag("overview").length == 0) { // it's a virtual symbol - var virtualName = doc.getTag("name")[0].desc; - if (!virtualName) throw "@name tag requires a value."; - - if (doc.getTag("memberOf").length > 0) { - virtualName = (doc.getTag("memberOf")[0] + "." + virtualName) - .replace(/([#.])\./, "$1"); - doc.deleteTag("memberOf"); - } - - var symbol = new JSDOC.Symbol(virtualName, [], "VIRTUAL", doc); - - JSDOC.Parser.addSymbol(symbol); - - this.lastDoc = null; - return true; - } - else if (doc.meta) { // it's a meta doclet - if (doc.meta == "@+") JSDOC.DocComment.shared = doc.src; - else if (doc.meta == "@-") JSDOC.DocComment.shared = ""; - else if (doc.meta == "nocode+") JSDOC.Parser.conf.ignoreCode = true; - else if (doc.meta == "nocode-") JSDOC.Parser.conf.ignoreCode = JSDOC.opt.n; - else throw "Unrecognized meta comment: "+doc.meta; - - this.lastDoc = null; - return true; - } - else if (doc.getTag("overview").length > 0) { // it's a file overview - symbol = new JSDOC.Symbol("", [], "FILE", doc); - - JSDOC.Parser.addSymbol(symbol); - - this.lastDoc = null; - return true; - } - else { - this.lastDoc = doc; - return false; - } - } - else if (!JSDOC.Parser.conf.ignoreCode) { // it's code - if (this.token.is("NAME")) { // it's the name of something - var symbol; - var name = this.token.data; - var doc = null; if (this.lastDoc) doc = this.lastDoc; - var params = []; - - // it's inside an anonymous object - if (this.ts.look(1).is("COLON") && this.ts.look(-1).is("LEFT_CURLY") && !(this.ts.look(-2).is("JSDOC") || this.namescope.last().comment.getTag("lends").length || this.ts.look(-2).is("ASSIGN") || this.ts.look(-2).is("COLON"))) { - name = "$anonymous"; - name = this.namescope.last().alias+"-"+name - - params = []; - - symbol = new JSDOC.Symbol(name, params, "OBJECT", doc); - - JSDOC.Parser.addSymbol(symbol); - - this.namescope.push(symbol); - - var matching = this.ts.getMatchingToken(null, "RIGHT_CURLY"); - if (matching) matching.popNamescope = name; - else LOG.warn("Mismatched } character. Can't parse code in file " + symbol.srcFile + "."); - } - // function foo() {} - else if (this.ts.look(-1).is("FUNCTION") && this.ts.look(1).is("LEFT_PAREN")) { - var isInner; - - if (this.lastDoc) doc = this.lastDoc; - - if (doc && doc.getTag("memberOf").length > 0) { - name = (doc.getTag("memberOf")[0]+"."+name).replace("#.", "#"); - doc.deleteTag("memberOf"); - } - else { - name = this.namescope.last().alias+"-"+name; - if (!this.namescope.last().is("GLOBAL")) isInner = true; - } - - if (!this.namescope.last().is("GLOBAL")) isInner = true; - - params = JSDOC.Walker.onParamList(this.ts.balance("LEFT_PAREN")); - - symbol = new JSDOC.Symbol(name, params, "FUNCTION", doc); - if (isInner) symbol.isInner = true; - - if (this.ts.look(1).is("JSDOC")) { - var inlineReturn = ""+this.ts.look(1).data; - inlineReturn = inlineReturn.replace(/(^\/\*\* *| *\*\/$)/g, ""); - symbol.type = inlineReturn; - } - - JSDOC.Parser.addSymbol(symbol); - - this.namescope.push(symbol); - - var matching = this.ts.getMatchingToken("LEFT_CURLY"); - if (matching) matching.popNamescope = name; - else LOG.warn("Mismatched } character. Can't parse code in file " + symbol.srcFile + "."); - } - // foo = function() {} - else if (this.ts.look(1).is("ASSIGN") && this.ts.look(2).is("FUNCTION")) { - var constructs; - var isConstructor = false; - if (doc && (constructs = doc.getTag("constructs")) && constructs.length) { - if (constructs[0].desc) { - name = constructs[0].desc; - isConstructor = true; - } - } - - var isInner; - if (this.ts.look(-1).is("VAR") || this.isInner) { - if (doc && doc.getTag("memberOf").length > 0) { - name = (doc.getTag("memberOf")[0]+"."+name).replace("#.", "#"); - doc.deleteTag("memberOf"); - } - else { - name = this.namescope.last().alias+"-"+name; - if (!this.namescope.last().is("GLOBAL")) isInner = true; - } - if (!this.namescope.last().is("GLOBAL")) isInner = true; - } - else if (name.indexOf("this.") == 0) { - name = this.resolveThis(name); - } - - if (this.lastDoc) doc = this.lastDoc; - params = JSDOC.Walker.onParamList(this.ts.balance("LEFT_PAREN")); - - symbol = new JSDOC.Symbol(name, params, "FUNCTION", doc); - - if (isInner) symbol.isInner = true; - if (isConstructor) symbol.isa = "CONSTRUCTOR"; - - if (this.ts.look(1).is("JSDOC")) { - var inlineReturn = ""+this.ts.look(1).data; - inlineReturn = inlineReturn.replace(/(^\/\*\* *| *\*\/$)/g, ""); - symbol.type = inlineReturn; - } - - JSDOC.Parser.addSymbol(symbol); - - this.namescope.push(symbol); - - var matching = this.ts.getMatchingToken("LEFT_CURLY"); - if (matching) matching.popNamescope = name; - else LOG.warn("Mismatched } character. Can't parse code in file " + symbol.srcFile + "."); - } - // foo = new function() {} or foo = (function() {} - else if (this.ts.look(1).is("ASSIGN") && (this.ts.look(2).is("NEW") || this.ts.look(2).is("LEFT_PAREN")) && this.ts.look(3).is("FUNCTION")) { - var isInner; - if (this.ts.look(-1).is("VAR") || this.isInner) { - name = this.namescope.last().alias+"-"+name - if (!this.namescope.last().is("GLOBAL")) isInner = true; - } - else if (name.indexOf("this.") == 0) { - name = this.resolveThis(name); - } - - this.ts.next(3); // advance past the "new" or "(" - - if (this.lastDoc) doc = this.lastDoc; - params = JSDOC.Walker.onParamList(this.ts.balance("LEFT_PAREN")); - - symbol = new JSDOC.Symbol(name, params, "OBJECT", doc); - if (isInner) symbol.isInner = true; - - if (this.ts.look(1).is("JSDOC")) { - var inlineReturn = ""+this.ts.look(1).data; - inlineReturn = inlineReturn.replace(/(^\/\*\* *| *\*\/$)/g, ""); - symbol.type = inlineReturn; - } - - JSDOC.Parser.addSymbol(symbol); - - symbol.scopeType = "INSTANCE"; - this.namescope.push(symbol); - - var matching = this.ts.getMatchingToken("LEFT_CURLY"); - if (matching) matching.popNamescope = name; - else LOG.warn("Mismatched } character. Can't parse code in file " + symbol.srcFile + "."); - } - // foo: function() {} - else if (this.ts.look(1).is("COLON") && this.ts.look(2).is("FUNCTION")) { - name = (this.namescope.last().alias+"."+name).replace("#.", "#"); - - if (this.lastDoc) doc = this.lastDoc; - params = JSDOC.Walker.onParamList(this.ts.balance("LEFT_PAREN")); - - if (doc && doc.getTag("constructs").length) { - name = name.replace(/\.prototype(\.|$)/, "#"); - - if (name.indexOf("#") > -1) name = name.match(/(^[^#]+)/)[0]; - else name = this.namescope.last().alias; - - symbol = new JSDOC.Symbol(name, params, "CONSTRUCTOR", doc); - } - else { - symbol = new JSDOC.Symbol(name, params, "FUNCTION", doc); - } - - if (this.ts.look(1).is("JSDOC")) { - var inlineReturn = ""+this.ts.look(1).data; - inlineReturn = inlineReturn.replace(/(^\/\*\* *| *\*\/$)/g, ""); - symbol.type = inlineReturn; - } - - JSDOC.Parser.addSymbol(symbol); - - this.namescope.push(symbol); - - var matching = this.ts.getMatchingToken("LEFT_CURLY"); - if (matching) matching.popNamescope = name; - else LOG.warn("Mismatched } character. Can't parse code in file " + symbol.srcFile + "."); - } - // foo = {} - else if (this.ts.look(1).is("ASSIGN") && this.ts.look(2).is("LEFT_CURLY")) { - var isInner; - if (this.ts.look(-1).is("VAR") || this.isInner) { - name = this.namescope.last().alias+"-"+name - if (!this.namescope.last().is("GLOBAL")) isInner = true; - } - else if (name.indexOf("this.") == 0) { - name = this.resolveThis(name); - } - - if (this.lastDoc) doc = this.lastDoc; - - symbol = new JSDOC.Symbol(name, params, "OBJECT", doc); - if (isInner) symbol.isInner = true; - - - if (doc) JSDOC.Parser.addSymbol(symbol); - - this.namescope.push(symbol); - - var matching = this.ts.getMatchingToken("LEFT_CURLY"); - if (matching) matching.popNamescope = name; - else LOG.warn("Mismatched } character. Can't parse code in file " + symbol.srcFile + "."); - } - // var foo; - else if (this.ts.look(1).is("SEMICOLON")) { - var isInner; - - if (this.ts.look(-1).is("VAR") || this.isInner) { - name = this.namescope.last().alias+"-"+name - if (!this.namescope.last().is("GLOBAL")) isInner = true; - - if (this.lastDoc) doc = this.lastDoc; - - symbol = new JSDOC.Symbol(name, params, "OBJECT", doc); - if (isInner) symbol.isInner = true; - - - if (doc) JSDOC.Parser.addSymbol(symbol); - } - } - // foo = x - else if (this.ts.look(1).is("ASSIGN")) { - var isInner; - if (this.ts.look(-1).is("VAR") || this.isInner) { - name = this.namescope.last().alias+"-"+name - if (!this.namescope.last().is("GLOBAL")) isInner = true; - } - else if (name.indexOf("this.") == 0) { - name = this.resolveThis(name); - } - - if (this.lastDoc) doc = this.lastDoc; - - symbol = new JSDOC.Symbol(name, params, "OBJECT", doc); - if (isInner) symbol.isInner = true; - - - if (doc) JSDOC.Parser.addSymbol(symbol); - } - // foo: {} - else if (this.ts.look(1).is("COLON") && this.ts.look(2).is("LEFT_CURLY")) { - name = (this.namescope.last().alias+"."+name).replace("#.", "#"); - - if (this.lastDoc) doc = this.lastDoc; - - symbol = new JSDOC.Symbol(name, params, "OBJECT", doc); - - - if (doc) JSDOC.Parser.addSymbol(symbol); - - this.namescope.push(symbol); - - var matching = this.ts.getMatchingToken("LEFT_CURLY"); - if (matching) matching.popNamescope = name; - else LOG.warn("Mismatched } character. Can't parse code in file " + symbol.srcFile + "."); - } - // foo: x - else if (this.ts.look(1).is("COLON")) { - name = (this.namescope.last().alias+"."+name).replace("#.", "#");; - - if (this.lastDoc) doc = this.lastDoc; - - symbol = new JSDOC.Symbol(name, params, "OBJECT", doc); - - - if (doc) JSDOC.Parser.addSymbol(symbol); - } - // foo(...) - else if (this.ts.look(1).is("LEFT_PAREN")) { - if (typeof JSDOC.PluginManager != "undefined") { - var functionCall = {name: name}; - - var cursor = this.ts.cursor; - params = JSDOC.Walker.onParamList(this.ts.balance("LEFT_PAREN")); - this.ts.cursor = cursor; - - for (var i = 0; i < params.length; i++) - functionCall["arg" + (i + 1)] = params[i].name; - - JSDOC.PluginManager.run("onFunctionCall", functionCall); - if (functionCall.doc) { - this.ts.insertAhead(new JSDOC.Token(functionCall.doc, "COMM", "JSDOC")); - } - } - } - this.lastDoc = null; - } - else if (this.token.is("FUNCTION")) { // it's an anonymous function - if ( - (!this.ts.look(-1).is("COLON") || !this.ts.look(-1).is("ASSIGN")) - && !this.ts.look(1).is("NAME") - ) { - if (this.lastDoc) doc = this.lastDoc; - - name = "$anonymous"; - name = this.namescope.last().alias+"-"+name - - params = JSDOC.Walker.onParamList(this.ts.balance("LEFT_PAREN")); - - symbol = new JSDOC.Symbol(name, params, "FUNCTION", doc); - - JSDOC.Parser.addSymbol(symbol); - - this.namescope.push(symbol); - - var matching = this.ts.getMatchingToken("LEFT_CURLY"); - if (matching) matching.popNamescope = name; - else LOG.warn("Mismatched } character. Can't parse code in file " + symbol.srcFile + "."); - } - } - } - return true; -} - -/** - Resolves what "this." means when it appears in a name. - @param name The name that starts with "this.". - @returns The name with "this." resolved. - */ -JSDOC.Walker.prototype.resolveThis = function(name) { - name.match(/^this\.(.+)$/) - var nameFragment = RegExp.$1; - if (!nameFragment) return name; - - var symbol = this.namescope.last(); - var scopeType = symbol.scopeType || symbol.isa; - - // if we are in a constructor function, `this` means the instance - if (scopeType == "CONSTRUCTOR") { - name = symbol.alias+"#"+nameFragment; - } - - // if we are in an anonymous constructor function, `this` means the instance - else if (scopeType == "INSTANCE") { - name = symbol.alias+"."+nameFragment; - } - - // if we are in a function, `this` means the container (possibly the global) - else if (scopeType == "FUNCTION") { - // in a method of a prototype, so `this` means the constructor - if (symbol.alias.match(/(^.*)[#.-][^#.-]+/)) { - var parentName = RegExp.$1; - var parent = JSDOC.Parser.symbols.getSymbol(parentName); - - if (!parent) { - if (JSDOC.Lang.isBuiltin(parentName)) parent = JSDOC.Parser.addBuiltin(parentName); - else { - if (symbol.alias.indexOf("$anonymous") < 0) // these will be ignored eventually - LOG.warn("Trying to document "+symbol.alias+" without first documenting "+parentName+"."); - } - } - if (parent) name = parentName+(parent.is("CONSTRUCTOR")?"#":".")+nameFragment; - } - else { - parent = this.namescope.last(1); - name = parent.alias+(parent.is("CONSTRUCTOR")?"#":".")+nameFragment; - } - } - // otherwise it means the global - else { - name = nameFragment; - } - - return name; -} - -JSDOC.Walker.onParamList = function(/**Array*/paramTokens) { - if (!paramTokens) { - LOG.warn("Malformed parameter list. Can't parse code."); - return []; - } - var params = []; - for (var i = 0, l = paramTokens.length; i < l; i++) { - if (paramTokens[i].is("JSDOC")) { - var paramType = paramTokens[i].data.replace(/(^\/\*\* *| *\*\/$)/g, ""); - - if (paramTokens[i+1] && paramTokens[i+1].is("NAME")) { - i++; - params.push({type: paramType, name: paramTokens[i].data}); - } - } - else if (paramTokens[i].is("NAME")) { - params.push({name: paramTokens[i].data}); - } - } - return params; -} diff --git a/lib/jsdoc-toolkit/app/main.js b/lib/jsdoc-toolkit/app/main.js deleted file mode 100644 index f9008c87..00000000 --- a/lib/jsdoc-toolkit/app/main.js +++ /dev/null @@ -1,111 +0,0 @@ -/** - * @version $Id: main.js 818 2009-11-08 14:51:41Z micmath $ - */ - -function main() { - IO.include("lib/JSDOC.js"); - IO.includeDir("plugins/"); - - // process the options - - // the -c option: options are defined in a configuration file - if (JSDOC.opt.c) { - eval("JSDOC.conf = " + IO.readFile(JSDOC.opt.c)); - - LOG.inform("Using configuration file at '"+JSDOC.opt.c+"'."); - - for (var c in JSDOC.conf) { - if (c !== "D" && !defined(JSDOC.opt[c])) { // commandline overrules config file - JSDOC.opt[c] = JSDOC.conf[c]; - } - } - - if (typeof JSDOC.conf["_"] != "undefined") { - JSDOC.opt["_"] = JSDOC.opt["_"].concat(JSDOC.conf["_"]); - } - - LOG.inform("With configuration: "); - for (var o in JSDOC.opt) { - LOG.inform(" "+o+": "+JSDOC.opt[o]); - } - } - - // be verbose - if (JSDOC.opt.v) LOG.verbose = true; - - // send log messages to a file - if (JSDOC.opt.o) LOG.out = IO.open(JSDOC.opt.o); - - // run the unit tests - if (JSDOC.opt.T) { - LOG.inform("JsDoc Toolkit running in test mode at "+new Date()+"."); - IO.include("frame/Testrun.js"); - IO.include("test.js"); - } - else { - // a template must be defined and must be a directory path - if (!JSDOC.opt.t && System.getProperty("jsdoc.template.dir")) { - JSDOC.opt.t = System.getProperty("jsdoc.template.dir"); - } - if (JSDOC.opt.t && SYS.slash != JSDOC.opt.t.slice(-1)) { - JSDOC.opt.t += SYS.slash; - } - - // verbose messages about the options we were given - LOG.inform("JsDoc Toolkit main() running at "+new Date()+"."); - LOG.inform("With options: "); - for (var o in JSDOC.opt) { - LOG.inform(" "+o+": "+JSDOC.opt[o]); - } - - // initialize and build a symbolSet from your code - JSDOC.JsDoc(); - - // debugger's option: dump the entire symbolSet produced from your code - if (JSDOC.opt.Z) { - LOG.warn("So you want to see the data structure, eh? This might hang if you have circular refs..."); - IO.include("frame/Dumper.js"); - var symbols = JSDOC.JsDoc.symbolSet.toArray(); - for (var i = 0, l = symbols.length; i < l; i++) { - var symbol = symbols[i]; - print("// symbol: " + symbol.alias); - print(symbol.serialize()); - } - } - else { - if (typeof JSDOC.opt.t != "undefined") { - try { - // a file named "publish.js" must exist in the template directory - load(JSDOC.opt.t+"publish.js"); - - // and must define a function named "publish" - if (!publish) { - LOG.warn("No publish() function is defined in that template so nothing to do."); - } - else { - // which will be called with the symbolSet produced from your code - publish(JSDOC.JsDoc.symbolSet); - } - } - catch(e) { - LOG.warn("Sorry, that doesn't seem to be a valid template: "+JSDOC.opt.t+"publish.js : "+e); - } - } - else { - LOG.warn("No template given. Might as well read the usage notes."); - JSDOC.usage(); - } - } - } - - // notify of any warnings - if (!JSDOC.opt.q && LOG.warnings.length) { - print(LOG.warnings.length+" warning"+(LOG.warnings.length != 1? "s":"")+"."); - } - - // stop sending log messages to a file - if (LOG.out) { - LOG.out.flush(); - LOG.out.close(); - } -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/plugins/commentSrcJson.js b/lib/jsdoc-toolkit/app/plugins/commentSrcJson.js deleted file mode 100644 index e826b572..00000000 --- a/lib/jsdoc-toolkit/app/plugins/commentSrcJson.js +++ /dev/null @@ -1,20 +0,0 @@ -JSDOC.PluginManager.registerPlugin( - "JSDOC.commentSrcJson", - { - onDocCommentSrc: function(comment) { - var json; - if (/^\s*@json\b/.test(comment)) { - comment.src = new String(comment.src).replace("@json", ""); - - eval("json = "+comment.src); - var tagged = ""; - for (var i in json) { - var tag = json[i]; - // todo handle cases where tag is an object - tagged += "@"+i+" "+tag+"\n"; - } - comment.src = tagged; - } - } - } -); \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/plugins/frameworkPrototype.js b/lib/jsdoc-toolkit/app/plugins/frameworkPrototype.js deleted file mode 100644 index 9c417518..00000000 --- a/lib/jsdoc-toolkit/app/plugins/frameworkPrototype.js +++ /dev/null @@ -1,16 +0,0 @@ -JSDOC.PluginManager.registerPlugin( - "JSDOC.frameworkPrototype", - { - onPrototypeClassCreate: function(classCreator) { - var desc = ""; - if (classCreator.comment) { - desc = classCreator.comment; - } - var insert = desc+"/** @name "+classCreator.name+"\n@constructor\n@scope "+classCreator.name+".prototype */" - - insert = insert.replace(/\*\/\/\*\*/g, "\n"); - /*DEBUG*///print("insert is "+insert); - classCreator.addComment.data = insert; - } - } -); diff --git a/lib/jsdoc-toolkit/app/plugins/functionCall.js b/lib/jsdoc-toolkit/app/plugins/functionCall.js deleted file mode 100644 index 6f87705e..00000000 --- a/lib/jsdoc-toolkit/app/plugins/functionCall.js +++ /dev/null @@ -1,10 +0,0 @@ -JSDOC.PluginManager.registerPlugin( - "JSDOC.functionCall", - { - onFunctionCall: function(functionCall) { - if (functionCall.name == "dojo.define" && functionCall.arg1) { - functionCall.doc = "/** @lends "+eval(functionCall.arg1)+".prototype */"; - } - } - } -); \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/plugins/publishSrcHilite.js b/lib/jsdoc-toolkit/app/plugins/publishSrcHilite.js deleted file mode 100644 index 65514f2c..00000000 --- a/lib/jsdoc-toolkit/app/plugins/publishSrcHilite.js +++ /dev/null @@ -1,62 +0,0 @@ -JSDOC.PluginManager.registerPlugin( - "JSDOC.publishSrcHilite", - { - onPublishSrc: function(src) { - if (src.path in JsHilite.cache) { - return; // already generated src code - } - else JsHilite.cache[src.path] = true; - - try { - var sourceCode = IO.readFile(src.path); - } - catch(e) { - print(e.message); - quit(); - } - - var hiliter = new JsHilite(sourceCode, src.charset); - src.hilited = hiliter.hilite(); - } - } -); - -function JsHilite(src, charset) { - - var tr = new JSDOC.TokenReader(); - - tr.keepComments = true; - tr.keepDocs = true; - tr.keepWhite = true; - - this.tokens = tr.tokenize(new JSDOC.TextStream(src)); - - // TODO is redefining toString() the best way? - JSDOC.Token.prototype.toString = function() { - return ""+this.data.replace(/"; - } - - if (!charset) charset = "utf-8"; - - this.header = ' '+ - "

";
-	this.footer = "
"; - this.showLinenumbers = true; -} - -JsHilite.cache = {}; - -JsHilite.prototype.hilite = function() { - var hilited = this.tokens.join(""); - var line = 1; - if (this.showLinenumbers) hilited = hilited.replace(/(^|\n)/g, function(m){return m+""+((line<10)? " ":"")+((line<100)? " ":"")+(line++)+" "}); - - return this.header+hilited+this.footer; -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/plugins/symbolLink.js b/lib/jsdoc-toolkit/app/plugins/symbolLink.js deleted file mode 100644 index c87f1ca7..00000000 --- a/lib/jsdoc-toolkit/app/plugins/symbolLink.js +++ /dev/null @@ -1,10 +0,0 @@ -JSDOC.PluginManager.registerPlugin( - "JSDOC.symbolLink", - { - onSymbolLink: function(link) { - // modify link.linkPath (the href part of the link) - // or link.linkText (the text displayed) - // or link.linkInner (the #name part of the link) - } - } -); \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/plugins/tagParamConfig.js b/lib/jsdoc-toolkit/app/plugins/tagParamConfig.js deleted file mode 100644 index 3ea8a1be..00000000 --- a/lib/jsdoc-toolkit/app/plugins/tagParamConfig.js +++ /dev/null @@ -1,31 +0,0 @@ -JSDOC.PluginManager.registerPlugin( - "JSDOC.tagParamConfig", - { - onDocCommentTags: function(comment) { - var currentParam = null; - var tags = comment.tags; - for (var i = 0, l = tags.length; i < l; i++) { - - if (tags[i].title == "param") { - if (tags[i].name.indexOf(".") == -1) { - currentParam = i; - } - } - else if (tags[i].title == "config") { - tags[i].title = "param"; - if (currentParam == null) { - tags[i].name = "arguments"+"."+tags[i].name; - } - else if (tags[i].name.indexOf(tags[currentParam].name+".") != 0) { - tags[i].name = tags[currentParam].name+"."+tags[i].name; - } - currentParam != null - //tags[currentParam].properties.push(tags[i]); - } - else { - currentParam = null; - } - } - } - } -); diff --git a/lib/jsdoc-toolkit/app/plugins/tagSynonyms.js b/lib/jsdoc-toolkit/app/plugins/tagSynonyms.js deleted file mode 100644 index 49a874f1..00000000 --- a/lib/jsdoc-toolkit/app/plugins/tagSynonyms.js +++ /dev/null @@ -1,43 +0,0 @@ -JSDOC.PluginManager.registerPlugin( - "JSDOC.tagSynonyms", - { - onDocCommentSrc: function(comment) { - comment.src = comment.src.replace(/@methodOf\b/i, "@function\n@memberOf"); - comment.src = comment.src.replace(/@fieldOf\b/i, "@field\n@memberOf"); - }, - - onDocCommentTags: function(comment) { - for (var i = 0, l = comment.tags.length; i < l; i++) { - var title = comment.tags[i].title.toLowerCase(); - var syn; - if ((syn = JSDOC.tagSynonyms.synonyms["="+title])) { - comment.tags[i].title = syn; - } - } - } - } -); - -new Namespace( - "JSDOC.tagSynonyms", - function() { - JSDOC.tagSynonyms.synonyms = { - "=member": "memberOf", - "=memberof": "memberOf", - "=description": "desc", - "=exception": "throws", - "=argument": "param", - "=returns": "return", - "=classdescription": "class", - "=fileoverview": "overview", - "=extends": "augments", - "=base": "augments", - "=projectdescription": "overview", - "=classdescription": "class", - "=link": "see", - "=borrows": "inherits", - "=scope": "lends", - "=construct": "constructor" - } - } -); \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/run.js b/lib/jsdoc-toolkit/app/run.js deleted file mode 100644 index 1f875cdb..00000000 --- a/lib/jsdoc-toolkit/app/run.js +++ /dev/null @@ -1,348 +0,0 @@ -/** - * @fileOverview - * A bootstrap script that creates some basic required objects - * for loading other scripts. - * @author Michael Mathews, micmath@gmail.com - * @version $Id: run.js 756 2009-01-07 21:32:58Z micmath $ - */ - -/** - * @namespace Keep track of any messages from the running script. - */ -LOG = { - warn: function(msg, e) { - if (JSDOC.opt.q) return; - if (e) msg = e.fileName+", line "+e.lineNumber+": "+msg; - - msg = ">> WARNING: "+msg; - LOG.warnings.push(msg); - if (LOG.out) LOG.out.write(msg+"\n"); - else print(msg); - }, - - inform: function(msg) { - if (JSDOC.opt.q) return; - msg = " > "+msg; - if (LOG.out) LOG.out.write(msg+"\n"); - else if (typeof LOG.verbose != "undefined" && LOG.verbose) print(msg); - } -}; -LOG.warnings = []; -LOG.verbose = false -LOG.out = undefined; - -/** - * @class Manipulate a filepath. - */ -function FilePath(absPath, separator) { - this.slash = separator || "/"; - this.root = this.slash; - this.path = []; - this.file = ""; - - var parts = absPath.split(/[\\\/]/); - if (parts) { - if (parts.length) this.root = parts.shift() + this.slash; - if (parts.length) this.file = parts.pop() - if (parts.length) this.path = parts; - } - - this.path = this.resolvePath(); -} - -/** Collapse any dot-dot or dot items in a filepath. */ -FilePath.prototype.resolvePath = function() { - var resolvedPath = []; - for (var i = 0; i < this.path.length; i++) { - if (this.path[i] == "..") resolvedPath.pop(); - else if (this.path[i] != ".") resolvedPath.push(this.path[i]); - } - return resolvedPath; -} - -/** Trim off the filename. */ -FilePath.prototype.toDir = function() { - if (this.file) this.file = ""; - return this; -} - -/** Go up a directory. */ -FilePath.prototype.upDir = function() { - this.toDir(); - if (this.path.length) this.path.pop(); - return this; -} - -FilePath.prototype.toString = function() { - return this.root - + this.path.join(this.slash) - + ((this.path.length > 0)? this.slash : "") - + this.file; -} - -/** - * Turn a path into just the name of the file. - */ -FilePath.fileName = function(path) { - var nameStart = Math.max(path.lastIndexOf("/")+1, path.lastIndexOf("\\")+1, 0); - return path.substring(nameStart); -} - -/** - * Get the extension of a filename - */ -FilePath.fileExtension = function(filename) { - return filename.split(".").pop().toLowerCase(); -}; - -/** - * Turn a path into just the directory part. - */ -FilePath.dir = function(path) { - var nameStart = Math.max(path.lastIndexOf("/")+1, path.lastIndexOf("\\")+1, 0); - return path.substring(0, nameStart-1); -} - - -importClass(java.lang.System); - -/** - * @namespace A collection of information about your system. - */ -SYS = { - /** - * Information about your operating system: arch, name, version. - * @type string - */ - os: [ - new String(System.getProperty("os.arch")), - new String(System.getProperty("os.name")), - new String(System.getProperty("os.version")) - ].join(", "), - - /** - * Which way does your slash lean. - * @type string - */ - slash: System.getProperty("file.separator")||"/", - - /** - * The path to the working directory where you ran java. - * @type string - */ - userDir: new String(System.getProperty("user.dir")), - - /** - * Where is Java's home folder. - * @type string - */ - javaHome: new String(System.getProperty("java.home")), - - /** - * The absolute path to the directory containing this script. - * @type string - */ - pwd: undefined -}; - -// jsrun appends an argument, with the path to here. -if (arguments[arguments.length-1].match(/^-j=(.+)/)) { - if (RegExp.$1.charAt(0) == SYS.slash || RegExp.$1.charAt(1) == ":") { // absolute path to here - SYS.pwd = new FilePath(RegExp.$1).toDir().toString(); - } - else { // relative path to here - SYS.pwd = new FilePath(SYS.userDir + SYS.slash + RegExp.$1).toDir().toString(); - } - arguments.pop(); -} -else { - print("The run.js script requires you use jsrun.jar."); - quit(); -} - -// shortcut -var File = Packages.java.io.File; - -/** - * @namespace A collection of functions that deal with reading a writing to disk. - */ -IO = { - - /** - * Create a new file in the given directory, with the given name and contents. - */ - saveFile: function(/**string*/ outDir, /**string*/ fileName, /**string*/ content) { - var out = new Packages.java.io.PrintWriter( - new Packages.java.io.OutputStreamWriter( - new Packages.java.io.FileOutputStream(outDir+SYS.slash+fileName), - IO.encoding - ) - ); - out.write(content); - out.flush(); - out.close(); - }, - - /** - * @type string - */ - readFile: function(/**string*/ path) { - if (!IO.exists(path)) { - throw "File doesn't exist there: "+path; - } - return readFile(path, IO.encoding); - }, - - /** - * @param inFile - * @param outDir - * @param [fileName=The original filename] - */ - copyFile: function(/**string*/ inFile, /**string*/ outDir, /**string*/ fileName) { - if (fileName == null) fileName = FilePath.fileName(inFile); - - var inFile = new File(inFile); - var outFile = new File(outDir+SYS.slash+fileName); - - var bis = new Packages.java.io.BufferedInputStream(new Packages.java.io.FileInputStream(inFile), 4096); - var bos = new Packages.java.io.BufferedOutputStream(new Packages.java.io.FileOutputStream(outFile), 4096); - var theChar; - while ((theChar = bis.read()) != -1) { - bos.write(theChar); - } - bos.close(); - bis.close(); - }, - - /** - * Creates a series of nested directories. - */ - mkPath: function(/**Array*/ path) { - if (path.constructor != Array) path = path.split(/[\\\/]/); - var make = ""; - for (var i = 0, l = path.length; i < l; i++) { - make += path[i] + SYS.slash; - if (! IO.exists(make)) { - IO.makeDir(make); - } - } - }, - - /** - * Creates a directory at the given path. - */ - makeDir: function(/**string*/ path) { - (new File(path)).mkdir(); - }, - - /** - * @type string[] - * @param dir The starting directory to look in. - * @param [recurse=1] How many levels deep to scan. - * @returns An array of all the paths to files in the given dir. - */ - ls: function(/**string*/ dir, /**number*/ recurse, _allFiles, _path) { - if (_path === undefined) { // initially - var _allFiles = []; - var _path = [dir]; - } - if (_path.length == 0) return _allFiles; - if (recurse === undefined) recurse = 1; - - dir = new File(dir); - if (!dir.directory) return [String(dir)]; - var files = dir.list(); - - for (var f = 0; f < files.length; f++) { - var file = String(files[f]); - if (file.match(/^\.[^\.\/\\]/)) continue; // skip dot files - - if ((new File(_path.join(SYS.slash)+SYS.slash+file)).list()) { // it's a directory - _path.push(file); - if (_path.length-1 < recurse) IO.ls(_path.join(SYS.slash), recurse, _allFiles, _path); - _path.pop(); - } - else { - _allFiles.push((_path.join(SYS.slash)+SYS.slash+file).replace(SYS.slash+SYS.slash, SYS.slash)); - } - } - - return _allFiles; - }, - - /** - * @type boolean - */ - exists: function(/**string*/ path) { - file = new File(path); - - if (file.isDirectory()){ - return true; - } - if (!file.exists()){ - return false; - } - if (!file.canRead()){ - return false; - } - return true; - }, - - /** - * - */ - open: function(/**string*/ path, /**string*/ append) { - var append = true; - var outFile = new File(path); - var out = new Packages.java.io.PrintWriter( - new Packages.java.io.OutputStreamWriter( - new Packages.java.io.FileOutputStream(outFile, append), - IO.encoding - ) - ); - return out; - }, - - /** - * Sets {@link IO.encoding}. - * Encoding is used when reading and writing text to files, - * and in the meta tags of HTML output. - */ - setEncoding: function(/**string*/ encoding) { - if (/ISO-8859-([0-9]+)/i.test(encoding)) { - IO.encoding = "ISO8859_"+RegExp.$1; - } - else { - IO.encoding = encoding; - } - }, - - /** - * @default "utf-8" - * @private - */ - encoding: "utf-8", - - /** - * Load the given script. - */ - include: function(relativePath) { - load(SYS.pwd+relativePath); - }, - - /** - * Loads all scripts from the given directory path. - */ - includeDir: function(path) { - if (!path) return; - - for (var lib = IO.ls(SYS.pwd+path), i = 0; i < lib.length; i++) - if (/\.js$/i.test(lib[i])) load(lib[i]); - } -} - -// now run the application -IO.include("frame.js"); -IO.include("main.js"); - -main(); diff --git a/lib/jsdoc-toolkit/app/t/TestDoc.js b/lib/jsdoc-toolkit/app/t/TestDoc.js deleted file mode 100644 index c0768b71..00000000 --- a/lib/jsdoc-toolkit/app/t/TestDoc.js +++ /dev/null @@ -1,144 +0,0 @@ -var TestDoc = { - fails: 0, - plans: 0, - passes: 0, - results: [] -}; - -TestDoc.record = function(result) { - TestDoc.results.push(result); - if (typeof result.verdict == "boolean") { - if (result.verdict === false) TestDoc.fails++; - if (result.verdict === true) TestDoc.passes++; - } -} - -TestDoc.prove = function(filePath) { - if (typeof document != "undefined" && typeof document.write != "undefined") { - if (TestDoc.console) print = function(s) { TestDoc.console.appendChild(document.createTextNode(s+"\n")); } - else print = function(s) { document.write(s+"
"); } - } - TestDoc.run(TestDoc.readFile(filePath)); -} - -TestDoc.run = function(src) { - try { eval(src); } catch(e) { print("# ERROR! "+e); } - - var chunks = src.split(/\/\*t:/); - - var run = function(chunk) { - // local shortcuts - var is = TestDoc.assertEquals; - var isnt = TestDoc.assertNotEquals; - var plan = TestDoc.plan; - var requires = TestDoc.requires; - - try { eval(chunk); } catch(e) { print("# ERROR! "+e); } - } - for (var start = -1, end = 0; (start = src.indexOf("/*t:", end)) > end; start = end) { - run( - src.substring( - start+4, - (end = src.indexOf("*/", start)) - ) - ); - } -} - -TestDoc.Result = function(verdict, message) { - this.verdict = verdict; - this.message = message; -} - -TestDoc.Result.prototype.toString = function() { - if (typeof this.verdict == "boolean") { - return (this.verdict? "ok" : "not ok") + " " + (++TestDoc.report.counter) + " - " + this.message; - } - - return "# " + this.message; -} - -TestDoc.requires = function(file) { - if (!TestDoc.requires.loaded[file]) { - load(file); - TestDoc.requires.loaded[file] = true; - } -} -TestDoc.requires.loaded = {}; - -TestDoc.report = function() { - TestDoc.report.counter = 0; - print("1.."+TestDoc.plans); - for (var i = 0; i < TestDoc.results.length; i++) { - print(TestDoc.results[i]); - } - print("----------------------------------------"); - if (TestDoc.fails == 0 && TestDoc.passes == TestDoc.plans) { - print("All tests successful."); - } - else { - print("Failed " + TestDoc.fails + "/" + TestDoc.plans + " tests, "+((TestDoc.plans == 0)? 0 : Math.round(TestDoc.passes/(TestDoc.passes+TestDoc.fails)*10000)/100)+"% okay. Planned to run "+TestDoc.plans+", did run "+(TestDoc.passes+TestDoc.fails)+".") - } -} - -TestDoc.plan = function(n, message) { - TestDoc.plans += n; - TestDoc.record(new TestDoc.Result(null, message+" ("+n+" tests)")); -} - -TestDoc.assertEquals = function(a, b, message) { - var result = (a == b); - if (!result) message += "\n#\n# " + a + " does not equal " + b + "\n#"; - TestDoc.record(new TestDoc.Result(result, message)); -} - -TestDoc.assertNotEquals = function(a, b, message) { - var result = (a != b); - if (!result) message += "\n#\n# " + a + " equals " + b + "\n#"; - TestDoc.record(new TestDoc.Result(result, message)); -} - -TestDoc.readFile = (function(){ - // rhino - if (typeof readFile == "function") { - return function(url) { - var text = readFile(url); - return text || ""; - } - } - - // a web browser - else { - return function(url) { - var httpRequest; - - if (window.XMLHttpRequest) { // Mozilla, Safari, etc - httpRequest = new XMLHttpRequest(); - } - else if (window.ActiveXObject) { // IE - try { - httpRequest = new ActiveXObject("Msxml2.XMLHTTP"); - } - catch (e) { - try { - httpRequest = new ActiveXObject("Microsoft.XMLHTTP"); - } - catch (e) { - } - } - } - - if (!httpRequest) { throw "Cannot create HTTP Request."; } - - httpRequest.open('GET', url, false); - httpRequest.send(''); - if (httpRequest.readyState == 4) { - if (httpRequest.status >= 400) { - throw "The HTTP Request returned an error code: "+httpRequest.status; - } - } - - return httpRequest.responseText || ""; - } - } -})(); diff --git a/lib/jsdoc-toolkit/app/t/runner.js b/lib/jsdoc-toolkit/app/t/runner.js deleted file mode 100644 index 3f9fb4c9..00000000 --- a/lib/jsdoc-toolkit/app/t/runner.js +++ /dev/null @@ -1,13 +0,0 @@ -// try: java -jar ../../jsrun.jar runner.js - -load("TestDoc.js"); - -TestDoc.prove("../frame/Opt.js"); -TestDoc.prove("../lib/JSDOC.js"); -TestDoc.prove("../frame/String.js"); -TestDoc.prove("../lib/JSDOC/DocTag.js"); -TestDoc.prove("../lib/JSDOC/DocComment.js"); -TestDoc.prove("../lib/JSDOC/TokenReader.js"); -TestDoc.prove("../lib/JSDOC/Symbol.js"); - -TestDoc.report(); diff --git a/lib/jsdoc-toolkit/app/test.js b/lib/jsdoc-toolkit/app/test.js deleted file mode 100644 index 8b2dc8b1..00000000 --- a/lib/jsdoc-toolkit/app/test.js +++ /dev/null @@ -1,342 +0,0 @@ -load("app/frame/Dumper.js"); -function symbolize(opt) { - symbols = null; - JSDOC.JsDoc(opt); - symbols = JSDOC.JsDoc.symbolSet; -} - -var testCases = [ - function() { - symbolize({a:true, p:true, _: [SYS.pwd+"test/overview.js"]}); - //print(Dumper.dump(symbols)); - is('symbols.getSymbolByName("My Cool Library").name', 'My Cool Library', 'File overview can be found by alias.'); - } - , - function() { - symbolize({_: [SYS.pwd+"test/name.js"]}); - - is('symbols.getSymbol("Response").name', "Response", 'Virtual class name is found.'); - is('symbols.getSymbol("Response#text").alias', "Response#text", 'Virtual method name is found.'); - is('symbols.getSymbol("Response#text").memberOf', "Response", 'Virtual method parent name is found.'); - } - , - function() { - symbolize({a:true, p:true, _: [SYS.pwd+"test/prototype.js"]}); - - is('symbols.getSymbol("Article").name', "Article", 'Function set to constructor prototype with inner constructor name is found.'); - is('symbols.getSymbol("Article").hasMethod("init")', true, 'The initializer method name of prototype function is correct.'); - is('symbols.getSymbol("Article").hasMember("counter")', true, 'A static property set in the prototype definition is found.'); - is('symbols.getSymbol("Article").hasMember("title")', true, 'An instance property set in the prototype is found.'); - is('symbols.getSymbol("Article#title").isStatic', false, 'An instance property has isStatic set to false.'); - is('symbols.getSymbol("Article.counter").name', "counter", 'A static property set in the initializer has the name set correctly.'); - is('symbols.getSymbol("Article.counter").memberOf', "Article", 'A static property set in the initializer has the memberOf set correctly.'); - is('symbols.getSymbol("Article.counter").isStatic', true, 'A static property set in the initializer has isStatic set to true.'); - } - , - function() { - symbolize({a:true, _: [SYS.pwd+"test/prototype_oblit.js"]}); - - is('symbols.getSymbol("Article").name', "Article", 'Oblit set to constructor prototype name is found.'); - is('typeof symbols.getSymbol("Article.prototype")', "undefined", 'The prototype oblit is not a symbol.'); - is('symbols.getSymbol("Article#getTitle").name', "getTitle", 'The nonstatic method name of prototype oblit is correct.'); - is('symbols.getSymbol("Article#getTitle").alias', "Article#getTitle", 'The alias of non-static method of prototype oblit is correct.'); - is('symbols.getSymbol("Article#getTitle").isStatic', false, 'The isStatic of a nonstatic method of prototype oblit is correct.'); - is('symbols.getSymbol("Article.getTitle").name', "getTitle", 'The static method name of prototype oblit is correct.'); - is('symbols.getSymbol("Article.getTitle").isStatic', true, 'The isStatic of a static method of prototype oblit is correct.'); - is('symbols.getSymbol("Article#getTitle").isa', "FUNCTION", 'The isa of non-static method of prototype oblit is correct.'); - is('symbols.getSymbol("Article.getTitle").alias', "Article.getTitle", 'The alias of a static method of prototype oblit is correct.'); - is('symbols.getSymbol("Article.getTitle").isa', "FUNCTION", 'The isa of static method of prototype oblit is correct.'); - } - , - function() { - symbolize({a:true, p:true, _: [SYS.pwd+"test/prototype_oblit_constructor.js"]}); - - is('symbols.getSymbol("Article").name', "Article", 'Oblit set to constructor prototype with inner constructor name is found.'); - is('symbols.getSymbol("Article#init").name', "init", 'The initializer method name of prototype oblit is correct.'); - is('symbols.getSymbol("Article").hasMember("pages")', true, 'Property set by initializer method "this" is on the outer constructor.'); - is('symbols.getSymbol("Article#Title").name', "Title", 'Name of the inner constructor name is found.'); - is('symbols.getSymbol("Article#Title").memberOf', "Article", 'The memberOf of the inner constructor name is found.'); - is('symbols.getSymbol("Article#Title").isa', "CONSTRUCTOR", 'The isa of the inner constructor name is constructor.'); - is('symbols.getSymbol("Article#Title").hasMember("title")', true, 'A property set on the inner constructor "this" is on the inner constructor.'); - } - , - function() { - symbolize({a:true, p:true, _: [SYS.pwd+"test/inner.js"]}); - - is('symbols.getSymbol("Outer").name', "Outer", 'Outer constructor prototype name is found.'); - is('symbols.getSymbol("Outer").methods.length', 1, 'Inner function doesnt appear as a method of the outer.'); - is('symbols.getSymbol("Outer").hasMethod("open")', true, 'Outer constructors methods arent affected by inner function.'); - is('symbols.getSymbol("Outer-Inner").alias', "Outer-Inner", 'Alias of inner function is found.'); - is('symbols.getSymbol("Outer-Inner").isa', "CONSTRUCTOR", 'isa of inner function constructor is found.'); - is('symbols.getSymbol("Outer-Inner").memberOf', "Outer", 'The memberOf of inner function is found.'); - is('symbols.getSymbol("Outer-Inner").name', "Inner", 'The name of inner function is found.'); - is('symbols.getSymbol("Outer-Inner#name").name', "name", 'A member of the inner function constructor, attached to "this" is found on inner.'); - is('symbols.getSymbol("Outer-Inner#name").memberOf', "Outer-Inner", 'The memberOf of an inner function member is found.'); - } - , - function() { - symbolize({a:true, _: [SYS.pwd+"test/prototype_nested.js"]}); - - is('symbols.getSymbol("Word").name', "Word", 'Base constructor name is found.'); - is('symbols.getSymbol("Word").hasMethod("reverse")', true, 'Base constructor method is found.'); - is('symbols.getSymbol("Word").methods.length', 1, 'Base constructor has only one method.'); - is('symbols.getSymbol("Word").memberOf', "", 'Base constructor memberOf is empty.'); - is('symbols.getSymbol("Word#reverse").name', "reverse", 'Member of constructor prototype name is found.'); - is('symbols.getSymbol("Word#reverse").memberOf', "Word", 'Member of constructor prototype memberOf is found.'); - is('symbols.getSymbol("Word#reverse.utf8").name', "utf8", 'Member of constructor prototype method name is found.'); - is('symbols.getSymbol("Word#reverse.utf8").memberOf', "Word#reverse", 'Static nested member memberOf is found.'); - } - , - function() { - symbolize({a:true, _: [SYS.pwd+"test/namespace_nested.js"]}); - - is('symbols.getSymbol("ns1").name', "ns1", 'Base namespace name is found.'); - is('symbols.getSymbol("ns1").memberOf', "", 'Base namespace memberOf is empty (its a constructor).'); - is('symbols.getSymbol("ns1.ns2").name', "ns2", 'Nested namespace name is found.'); - is('symbols.getSymbol("ns1.ns2").alias', "ns1.ns2", 'Nested namespace alias is found.'); - is('symbols.getSymbol("ns1.ns2").memberOf', "ns1", 'Nested namespace memberOf is found.'); - is('symbols.getSymbol("ns1.ns2.Function1").name', "Function1", 'Method of nested namespace name is found.'); - is('symbols.getSymbol("ns1.ns2.Function1").memberOf', "ns1.ns2", 'Constructor of nested namespace memberOf is found.'); - } - , - function() { - symbolize({a:true, p:true, _: [SYS.pwd+"test/functions_nested.js"]}); - - is('symbols.getSymbol("Zop").name', "Zop", 'Any constructor name is found.'); - is('symbols.getSymbol("Zop").isa', "CONSTRUCTOR", 'It isa constructor.'); - is('symbols.getSymbol("Zop").hasMethod("zap")', true, 'Its method name, set later, is in methods array.'); - is('symbols.getSymbol("Foo").name', "Foo", 'The containing constructor name is found.'); - is('symbols.getSymbol("Foo").hasMethod("methodOne")', true, 'Its method name is found.'); - is('symbols.getSymbol("Foo").hasMethod("methodTwo")', true, 'Its second method name is found.'); - is('symbols.getSymbol("Foo#methodOne").alias', "Foo#methodOne", 'A methods alias is found.'); - is('symbols.getSymbol("Foo#methodOne").isStatic', false, 'A methods is not static.'); - is('symbols.getSymbol("Bar").name', "Bar", 'A global function declared inside another function is found.'); - is('symbols.getSymbol("Bar").isa', "FUNCTION", 'It isa function.'); - is('symbols.getSymbol("Bar").memberOf', "_global_", 'It is global.'); - is('symbols.getSymbol("Foo-inner").name', "inner", 'An inner functions name is found.'); - is('symbols.getSymbol("Foo-inner").memberOf', "Foo", 'It is member of the outer function.'); - is('symbols.getSymbol("Foo-inner").isInner', true, 'It is an inner function.'); - } - , - function() { - symbolize({a:true, _: [SYS.pwd+"test/memberof_constructor.js"]}); - - is('symbols.getSymbol("Circle#Tangent").name', "Tangent", 'Constructor set on prototype using @member has correct name.'); - is('symbols.getSymbol("Circle#Tangent").memberOf', "Circle", 'Constructor set on prototype using @member has correct memberOf.'); - is('symbols.getSymbol("Circle#Tangent").alias', "Circle#Tangent", 'Constructor set on prototype using @member has correct alias.'); - is('symbols.getSymbol("Circle#Tangent").isa', "CONSTRUCTOR", 'Constructor set on prototype using @member has correct isa.'); - is('symbols.getSymbol("Circle#Tangent").isStatic', false, 'Constructor set on prototype using @member is not static.'); - is('symbols.getSymbol("Circle#Tangent#getDiameter").name', "getDiameter", 'Method set on prototype using @member has correct name.'); - is('symbols.getSymbol("Circle#Tangent#getDiameter").memberOf', "Circle#Tangent", 'Method set on prototype using @member has correct memberOf.'); - is('symbols.getSymbol("Circle#Tangent#getDiameter").alias', "Circle#Tangent#getDiameter", 'Method set on prototype using @member has correct alias.'); - is('symbols.getSymbol("Circle#Tangent#getDiameter").isa', "FUNCTION", 'Method set on prototype using @member has correct isa.'); - is('symbols.getSymbol("Circle#Tangent#getDiameter").isStatic', false, 'Method set on prototype using @member is not static.'); - } - , - function() { - symbolize({a:true, p: true, _: [SYS.pwd+"test/memberof.js"]}); - - is('symbols.getSymbol("pack.install").alias', "pack.install", 'Using @memberOf sets alias, when parent name is in memberOf tag.'); - is('symbols.getSymbol("pack.install.overwrite").name', "install.overwrite", 'Using @memberOf sets name, even if the name is dotted.'); - is('symbols.getSymbol("pack.install.overwrite").memberOf', "pack", 'Using @memberOf sets memberOf.'); - is('symbols.getSymbol("pack.install.overwrite").isStatic', true, 'Using @memberOf with value not ending in octothorp sets isStatic to true.'); - } - , - function() { - symbolize({a:true, p: true, _: [SYS.pwd+"test/memberof2.js"]}); - - is('symbols.getSymbol("Foo#bar").alias', "Foo#bar", 'An inner function can be documented as an instance method.'); - is('symbols.getSymbol("Foo.zip").alias', "Foo.zip", 'An inner function can be documented as a static method.'); - is('symbols.getSymbol("Foo.Fiz").alias', "Foo.Fiz", 'An inner function can be documented as a static constructor.'); - is('symbols.getSymbol("Foo.Fiz#fipple").alias', "Foo.Fiz#fipple", 'An inner function can be documented as a static constructor with a method.'); - is('symbols.getSymbol("Foo#blat").alias', "Foo#blat", 'An global function can be documented as an instance method.'); - } - , - function() { - symbolize({a:true, p: true, _: [SYS.pwd+"test/memberof3.js"]}); - - is('symbols.getSymbol("Foo#bar").alias', "Foo#bar", 'A virtual field can be documented as an instance method.'); - is('symbols.getSymbol("Foo2#bar").alias', "Foo2#bar", 'A virtual field with the same name can be documented as an instance method.'); - } - , - function() { - symbolize({a:true, p:true, _: [SYS.pwd+"test/borrows.js"]}); - - is('symbols.getSymbol("Layout").name', "Layout", 'Constructor can be found.'); - is('symbols.getSymbol("Layout").hasMethod("init")', true, 'Constructor method name can be found.'); - is('symbols.getSymbol("Layout").hasMember("orientation")', true, 'Constructor property name can be found.'); - - is('symbols.getSymbol("Page").hasMethod("reset")', true, 'Second constructor method name can be found.'); - is('symbols.getSymbol("Page").hasMember("orientation")', true, 'Second constructor borrowed property name can be found in properties.'); - is('symbols.getSymbol("Page#orientation").memberOf', "Page", 'Second constructor borrowed property memberOf can be found.'); - is('symbols.getSymbol("Page-getInnerElements").alias', "Page-getInnerElements", 'Can borrow an inner function and it is still inner.'); - is('symbols.getSymbol("Page.units").alias', "Page.units", 'Can borrow a static function and it is still static.'); - - is('symbols.getSymbol("ThreeColumnPage#init").alias', "ThreeColumnPage#init", 'Third constructor method can be found even though method with same name is borrowed.'); - is('symbols.getSymbol("ThreeColumnPage#reset").alias', "ThreeColumnPage#reset", 'Borrowed method can be found.'); - is('symbols.getSymbol("ThreeColumnPage#orientation").alias', "ThreeColumnPage#orientation", 'Twice borrowed method can be found.'); - - } - , - function() { - symbolize({a:true, p:true, _: [SYS.pwd+"test/borrows2.js"]}); - - is('symbols.getSymbol("Foo").hasMethod("my_zop")', true, 'Borrowed method can be found.'); - is('symbols.getSymbol("Bar").hasMethod("my_zip")', true, 'Second borrowed method can be found.'); - } - , - function() { - symbolize({a:true, p:true, _: [SYS.pwd+"test/constructs.js"]}); - - is('symbols.getSymbol("Person").hasMethod("say")', true, 'The constructs tag creates a class that lends can add a method to.'); - } - , - function() { - symbolize({a: true, _: [SYS.pwd+"test/augments.js", SYS.pwd+"test/augments2.js"]}); - - is('symbols.getSymbol("Page").augments[0]', "Layout", 'An augmented class can be found.'); - is('symbols.getSymbol("Page#reset").alias', "Page#reset", 'Method of augmenter can be found.'); - is('symbols.getSymbol("Page").hasMethod("Layout#init")', true, 'Method from augmented can be found.'); - is('symbols.getSymbol("Page").hasMember("Layout#orientation")', true, 'Property from augmented can be found.'); - is('symbols.getSymbol("Page").methods.length', 3, 'Methods of augmented class are included in methods array.'); - - is('symbols.getSymbol("ThreeColumnPage").augments[0]', "Page", 'The extends tag is a synonym for augments.'); - is('symbols.getSymbol("ThreeColumnPage").hasMethod("ThreeColumnPage#init")', true, 'Local method overrides augmented method of same name.'); - is('symbols.getSymbol("ThreeColumnPage").methods.length', 3, 'Local method count is right.'); - - is('symbols.getSymbol("NewsletterPage").augments[0]', "ThreeColumnPage", 'Can augment across file boundaries.'); - is('symbols.getSymbol("NewsletterPage").augments.length', 2, 'Multiple augments are supported.'); - is('symbols.getSymbol("NewsletterPage").inherits[0].alias', "Junkmail#annoy", 'Inherited method with augments.'); - is('symbols.getSymbol("NewsletterPage").methods.length', 6, 'Methods of augmented class are included in methods array across files.'); - is('symbols.getSymbol("NewsletterPage").properties.length', 1, 'Properties of augmented class are included in properties array across files.'); - } - , - function() { - symbolize({a:true, _: [SYS.pwd+"test/static_this.js"]}); - - is('symbols.getSymbol("box.holder").name', "holder", 'Static namespace name can be found.'); - is('symbols.getSymbol("box.holder.foo").name', "foo", 'Static namespace method name can be found.'); - is('symbols.getSymbol("box.holder").isStatic', true, 'Static namespace method is static.'); - - is('symbols.getSymbol("box.holder.counter").name', "counter", 'Instance namespace property name set on "this" can be found.'); - is('symbols.getSymbol("box.holder.counter").alias', "box.holder.counter", 'Instance namespace property alias set on "this" can be found.'); - is('symbols.getSymbol("box.holder.counter").memberOf', "box.holder", 'Static namespace property memberOf set on "this" can be found.'); - } - , - function() { - symbolize({a:true, p: true, _: [SYS.pwd+"test/lend.js"]}); - - is('symbols.getSymbol("Person").name', "Person", 'Class defined in lend comment is found.'); - is('symbols.getSymbol("Person").hasMethod("initialize")', true, 'Lent instance method name can be found.'); - is('symbols.getSymbol("Person").hasMethod("say")', true, 'Second instance method can be found.'); - is('symbols.getSymbol("Person#sing").isStatic', false, 'Instance method is known to be not static.'); - - is('symbols.getSymbol("Person.getCount").name', "getCount", 'Static method name from second lend comment can be found.'); - is('symbols.getSymbol("Person.getCount").isStatic', true, 'Static method from second lend comment is known to be static.'); - - is('LOG.warnings.filter(function($){if($.indexOf("notok") > -1) return $}).length', 1, 'A warning is emitted when lending to an undocumented parent.'); - } - , - function() { - symbolize({a:true, _: [SYS.pwd+"test/param_inline.js"]}); - - is('symbols.getSymbol("Layout").params[0].type', "int", 'Inline param name is set.'); - is('symbols.getSymbol("Layout").params[0].desc', "The number of columns.", 'Inline param desc is set from comment.'); - is('symbols.getSymbol("Layout#getElement").params[0].name', "id", 'User defined param documentation takes precedence over parser defined.'); - is('symbols.getSymbol("Layout#getElement").params[0].isOptional', true, 'Default for param is to not be optional.'); - is('symbols.getSymbol("Layout#getElement").params[1].isOptional', false, 'Can mark a param as being optional.'); - is('symbols.getSymbol("Layout#getElement").params[1].type', "number|string", 'Type of inline param doc can have multiple values.'); - is('symbols.getSymbol("Layout#Canvas").params[0].type', "", 'Type can be not defined for some params.'); - is('symbols.getSymbol("Layout#Canvas").params[2].type', "int", 'Type can be defined inline for only some params.'); - is('symbols.getSymbol("Layout#rotate").params.length', 0, 'Docomments inside function sig is ignored without a param.'); - is('symbols.getSymbol("Layout#init").params[2].type', "zoppler", 'Doc comment type overrides inline type for param with same name.'); - } - , - function() { - symbolize({a: true, _: [SYS.pwd+"test/shared.js", SYS.pwd+"test/shared2.js"]}); - - is('symbols.getSymbol("Array#some").name', 'some', 'The name of a symbol in a shared section is found.'); - is('symbols.getSymbol("Array#some").alias', 'Array#some', 'The alias of a symbol in a shared section is found.'); - is('symbols.getSymbol("Array#some").desc', "Extension to builtin array.", 'A description can be shared.'); - is('symbols.getSymbol("Array#filter").desc', "Extension to builtin array.\nChange every element of an array.", 'A shared description is appended.'); - is('symbols.getSymbol("Queue").desc', "A first in, first out data structure.", 'A description is not shared when outside a shared section.'); - is('symbols.getSymbol("Queue.rewind").alias', "Queue.rewind", 'Second shared tag can be started.'); - is('symbols.getSymbol("startOver").alias', "startOver", 'Shared tag doesnt cross over files.'); - } - , - function() { - symbolize({a: true, _: [SYS.pwd+"test/config.js"]}); - is('symbols.getSymbol("Contact").params[0].name', 'person', 'The name of a param is found.'); - is('symbols.getSymbol("Contact").params[1].name', 'person.name', 'The name of a param set with a dot name is found.'); - is('symbols.getSymbol("Contact").params[2].name', 'person.age', 'The name of a second param set with a dot name is found.'); - is('symbols.getSymbol("Contact").params[4].name', 'connection', 'The name of a param after config is found.'); - - is('symbols.getSymbol("Family").params[0].name', 'persons', 'Another name of a param is found.'); - is('symbols.getSymbol("Family").params[1].name', 'persons.Father', 'The name of a param+config is found.'); - is('symbols.getSymbol("Family").params[2].name', 'persons.Mother', 'The name of a second param+config is found.'); - is('symbols.getSymbol("Family").params[3].name', 'persons.Children', 'The name of a third param+config is found.'); - } - , - function() { - symbolize({a:true, p:true, _: [SYS.pwd+"test/ignore.js"]}); - is('LOG.warnings.filter(function($){if($.indexOf("undocumented symbol Ignored") > -1) return $}).length', 1, 'A warning is emitted when documenting members of an ignored parent.'); - } - , - function() { - symbolize({a:true, p:true, _: [SYS.pwd+"test/functions_anon.js"]}); - is('symbols.getSymbol("a.b").alias', 'a.b', 'In anonymous constructor this is found to be the container object.'); - is('symbols.getSymbol("a.f").alias', 'a.f', 'In anonymous constructor this can have a method.'); - is('symbols.getSymbol("a.c").alias', 'a.c', 'In anonymous constructor method this is found to be the container object.'); - is('symbols.getSymbol("g").alias', 'g', 'In anonymous function executed inline this is the global.'); - is('symbols.getSymbol("bar2.p").alias', 'bar2.p', 'In named constructor executed inline this is the container object.'); - is('symbols.getSymbol("module.pub").alias', 'module.pub', 'In parenthesized anonymous function executed inline function scoped variables arent documented.'); - } - , - function() { - symbolize({a:true, p:true, _: [SYS.pwd+"test/oblit_anon.js"]}); - is('symbols.getSymbol("opt").name', 'opt', 'Anonymous object properties are created.'); - is('symbols.getSymbol("opt.conf.keep").alias', 'opt.conf.keep', 'Anonymous object first property is assigned to $anonymous.'); - is('symbols.getSymbol("opt.conf.base").alias', 'opt.conf.base', 'Anonymous object second property is assigned to $anonymous.'); - } - , - function() { - symbolize({a:true, p:true, _: [SYS.pwd+"test/params_optional.js"]}); - is('symbols.getSymbol("Document").params.length', 3, 'Correct number of params are found when optional param syntax is used.'); - is('symbols.getSymbol("Document").params[1].name', "id", 'Name of optional param is found.'); - is('symbols.getSymbol("Document").params[1].isOptional', true, 'Optional param is marked isOptional.'); - is('symbols.getSymbol("Document").params[2].name', "title", 'Name of optional param with default value is found.'); - is('symbols.getSymbol("Document").params[2].isOptional', true, 'Optional param with default value is marked isOptional.'); - is('symbols.getSymbol("Document").params[2].defaultValue', " This is untitled.", 'Optional param default value is found.'); - } - , - function() { - symbolize({a:true, p:true, _: [SYS.pwd+"test/synonyms.js"]}); - is('symbols.getSymbol("myObject.myFunc").type', 'function', 'Type can be set to function.'); - } - , - function() { - symbolize({a:true, p:true, _: [SYS.pwd+"test/event.js"]}); - is('symbols.getSymbol("Kitchen#event:cakeEaten").isEvent', true, 'Function with event prefix is an event.'); - is('symbols.getSymbol("Kitchen#cakeEaten").isa', "FUNCTION", 'Function with same name as event isa function.'); - } - , - function() { - symbolize({x:"js", a:true, _: [SYS.pwd+"test/scripts/"]}); - is('JSDOC.JsDoc.srcFiles.length', 1, 'Only js files are scanned when -x=js.'); - } - , - function() { - symbolize({x:"js", a:true, _: [SYS.pwd+"test/exports.js"]}); - is('symbols.getSymbol("mxn.Map#doThings").name', 'doThings', 'Exports creates a documentation alias that can have methods.'); - } - , - function() { - symbolize({p:true, a:true, _: [SYS.pwd+"test/module.js"]}); - is('symbols.getSymbol("myProject.myModule.myPublicMethod").name', 'myPublicMethod', 'A function wrapped in parens can be recognized.'); - is('symbols.getSymbol("myProject.myModule-myPrivateMethod").name', 'myPrivateMethod', 'A private method in the scope of a function wrapped in parens can be recognized.'); - is('symbols.getSymbol("myProject.myModule-myPrivateVar").name', 'myPrivateVar', 'A private member in the scope of a function wrapped in parens can be recognized.'); - } -]; - -//// run and print results -print(testrun(testCases)); diff --git a/lib/jsdoc-toolkit/app/test/addon.js b/lib/jsdoc-toolkit/app/test/addon.js deleted file mode 100644 index 88862053..00000000 --- a/lib/jsdoc-toolkit/app/test/addon.js +++ /dev/null @@ -1,24 +0,0 @@ -String.prototype.reverse = function() { -} - -String.prototype.reverse.utf8 = function() { -} - -Function.count = function() { -} - -/** @memberOf Function */ -Function.count.reset = function() { -} - -/** @memberOf Function */ -count.getValue = function() { -} - -/** @memberOf Function.prototype */ -getSig = function() { -} - -/** @memberOf Function.prototype */ -Function.prototype.getProps = function() { -} diff --git a/lib/jsdoc-toolkit/app/test/anon_inner.js b/lib/jsdoc-toolkit/app/test/anon_inner.js deleted file mode 100644 index 227eeee5..00000000 --- a/lib/jsdoc-toolkit/app/test/anon_inner.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * @name bar - * @namespace - */ - -new function() { - /** - * @name bar-foo - * @function - * @param {number} x - */ - function foo(x) { - } -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/test/augments.js b/lib/jsdoc-toolkit/app/test/augments.js deleted file mode 100644 index 12e706eb..00000000 --- a/lib/jsdoc-toolkit/app/test/augments.js +++ /dev/null @@ -1,31 +0,0 @@ -/** -@constructor -*/ -function Layout(p) { - this.init = function(p) { - } - - this.getId = function() { - } - - /** @type Page */ - this.orientation = "landscape"; -} - -/** -@constructor -@augments Layout -*/ -function Page() { - this.reset = function(b) { - } -} - -/** -@extends Page -@constructor -*/ -function ThreeColumnPage() { - this.init = function(resetCode) { - } -} diff --git a/lib/jsdoc-toolkit/app/test/augments2.js b/lib/jsdoc-toolkit/app/test/augments2.js deleted file mode 100644 index e8388f0f..00000000 --- a/lib/jsdoc-toolkit/app/test/augments2.js +++ /dev/null @@ -1,26 +0,0 @@ -/** -@constructor -*/ -function LibraryItem() { - this.reserve = function() { - } -} - -/** -@constructor -*/ -function Junkmail() { - this.annoy = function() { - } -} - -/** -@inherits Junkmail.prototype.annoy as pester -@augments ThreeColumnPage -@augments LibraryItem -@constructor -*/ -function NewsletterPage() { - this.getHeadline = function() { - } -} diff --git a/lib/jsdoc-toolkit/app/test/borrows.js b/lib/jsdoc-toolkit/app/test/borrows.js deleted file mode 100644 index a5d8ea4a..00000000 --- a/lib/jsdoc-toolkit/app/test/borrows.js +++ /dev/null @@ -1,46 +0,0 @@ -/** -@constructor -*/ -function Layout(p) { - /** initilize 1 */ - this.init = function(p) { - } - - /** get the id */ - this.getId = function() { - } - - /** @type string */ - this.orientation = "landscape"; - - function getInnerElements(elementSecretId){ - } -} - -/** A static method. */ -Layout.units = function() { -} - -/** -@constructor -@borrows Layout#orientation -@borrows Layout-getInnerElements -@borrows Layout.units -*/ -function Page() { - /** reset the page */ - this.reset = function(b) { - } -} - -/** -@constructor -@borrows Layout.prototype.orientation as this.orientation -@borrows Layout.prototype.init as #init -@inherits Page.prototype.reset as #reset -*/ -function ThreeColumnPage() { - /** initilize 2 */ - this.init = function(p) { - } -} diff --git a/lib/jsdoc-toolkit/app/test/borrows2.js b/lib/jsdoc-toolkit/app/test/borrows2.js deleted file mode 100644 index c0d5ea21..00000000 --- a/lib/jsdoc-toolkit/app/test/borrows2.js +++ /dev/null @@ -1,23 +0,0 @@ -// testing circular borrows - -/** - @class - @borrows Bar#zop as this.my_zop -*/ -function Foo() { - /** this is a zip. */ - this.zip = function() {} - - this.my_zop = new Bar().zop; -} - -/** - @class - @borrows Foo#zip as this.my_zip -*/ -function Bar() { - /** this is a zop. */ - this.zop = function() {} - - this.my_zip = new Foo().zip; -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/test/config.js b/lib/jsdoc-toolkit/app/test/config.js deleted file mode 100644 index 0748a210..00000000 --- a/lib/jsdoc-toolkit/app/test/config.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * @constructor - * @param person The person. - * @param {string} person.name The person's name. - * @config {integer} age The person's age. - * @config [id=1] Optional id number to use. - * @param connection - */ -function Contact(person, connection) { - -} - -/** - * @constructor - * @param persons - * @config {string} Father The paternal person. - * @config {string} Mother The maternal person. - * @config {string[]} Children And the rest. - */ -function Family(/**Object*/persons) { - -} diff --git a/lib/jsdoc-toolkit/app/test/constructs.js b/lib/jsdoc-toolkit/app/test/constructs.js deleted file mode 100644 index cca5dbd3..00000000 --- a/lib/jsdoc-toolkit/app/test/constructs.js +++ /dev/null @@ -1,18 +0,0 @@ -var Person = makeClass( - /** - @scope Person - */ - { - /** - This is just another way to define a constructor. - @constructs - @param {string} name The name of the person. - */ - initialize: function(name) { - this.name = name; - }, - say: function(message) { - return this.name + " says: " + message; - } - } -); \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/test/encoding.js b/lib/jsdoc-toolkit/app/test/encoding.js deleted file mode 100644 index ba642193..00000000 --- a/lib/jsdoc-toolkit/app/test/encoding.js +++ /dev/null @@ -1,10 +0,0 @@ - -/** - * @Constructor - * @desc 配置文件 - * @class 什么也不返回 - */ -function Test(conf) { - // do something; -} - diff --git a/lib/jsdoc-toolkit/app/test/encoding_other.js b/lib/jsdoc-toolkit/app/test/encoding_other.js deleted file mode 100644 index b144da4c..00000000 --- a/lib/jsdoc-toolkit/app/test/encoding_other.js +++ /dev/null @@ -1,12 +0,0 @@ - -/** - * @Constructor - * @desc - * @class - */ -function Test(conf) { - // do something; -} - -// run with commanline option -e=iso-8859-5 - diff --git a/lib/jsdoc-toolkit/app/test/event.js b/lib/jsdoc-toolkit/app/test/event.js deleted file mode 100644 index 7e41d6f6..00000000 --- a/lib/jsdoc-toolkit/app/test/event.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * @name Kitchen - * @constructor - * @fires Bakery#event:donutOrdered - */ - -/** - * Fired when some cake is eaten. - * @name Kitchen#event:cakeEaten - * @function - * @param {Number} pieces The number of pieces eaten. - */ - -/** - * Find out if cake was eaten. - * @name Kitchen#cakeEaten - * @function - * @param {Boolean} wasEaten - */ - -/** - * @name getDesert - * @function - * @fires Kitchen#event:cakeEaten - */ - -/** - * @name Bakery - * @constructor - * @extends Kitchen - */ - -/** - * Fired when a donut order is made. - * @name Bakery#event:donutOrdered - * @event - * @param {Event} e The event object. - * @param {String} [e.topping] Optional sprinkles. - */ - -/** - * @constructor - * @borrows Bakery#event:donutOrdered as this.event:cakeOrdered - */ -function CakeShop() { -} - -/** @event */ -CakeShop.prototype.icingReady = function(isPink) { -} - -/** @event */ -function amHungry(/**Boolean*/enoughToEatAHorse) { -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/test/exports.js b/lib/jsdoc-toolkit/app/test/exports.js deleted file mode 100644 index 63a87cb4..00000000 --- a/lib/jsdoc-toolkit/app/test/exports.js +++ /dev/null @@ -1,14 +0,0 @@ -/** @namespace */ -var mxn = {}; - -(function(){ - /** @exports Map as mxn.Map */ - var Map = - /** @constructor */ - mxn.Map = function() { - }; - - /** A method. */ - Map.prototype.doThings = function() { - }; -})(); \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/test/functions_anon.js b/lib/jsdoc-toolkit/app/test/functions_anon.js deleted file mode 100644 index e9dd6c1b..00000000 --- a/lib/jsdoc-toolkit/app/test/functions_anon.js +++ /dev/null @@ -1,39 +0,0 @@ -/** an anonymous constructor executed inline */ -a = new function() { - /** a.b*/ - this.b = 1; - /** a.f */ - this.f = function() { - /** a.c */ - this.c = 2; - } -} - - -/** - named function executed inline -*/ -bar1 = function Zoola1() { - /** property of global */ - this.g = 1; -}(); - -/** - named constructor executed inline -*/ -bar2 = new function Zoola2() { - /** property of bar */ - this.p = 1; -}; - -/** module pattern */ -module = (function () { - /** won't appear in documentation */ - var priv = 1; - - /** @scope module */ - return { - /** will appear as a property of module */ - pub: 1 - } -})(); diff --git a/lib/jsdoc-toolkit/app/test/functions_nested.js b/lib/jsdoc-toolkit/app/test/functions_nested.js deleted file mode 100644 index f044fafe..00000000 --- a/lib/jsdoc-toolkit/app/test/functions_nested.js +++ /dev/null @@ -1,33 +0,0 @@ -/** @constructor */ -function Zop() { -} - -/** - @class -*/ -Foo = function(id) { - // this is a bit twisted, but if you call Foo() you will then - // modify Foo(). This is kinda, sorta non-insane, because you - // would have to call Foo() 100% of the time to use Foo's methods - Foo.prototype.methodOne = function(bar) { - alert(bar); - }; - - // same again - Foo.prototype.methodTwo = function(bar2) { - alert(bar2); - }; - - // and these are only executed if the enclosing function is actually called - // and who knows if that will ever happen? - Bar = function(pez) { - alert(pez); - }; - Zop.prototype.zap = function(p){ - alert(p); - }; - - // but this is only visible inside Foo - function inner() { - } -}; diff --git a/lib/jsdoc-toolkit/app/test/global.js b/lib/jsdoc-toolkit/app/test/global.js deleted file mode 100644 index 5ea48949..00000000 --- a/lib/jsdoc-toolkit/app/test/global.js +++ /dev/null @@ -1,13 +0,0 @@ -/** ecks */ -var x = [1, 2, 4]; - -var y = { - foo: function(){ - } -} - -bar = function() { -} - -function zop() { -} diff --git a/lib/jsdoc-toolkit/app/test/globals.js b/lib/jsdoc-toolkit/app/test/globals.js deleted file mode 100644 index 3f83fb1f..00000000 --- a/lib/jsdoc-toolkit/app/test/globals.js +++ /dev/null @@ -1,25 +0,0 @@ -function example(/**Circle*/a, b) { - /** a global defined in function */ - var number = a; - - var hideNumber = function(){ - } - - setNumber = function(){ - } - alert('You have chosen: ' + b); -} - -function initPage() { - var supported = document.createElement && document.getElementsByTagName; - if (!supported) return; - // start of DOM script - var x = document.getElementById('writeroot'); - // etc. -} - -/** an example var */ -var document = new Document(x, y); - -var getNumber = function(){ -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/test/ignore.js b/lib/jsdoc-toolkit/app/test/ignore.js deleted file mode 100644 index d3fac9ed..00000000 --- a/lib/jsdoc-toolkit/app/test/ignore.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * A test constructor. - * @constructor - * @ignore - */ -function Ignored() { - /** a method */ - this.bar = function() { - } -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/test/inner.js b/lib/jsdoc-toolkit/app/test/inner.js deleted file mode 100644 index 37cfa9dc..00000000 --- a/lib/jsdoc-toolkit/app/test/inner.js +++ /dev/null @@ -1,16 +0,0 @@ -/** - * @constructor - */ -function Outer() { - /** - * @constructor - */ - function Inner(name) { - /** The name of this. */ - this.name = name; - } - - this.open = function(name) { - return (new Inner(name)); - } -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/test/jsdoc_test.js b/lib/jsdoc-toolkit/app/test/jsdoc_test.js deleted file mode 100644 index 08177128..00000000 --- a/lib/jsdoc-toolkit/app/test/jsdoc_test.js +++ /dev/null @@ -1,477 +0,0 @@ -/** - * @fileoverview This file is to be used for testing the JSDoc parser - * It is not intended to be an example of good JavaScript OO-programming, - * nor is it intended to fulfill any specific purpose apart from - * demonstrating the functionality of the - * JSDoc parser - * - * @author Gabriel Reid gab_reid@users.sourceforge.net - * @version 0.1 - */ - - -/** - * Construct a new Shape object. - * @class This is the basic Shape class. - * It can be considered an abstract class, even though no such thing - * really existing in JavaScript - * @constructor - * @throws MemoryException if there is no more memory - * @throws GeneralShapeException rarely (if ever) - * @return {Shape|Coordinate} A new shape. - */ -function Shape(){ - - /** - * This is an example of a function that is not given as a property - * of a prototype, but instead it is assigned within a constructor. - * For inner functions like this to be picked up by the parser, the - * function that acts as a constructor must be denoted with - * the @constructor tag in its comment. - * @type String - */ - this.getClassName = function(){ - return "Shape"; - } - - /** - * This is an inner method, just used here as an example - * @since version 0.5 - * @author Sue Smart - */ - function addReference(){ - // Do nothing... - } - -} - -/** - * Create a new Hexagon instance. - * @extends Shape - * @class Hexagon is a class that is a logical sublcass of - * {@link Shape} (thanks to the @extends tag), but in - * reality it is completely unrelated to Shape. - * @param {int} sideLength The length of one side for the new Hexagon - * @example - * var h = new Hexagon(2); - * @example - * if (hasHex) { - * hex = new Hexagon(5); - * color = hex.getColor(); - * } - */ -function Hexagon(sideLength) { -} - - -/** - * This is an unattached (static) function that adds two integers together. - * @param {int} One The first number to add - * @param {int} Two The second number to add - * @author Gabriel Reid - * @deprecated So you shouldn't use it anymore! Use {@link Shape#getClassName} instead. - */ -function Add(One, Two){ - return One + Two; -} - - -/** - * The color of this shape - * @type Color - */ -Shape.prototype.color = null; - -/** - * The border of this shape. - * @field - * @type int - */ -Shape.prototype.border = function(){return border;}; - -/* - * These are all the instance method implementations for Shape - */ - -/** - * Get the coordinates of this shape. It is assumed that we're always talking - * about shapes in a 2D location here. - * @requires The {@link Shape} class - * @returns A Coordinate object representing the location of this Shape - * @type Coordinate[] - */ -Shape.prototype.getCoords = function(){ - return this.coords; -} - -/** - * Get the color of this shape. - * @see #setColor - * @see The Color library. - * @link Shape - * @type Color - */ -Shape.prototype.getColor = function(){ - return this.color; -} - -/** - * Set the coordinates for this Shape - * @param {Coordinate} coordinates The coordinates to set for this Shape - */ -Shape.prototype.setCoords = function(coordinates){ - this.coords = coordinates; -} - -/** - * Set the color for this Shape - * @param {Color} color The color to set for this Shape - * @param other There is no other param, but it can still be documented if - * optional parameters are used - * @throws NonExistantColorException (no, not really!) - * @see #getColor - */ -Shape.prototype.setColor = function(color){ - this.color = color; -} - -/** - * Clone this shape - * @returns A copy of this shape - * @type Shape - * @author Gabriel Reid - */ -Shape.prototype.clone = function(){ - return new Shape(); -} - -/** - * Create a new Rectangle instance. - * @class A basic rectangle class, inherits from Shape. - * This class could be considered a concrete implementation class - * @constructor - * @param {int} width The optional width for this Rectangle - * @param {int} height Thie optional height for this Rectangle - * @author Gabriel Reid - * @see Shape is the base class for this - * @augments Shape - * @hilited - */ -function Rectangle(width, // This is the width - height // This is the height - ){ - if (width){ - this.width = width; - if (height){ - this.height = height; - } - } -} - - -/* Inherit from Shape */ -Rectangle.prototype = new Shape(); - -/** - * Value to represent the width of the Rectangle. - *
Text in bold and italic and a - * link to SourceForge - * @private - * @type int - */ -Rectangle.prototype.width = 0; - -/** - * Value to represent the height of the Rectangle - * @private - * @type int - */ -Rectangle.prototype.height = 0; - -/** - * Get the type of this object. - * @type String - */ -Rectangle.prototype.getClassName= function(){ - return "Rectangle"; -} - -/** - * Get the value of the width for the Rectangle - * @type int - * @see Rectangle#setWidth - */ -Rectangle.prototype.getWidth = function(){ - return this.width; -} - -/** - * Get the value of the height for the Rectangle. - * Another getter is the {@link Shape#getColor} method in the - * {@link Shape} base class. - * @return The height of this Rectangle - * @type int - * @see Rectangle#setHeight - */ -Rectangle.prototype.getHeight = function(){ - return this.height; -} - -/** - * Set the width value for this Rectangle. - * @param {int} width The width value to be set - * @see #setWidth - */ -Rectangle.prototype.setWidth = function(width){ - this.width = width; -} - -/** - * Set the height value for this Rectangle. - * @param {int} height The height value to be set - * @see #getHeight - */ -Rectangle.prototype.setHeight = function(height){ - this.height = height; -} - -/** - * Get the value for the total area of this Rectangle - * @return total area of this Rectangle - * @type int - */ -Rectangle.prototype.getArea = function(){ - return width * height; -} - - -/** - * Create a new Square instance. - * @class A Square is a subclass of {@link Rectangle} - * @param {int} width The optional width for this Rectangle - * @param {int} height The optional height for this Rectangle - * @augments Rectangle - */ -function Square(width, height){ - if (width){ - this.width = width; - if (height){ - this.height = height; - } - } - -} - -/* Square is a subclass of Rectangle */ -Square.prototype = new Rectangle(); - -/** - * Set the width value for this Shape. - * @param {int} width The width value to be set - * @see #getWidth - */ -Square.prototype.setWidth = function(width){ - this.width = this.height = width; -} - -/** - * Set the height value for this Shape - * Sets the {@link Rectangle#height} attribute in the Rectangle. - * @param {int} height The height value to be set - */ -Square.prototype.setHeight = function(height){ - this.height = this.width = height; -} - - -/** - * Create a new Circle instance based on a radius. - * @class Circle class is another subclass of Shape - * @extends Shape - * @param {int} radius The optional radius of this {@link Circle } - * @mixin Square.prototype.setWidth as this.setDiameter - */ -function Circle(radius){ - if (radius) { - /** The radius of the this Circle. */ - this.radius = radius; - } -} - -/* Circle inherits from {@link Shape} */ -Circle.prototype = new Shape(); - -/** - * The radius value for this Circle - * @private - * @type int - */ -Circle.prototype.radius = 0; - -/** - * A very simple class (static) field that is also a constant - * @final - * @type float - */ -Circle.PI = 3.14; - -/** - * Get the radius value for this Circle - * @type int - * @see #setRadius - */ -Circle.prototype.getRadius = function(){ - return this.radius; -} - -/** - * Set the radius value for this Circle - * @param {int} radius The {@link Circle#radius} value to set - * @see #getRadius - */ -Circle.prototype.setRadius = function(radius){ - this.radius = radius; -} - -/** - * An example of a class (static) method that acts as a factory for Circle - * objects. Given a radius value, this method creates a new Circle. - * @param {int} radius The radius value to use for the new Circle. - * @type Circle - */ -Circle.createCircle = function(radius){ - return new Circle(radius); -} - - -/** - * Create a new Coordinate instance based on x and y grid data. - * @class Coordinate is a class that can encapsulate location information. - * @param {int} [x=0] The optional x portion of the Coordinate - * @param {int} [y=0] The optinal y portion of the Coordinate - */ -function Coordinate(x, y){ - if (x){ - this.x = x; - if (y){ - this.y = y; - } - } -} - -/** - * The x portion of the Coordinate - * @type int - * @see #getX - * @see #setX - */ -Coordinate.prototype.x = 0; - -/** - * The y portion of the Coordinate - * @type int - * @see #getY - * @see #setY - */ -Coordinate.prototype.y = 0; - -/** - * Gets the x portion of the Coordinate. - * @type int - * @see #setX - */ -Coordinate.prototype.getX = function(){ - return this.x; -} - -/** - * Get the y portion of the Coordinate. - * @type int - * @see #setY - */ -Coordinate.prototype.getY = function(){ - return this.y; -} - -/** - * Sets the x portion of the Coordinate. - * @param {int} x The x value to set - * @see #getX - */ -Coordinate.prototype.setX = function(x){ - this.x = x; -} - -/** - * Sets the y portion of the Coordinate. - * @param {int} y The y value to set - * @see #getY - */ -Coordinate.prototype.setY = function(y){ - this.y = y; -} - -/** - * @class This class exists to demonstrate the assignment of a class prototype - * as an anonymous block. - */ -function ShapeFactory(){ -} - -ShapeFactory.prototype = { - /** - * Creates a new {@link Shape} instance. - * @return A new {@link Shape} - * @type Shape - */ - createShape: function(){ - return new Shape(); - } -} - -/** - * An example of a singleton class - * @param ... Arguments represent {@link coordinate}s in the shape. - * @constructor - */ -MySingletonShapeFactory = function(){ - - /** - * Get the next {@link Shape} - * @type Shape - * @return A new {@link Shape} - */ - this.getShape = function(){ - return null; - } - -} - - -/** - * Create a new Foo instance. - * @class This is the Foo class. It exists to demonstrate 'nested' classes. - * @constructor - * @see Foo.Bar - */ -function Foo(){} - -/** - * Creates a new instance of Bar. - * @class This class exists to demonstrate 'nested' classes. - * @constructor - * @see Foo.Bar - */ -function Bar(){} - -/** - * Nested class - * @constructor - */ -Foo.Bar = function(){ - /** The x. */ this.x = 2; -} - -Foo.Bar.prototype = new Bar(); -/** The y. */ -Foo.Bar.prototype.y = '3'; diff --git a/lib/jsdoc-toolkit/app/test/lend.js b/lib/jsdoc-toolkit/app/test/lend.js deleted file mode 100644 index 92b15d5a..00000000 --- a/lib/jsdoc-toolkit/app/test/lend.js +++ /dev/null @@ -1,33 +0,0 @@ - /** @class */ -var Person = Class.create( - /** - @lends Person.prototype - */ - { - initialize: function(name) { - this.name = name; - }, - say: function(message) { - return this.name + ': ' + message; - } - } - ); - -/** @lends Person.prototype */ -{ - /** like say but more musical */ - sing: function(song) { - } -} - -/** @lends Person */ -{ - getCount: function() { - } -} - -/** @lends Unknown.prototype */ -{ - notok: function() { - } -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/test/memberof.js b/lib/jsdoc-toolkit/app/test/memberof.js deleted file mode 100644 index 883bbdeb..00000000 --- a/lib/jsdoc-toolkit/app/test/memberof.js +++ /dev/null @@ -1,19 +0,0 @@ -/** @constructor */ -pack = function() { - this.init = function(){} - function config(){} -} - - pack.build = function(task) {}; - -/** @memberOf pack */ -pack.install = function() {} - -/** @memberOf pack */ -pack.install.overwrite = function() {} - -/** @memberOf pack */ -clean = function() {} - -/** @memberOf pack-config */ -install = function() {}; diff --git a/lib/jsdoc-toolkit/app/test/memberof2.js b/lib/jsdoc-toolkit/app/test/memberof2.js deleted file mode 100644 index bc3d9d8f..00000000 --- a/lib/jsdoc-toolkit/app/test/memberof2.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * @constructor - */ -function Foo() { - /** - @memberOf Foo.prototype - */ - function bar(a, b) { - } - - /** - @memberOf Foo - */ - var zip = function(p, q) { - } - - /** - @memberOf Foo - */ - function zop( x,y ) { - } - - /** - @memberOf Foo - @constructor - */ - function Fiz() { - /** A method of Foo#Fiz. */ - this.fipple = function(fop){} - } -} - -/** - @memberOf Foo# - */ -var blat = function() { - -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/test/memberof3.js b/lib/jsdoc-toolkit/app/test/memberof3.js deleted file mode 100644 index 8c259425..00000000 --- a/lib/jsdoc-toolkit/app/test/memberof3.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @name Foo -* @class -*/ - -/**#@+ -* @memberOf Foo# -* @field -*/ - -/** -* @name bar -* @type Object[] -*/ - -/**#@-*/ - -/** -* @name Foo2 -* @class -*/ - -/**#@+ -* @memberOf Foo2# -* @field -*/ - -/** -* @name bar -* @type Object[] -*/ - -/**#@-*/ \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/test/memberof_constructor.js b/lib/jsdoc-toolkit/app/test/memberof_constructor.js deleted file mode 100644 index 80fde735..00000000 --- a/lib/jsdoc-toolkit/app/test/memberof_constructor.js +++ /dev/null @@ -1,17 +0,0 @@ -/** @constructor */ -function Circle(){} - -/** - @constructor - @memberOf Circle# - */ -Circle.prototype.Tangent = function(){}; - -// renaming Circle#Tangent to Circle#Circle#Tangent - -/** - @memberOf Circle#Tangent# - */ -Circle.prototype.Tangent.prototype.getDiameter = function(){}; - - diff --git a/lib/jsdoc-toolkit/app/test/module.js b/lib/jsdoc-toolkit/app/test/module.js deleted file mode 100644 index 5b3fe42c..00000000 --- a/lib/jsdoc-toolkit/app/test/module.js +++ /dev/null @@ -1,17 +0,0 @@ -/** @namespace */ -myProject = myProject || {}; - -/** @namespace */ -myProject.myModule = (function () { - /** describe myPrivateVar here */ - var myPrivateVar = ""; - - var myPrivateMethod = function () { - } - - /** @scope myProject.myModule */ - return { - myPublicMethod: function () { - } - }; -})(); \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/test/multi_methods.js b/lib/jsdoc-toolkit/app/test/multi_methods.js deleted file mode 100644 index bab35c76..00000000 --- a/lib/jsdoc-toolkit/app/test/multi_methods.js +++ /dev/null @@ -1,25 +0,0 @@ - -/** - Get the entire flavor. - @name flavor^3 - @function - @returns {Object} The entire flavor hash. -*/ -/** - Get a named flavor. - @name flavor^2 - @function - @param {String} name The name of the flavor to get. - @returns {String} The value of that flavor. -*/ -/** - Set the flavor. - @param {String} name The name of the flavor to set. - @param {String} value The value of the flavor. - @returns {String} The value of that flavor. -*/ -function flavor(name, value) { - if (arguments.length > 1) flavor[name] = value; - else if (arguments.length == 1) return flavor[name]; - else return flavor; -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/test/name.js b/lib/jsdoc-toolkit/app/test/name.js deleted file mode 100644 index e88a51a7..00000000 --- a/lib/jsdoc-toolkit/app/test/name.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - @name Response - @class -*/ - -Response.prototype = { - /** - @name Response#text - @function - @description - Gets the body of the response as plain text - @returns {String} - Response as text - */ - - text: function() { - return this.nativeResponse.responseText; - } -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/test/namespace_nested.js b/lib/jsdoc-toolkit/app/test/namespace_nested.js deleted file mode 100644 index 46cafa2f..00000000 --- a/lib/jsdoc-toolkit/app/test/namespace_nested.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - @namespace This is the first namespace. -*/ -ns1 = {}; - -/** - This is the second namespace. - @namespace -*/ -ns1.ns2 = {}; - -/** - This part of ns1.ns2 - @constructor -*/ -ns1.ns2.Function1 = function() { -}; - -ns1.staticFunction = function() { -}; - -/** A static field in a namespace. */ -ns1.ns2.staticField = 1; diff --git a/lib/jsdoc-toolkit/app/test/nocode.js b/lib/jsdoc-toolkit/app/test/nocode.js deleted file mode 100644 index 1cf99bc9..00000000 --- a/lib/jsdoc-toolkit/app/test/nocode.js +++ /dev/null @@ -1,13 +0,0 @@ -/**#nocode+*/ - /** - @name star - @function - */ - function blahblah() { - - } -/**#nocode-*/ - -function yaddayadda() { - -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/test/oblit_anon.js b/lib/jsdoc-toolkit/app/test/oblit_anon.js deleted file mode 100644 index 8d9e9413..00000000 --- a/lib/jsdoc-toolkit/app/test/oblit_anon.js +++ /dev/null @@ -1,20 +0,0 @@ -/** the options */ -opt = Opt.get( - arguments, - { - d: "directory", - c: "conf", - "D[]": "define" - } -); - -/** configuration */ -opt.conf = { - /** keep */ - keep: true, - /** base */ - base: getBase(this, {p: properties}) -} - - - diff --git a/lib/jsdoc-toolkit/app/test/overview.js b/lib/jsdoc-toolkit/app/test/overview.js deleted file mode 100644 index 1dfc09b1..00000000 --- a/lib/jsdoc-toolkit/app/test/overview.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * @overview This "library" contains a - * lot of classes and functions. - * @example -
-	var x (x < 1);
-	alert("This 'is' \"code\"");
- 
- * @name My Cool Library - * @author Joe Smith jsmith@company.com - * @version 0.1 - */ - -/** - * Gets the current foo - * @param {String} fooId The unique identifier for the foo. - * @return {Object} Returns the current foo. - */ -function getFoo(fooID){ -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/test/param_inline.js b/lib/jsdoc-toolkit/app/test/param_inline.js deleted file mode 100644 index 09845b28..00000000 --- a/lib/jsdoc-toolkit/app/test/param_inline.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - @constructor - @param columns The number of columns. -*/ -function Layout(/**int*/columns){ - /** - @param [id] The id of the element. - @param elName The name of the element. - */ - this.getElement = function( - /** string */ elName, - /** number|string */ id - ) { - }; - - /** - @constructor - */ - this.Canvas = function(top, left, /**int*/width, height) { - /** Is it initiated yet? */ - this.initiated = true; - } - - this.rotate = function(/**nothing*/) { - } - - /** - @param x - @param y - @param {zoppler} z*/ - this.init = function(x, y, /**abbler*/z) { - /** The xyz. */ - this.xyz = x+y+z; - this.getXyz = function() { - } - } -} diff --git a/lib/jsdoc-toolkit/app/test/params_optional.js b/lib/jsdoc-toolkit/app/test/params_optional.js deleted file mode 100644 index 18bf5982..00000000 --- a/lib/jsdoc-toolkit/app/test/params_optional.js +++ /dev/null @@ -1,8 +0,0 @@ - -/** - * @param {Page[]} pages - * @param {number} [id] Specifies the id, if applicable. - * @param {String} [title = This is untitled.] Specifies the title. - */ -function Document(pages, id, title){ -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/test/prototype.js b/lib/jsdoc-toolkit/app/test/prototype.js deleted file mode 100644 index 11470083..00000000 --- a/lib/jsdoc-toolkit/app/test/prototype.js +++ /dev/null @@ -1,17 +0,0 @@ -/** @constructor */ -function Article() { -} - -Article.prototype.init = function(title) { - /** the instance title */ - this.title = title; - - /** the static counter */ - Article.counter = 1; -} - -a = new Article(); -a.Init("my title"); - -print(a.title); -print(Article.counter); \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/test/prototype_nested.js b/lib/jsdoc-toolkit/app/test/prototype_nested.js deleted file mode 100644 index e8ca1ced..00000000 --- a/lib/jsdoc-toolkit/app/test/prototype_nested.js +++ /dev/null @@ -1,9 +0,0 @@ -/** @constructor */ -function Word() { -} - -Word.prototype.reverse = function() { -} - -Word.prototype.reverse.utf8 = function() { -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/test/prototype_oblit.js b/lib/jsdoc-toolkit/app/test/prototype_oblit.js deleted file mode 100644 index 6cfc39ca..00000000 --- a/lib/jsdoc-toolkit/app/test/prototype_oblit.js +++ /dev/null @@ -1,13 +0,0 @@ -/** @constructor */ -function Article() { -} - -Article.prototype = { - /** instance get title */ - getTitle: function(){ - } -} - -/** static get title */ -Article.getTitle = function(){ -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/test/prototype_oblit_constructor.js b/lib/jsdoc-toolkit/app/test/prototype_oblit_constructor.js deleted file mode 100644 index 92482486..00000000 --- a/lib/jsdoc-toolkit/app/test/prototype_oblit_constructor.js +++ /dev/null @@ -1,24 +0,0 @@ -/** @constructor */ -function Article() { -} - -Article.prototype = { - /** @constructor */ - Title: function(title) { - /** the value of the Title instance */ - this.title = title; - }, - - init: function(pages) { - /** the value of the pages of the Article instance */ - this.pages = pages; - } -} - -f = new Article(); -f.init("one two three"); - -t = new f.Title("my title"); - -print(f.pages); -print(t.title); \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/test/public.js b/lib/jsdoc-toolkit/app/test/public.js deleted file mode 100644 index 35d34f6f..00000000 --- a/lib/jsdoc-toolkit/app/test/public.js +++ /dev/null @@ -1,10 +0,0 @@ -/**@constructor*/ -function Foo() { - /** - @public - @static - @field - */ - var bar = function(x) { - } -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/test/scripts/code.js b/lib/jsdoc-toolkit/app/test/scripts/code.js deleted file mode 100644 index e9d7ed2e..00000000 --- a/lib/jsdoc-toolkit/app/test/scripts/code.js +++ /dev/null @@ -1,5 +0,0 @@ -/** - @class - */ -function thisiscode() { -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/test/scripts/notcode.txt b/lib/jsdoc-toolkit/app/test/scripts/notcode.txt deleted file mode 100644 index fcd737e7..00000000 --- a/lib/jsdoc-toolkit/app/test/scripts/notcode.txt +++ /dev/null @@ -1,5 +0,0 @@ -(This is not code) -function foo(){{{{ -( -! -@ \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/test/shared.js b/lib/jsdoc-toolkit/app/test/shared.js deleted file mode 100644 index e1c277a6..00000000 --- a/lib/jsdoc-toolkit/app/test/shared.js +++ /dev/null @@ -1,42 +0,0 @@ - -/** - * Builtin object. - * @class - * @name Array - */ - -/**#@+ - * Extension to builtin array. - * @memberOf Array - * @method - */ - -/** - * @returns Boolen if some array members... - */ -Array.prototype.some = function(){}; - -/** - * Change every element of an array. - * @returns Filtered array copy. - */ -Array.prototype.filter = function(){}; - -/**#@-*/ - - -/** - * A first in, first out data structure. - * @constructor - */ -Queue = function(){}; - -/**#@+ - * Extension to Queue. - * @memberOf Queue - */ - -rewind = function(){ -} - -// should close automatically here. \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/test/shared2.js b/lib/jsdoc-toolkit/app/test/shared2.js deleted file mode 100644 index 3f7736a7..00000000 --- a/lib/jsdoc-toolkit/app/test/shared2.js +++ /dev/null @@ -1,2 +0,0 @@ -startOver = function(){ -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/test/shortcuts.js b/lib/jsdoc-toolkit/app/test/shortcuts.js deleted file mode 100644 index f738f1e1..00000000 --- a/lib/jsdoc-toolkit/app/test/shortcuts.js +++ /dev/null @@ -1,22 +0,0 @@ -// /**#=+ -// * { -// * 'D': 'Date.prototype', -// * '$N': 'Number' -// * } -// */ -// var D = Date.prototype, -// $N = Number; -// -// D.locale = function(){ -// }; -// -// /** -// @return {string} The cardinal number string. -// */ -// $N.nth = function(n){ -// }; -// -// LOAD.file = function(){ -// } -// -// /**#=-*/ \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/test/static_this.js b/lib/jsdoc-toolkit/app/test/static_this.js deleted file mode 100644 index 9407b20f..00000000 --- a/lib/jsdoc-toolkit/app/test/static_this.js +++ /dev/null @@ -1,13 +0,0 @@ -/** the parent */ -var box = {}; - -/** @namespace */ -box.holder = {} - -box.holder.foo = function() { - /** the counter */ - this.counter = 1; -} - -box.holder.foo(); -print(box.holder.counter); diff --git a/lib/jsdoc-toolkit/app/test/synonyms.js b/lib/jsdoc-toolkit/app/test/synonyms.js deleted file mode 100644 index 09066b98..00000000 --- a/lib/jsdoc-toolkit/app/test/synonyms.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - @class - @inherits Bar#zop as #my_zop -*/ -function Foo() { - /** this is a zip. */ - this.zip = function() {} - - /** from Bar */ - this.my_zop = new Bar().zop; -} - -/** - @class - @borrows Foo#zip as this.my_zip -*/ -function Bar() { - /** this is a zop. */ - this.zop = function() {} - - /** from Foo */ - this.my_zip = new Foo().zip; -} - -/** @namespace */ -var myObject = { - /** - @type function - */ - myFunc: getFunction() -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/test/tosource.js b/lib/jsdoc-toolkit/app/test/tosource.js deleted file mode 100644 index 706d4765..00000000 --- a/lib/jsdoc-toolkit/app/test/tosource.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @param {Object} object - * @return {string} - */ -function valueOf(object) {} - -/** - * @param {Object} object - * @return {string} - */ -function toString(object) {} - -/** - * @param {Object} object - * @return {string} - */ -function toSource(object) {} - -/** - * @param {Object} object - * @return {string} - */ -function constructor(object) {} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/app/test/variable_redefine.js b/lib/jsdoc-toolkit/app/test/variable_redefine.js deleted file mode 100644 index 2c07da09..00000000 --- a/lib/jsdoc-toolkit/app/test/variable_redefine.js +++ /dev/null @@ -1,14 +0,0 @@ -/** @constructor */ -function Foo() { - var bar = 1; - bar = 2; // redefining a private - - this.baz = 1; - baz = 2; // global - - /** a private */ - var blap = { - /** in here */ - tada: 1 - } -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/changes.txt b/lib/jsdoc-toolkit/changes.txt deleted file mode 100644 index b0acbab7..00000000 --- a/lib/jsdoc-toolkit/changes.txt +++ /dev/null @@ -1,124 +0,0 @@ -== 2.4.0 == - - * Fixed bug that added mutiple symbols with the same name to docs. - * Added support for the -m option to suppress warnings for multiple docs. - * Added patch by brownsea42 to support quoted user variables on the command line. ( issue #281 ) - * Fixed bug that sometimes caused links to events to be incorrect. ( issue #292 ) - -== 2.3.3 == - - * Fixed bug that made all fields declared with the @property tag static. ( issue #262 ) - * Minor fix to better handle trailing slash on path to template (from jwmetrocat). ( issue #237 ) - * Fix for @memberOf when applied to inner members. ( issue #264 ) - * Fix for @memberOf when applied to symbols documented with @name. ( issue #260 ) - * Applied patch from kunhualqk, fix for bug where @link to borrowed member did not resolve to parent class. ( issue #218 ) - * Fix for @requires not linking back to the required class - * Added experimental support for @constructs to have an argument, the class name, when applied to a function assignment. - -== 2.3.2 == - - * Minor update to the usage notes and corrected the version number displayed in the output. - -== 2.3.1 == - - * Fixed HTML typo in allfiles template. ( issue #228 ) - * Modified template to display version information for classes. - * Modified template to better support multiple methods with the same name. - * Fixed bug that caused template to error when backtick characters appeared around class names. - -== 2.3.0 == - - * Added option -u, --unique to avoid bug that causes multiple symbols with names that differ only by case to overwrite each others output on case-insensitive filesystems. ( issue #162 ) - * Fixed bug where {@links} in @deprecated tags did not resolve. ( issue #220 ) - * Fixed bug that caused parens around a function to make it to be unrecognized. ( issue #213 ) - * Fixed bug prevented explicit links to named anchors from working (thanks katgao.pku). ( issue #215 ) - * Fixed bug that prevented full description from appearing in file overview. ( issue #224 ) - -== 2.2.1 == - - * Fixed bug with class template, where sorting of methods was accidentally removed (thanks dezfowler). - * Added missing test files for the @exports unit tests. - -== 2.2.0 == - - * Fixed bug that caused exception when given a folder containing non-js files, even with the x commandline option set to "js". ( issue #193 ) - * Fixed typo in index template [patch submitted by olle]. ( issue #198 ) - * Modified @borrows tag experimentally to allow for missing "as ..." clause. - * Added support for the @exports tag, to allow one symbol to be documented as another. - * Added support for the -S option to document code following the Secure Modules pattern. - -== 2.1.0 == - - * Added support for the @event tag. - * Fixed bug that prevented the : character from appearing in symbol names. - * Fixed bug that prevented underscored symbols marked with @public being tagged as private. (issue #184 ) - * Fixed bug that randomly affected the @memberOf tag when the name of the symbol did not include the parent name. - * Fixed bug that prevented templates that were not in the jsdoc-toolkit folder from being found. ( issue #176 ) - * Added ability to check for trailing slash on template path. ( issue #177 ) - * Modified classDesc so that it no longer is appended with the constructor desc. - * Fixed call to plugin onDocCommentSrc. - * Added missing support for inline doc comments for function return types. ( issue #189 ) - * Added command line option -q, --quiet. - * Added command line option -E, --exclude. ( issue #143 ) - * Added 2 more hooks for plugins. ( issue #163 ) - * Added support for extending built-ins. ( issue #160 ) - * Added "compact" option to JSDOC.JsPlate.prototype.process. ( issue #159 ) - * @augments no longer documents static members as inherited. ( issue #138 ) - * @link to a class now goes to the page for that class, not the constructor. ( issue #178 ) - * Warnings of mismatched curly brace now include filename. ( issue #166 ) - * Fixed bug affecting template paths loaded via a configuration file when the trailing slash is missing. ( issue #191 ) - * Minor optimizations. - -== 2.0.2 == - - * Fixed bug that sometimes caused an example of division in the source code to be interpretted as a regex by the JsDoc Toolkit analyzer. ( issue #158 ) - * Fixed a bug that prevented private variables marked as @public from appearing in the documentation. ( issue #161 ) - * Fixed bug that prevented variable names with underscored properties from appearing in summaries. ( issue #173 ) - -== 2.0.1 == - - * Fixed bug that prevented @fileOverview tag from being recognized. - * Added support for @fieldOf as a synonym for @field plus @memberOf. - * Added support for @name tag in a @fileOverview comment to control the displayed name of the file. - * Added support for multiple @example tags. ( issue #152 ) - * Modified style sheet of jsdoc template to make more readable. ( issue #151 ) - * Fixed bug that prevented @since documentation from displaying correctly when it appeared in a class. ( issue #150 ) - * Fixed bug that caused inhertited properties to sometimes not resolve correctly. ( issue #144 ) - * Modified so that trailing whitespace in @example is always trimmed. ( issue #153 ) - * Added support for elseif to JsPlate. (hat tip to fredck) - * Added support for @location urls in the @overview comment to the jsdoc template. - -== Changes From Versions 1.4.0 to 2.0.0 == - - * Upgraded included version of Rhino from 1.6 to 1.7R1. - * Removed circular references in parsed documentation objects. - * Improved inheritance handling, now properties and events can be inherited same as methods. - * Improved handling of cross-file relationships, now having two related objects in separate files is not a problem. - * Improved ability to recognize membership of previously defined objects. - * Added ability to redefine parsing behavior with plugins. - * @methodOf is a synonym for @function and @memberOf. - * Added @default to document default values of members that are objects. - * Added ability to parse and refer to inner functions. - * Fixed bug that appeared when calling a method to set properties of the instance referred to by "this". - * Added ability to automatically create links to other symbols. - * New "jsdoc" template now produces fully W3C valid XHTML. - * Inline parameter type hint comments are now documented. - * Fixed error: Locally scoped variables (declared with var) no longer appear as global. - * It is now possible to run JsDoc Toolkit from any directory. - * Added support for inline {@link ...} tags. - * Added support for the -H command-line option to allow for custom content handlers. - * Tag names @inherits and @scope changed to @borrows and @lends. - ? Combining @constructor in a doclet with @lends now supported. - * Multiple @lend tags now supported. - * Added support for the @constructs tag, used inside a @lends block. - * Added support for the @constant tag. - * Fixed bug that prevented the use of [] as a default value. - * Added support for the @field tag. - * Added support for the @public tag (applied to inner functions). - * @namespace tag can now be applied to functions, not just object literals. - * Added support for the -s command line option to suppress source code output. - * Added new unit test framework. - * Underscored symbols are now treated as if they have a @private tag by default. - * Improved support for anonymous constructors. - * Added support for the nocode meta tag. - \ No newline at end of file diff --git a/lib/jsdoc-toolkit/conf/sample.conf b/lib/jsdoc-toolkit/conf/sample.conf deleted file mode 100644 index ad0f08e6..00000000 --- a/lib/jsdoc-toolkit/conf/sample.conf +++ /dev/null @@ -1,31 +0,0 @@ -/* - This is an example of one way you could set up a configuration file to more - conveniently define some commandline options. You might like to do this if - you frequently reuse the same options. Note that you don't need to define - every option in this file, you can combine a configuration file with - additional options on the commandline if your wish. - - You would include this configuration file by running JsDoc Toolkit like so: - java -jar jsrun.jar app/run.js -c=conf/sample.conf - -*/ - -{ - // source files to use - _: ['app/test/jsdoc_test.js'], - - // document all functions, even uncommented ones - a: true, - - // including those marked @private - p: true, - - // some extra variables I want to include - D: {generatedBy: "Michael Mathews", copyright: "2008"}, - - // use this directory as the output directory - d: "docs", - - // use this template - t: "templates/jsdoc" -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/java/build.xml b/lib/jsdoc-toolkit/java/build.xml deleted file mode 100644 index bb845ce3..00000000 --- a/lib/jsdoc-toolkit/java/build.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/lib/jsdoc-toolkit/java/build_1.4.xml b/lib/jsdoc-toolkit/java/build_1.4.xml deleted file mode 100644 index ab408a4c..00000000 --- a/lib/jsdoc-toolkit/java/build_1.4.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/jsdoc-toolkit/java/classes/js.jar b/lib/jsdoc-toolkit/java/classes/js.jar deleted file mode 100644 index 0352cb18..00000000 Binary files a/lib/jsdoc-toolkit/java/classes/js.jar and /dev/null differ diff --git a/lib/jsdoc-toolkit/java/src/JsDebugRun.java b/lib/jsdoc-toolkit/java/src/JsDebugRun.java deleted file mode 100755 index 319a5c67..00000000 --- a/lib/jsdoc-toolkit/java/src/JsDebugRun.java +++ /dev/null @@ -1,21 +0,0 @@ -/** - * A trivial bootstrap class that simply adds the path to the - * .js file as an argument to the Rhino call. This little hack - * allows the code in the .js file to have access to it's own - * path via the Rhino arguments object. This is necessary to - * allow the .js code to find resource files in a location - * relative to itself. - * - * USAGE: java -jar jsdebug.jar path/to/file.js - */ -public class JsDebugRun { - public static void main(String[] args) { - String[] jsargs = {"-j="+args[0]}; - - String[] allArgs = new String[jsargs.length + args.length]; - System.arraycopy(args, 0, allArgs, 0, args.length); - System.arraycopy(jsargs, 0, allArgs, args.length ,jsargs.length); - - org.mozilla.javascript.tools.debugger.Main.main(allArgs); - } -} diff --git a/lib/jsdoc-toolkit/java/src/JsRun.java b/lib/jsdoc-toolkit/java/src/JsRun.java deleted file mode 100644 index 25f519a9..00000000 --- a/lib/jsdoc-toolkit/java/src/JsRun.java +++ /dev/null @@ -1,21 +0,0 @@ -/** - * A trivial bootstrap class that simply adds the path to the - * .js file as an argument to the Rhino call. This little hack - * allows the code in the .js file to have access to it's own - * path via the Rhino arguments object. This is necessary to - * allow the .js code to find resource files in a location - * relative to itself. - * - * USAGE: java -jar jsrun.jar path/to/file.js - */ -public class JsRun { - public static void main(String[] args) { - String[] jsargs = {"-j="+args[0]}; - - String[] allArgs = new String[jsargs.length + args.length]; - System.arraycopy(args, 0, allArgs, 0, args.length); - System.arraycopy(jsargs, 0, allArgs, args.length ,jsargs.length); - - org.mozilla.javascript.tools.shell.Main.main(allArgs); - } -} diff --git a/lib/jsdoc-toolkit/jsdebug.jar b/lib/jsdoc-toolkit/jsdebug.jar deleted file mode 100644 index a0ac7daa..00000000 Binary files a/lib/jsdoc-toolkit/jsdebug.jar and /dev/null differ diff --git a/lib/jsdoc-toolkit/jsrun.jar b/lib/jsdoc-toolkit/jsrun.jar deleted file mode 100644 index 49c03f4c..00000000 Binary files a/lib/jsdoc-toolkit/jsrun.jar and /dev/null differ diff --git a/lib/jsdoc-toolkit/jsrun.sh b/lib/jsdoc-toolkit/jsrun.sh deleted file mode 100644 index 74ca79c0..00000000 --- a/lib/jsdoc-toolkit/jsrun.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/ksh - -# launcher script for jsdoc -# Author: Avi Deitcher -# -# This program is released under the MIT License as follows: - -# Copyright (c) 2008-2009 Atomic Inc -# -#Permission is hereby granted, free of charge, to any person -#obtaining a copy of this software and associated documentation -#files (the "Software"), to deal in the Software without -#restriction, including without limitation the rights to use, -#copy, modify, merge, publish, distribute, sublicense, and/or sell -#copies of the Software, and to permit persons to whom the -#Software is furnished to do so, subject to the following -#conditions: -## -#The above copyright notice and this permission notice shall be -#included in all copies or substantial portions of the Software. -# -#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -#EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -#OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -#NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -#HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -#WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -#FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -#OTHER DEALINGS IN THE SOFTWARE. -# - - -if [[ -n "$JSDOCDIR" ]]; then - _DOCDIR="-Djsdoc.dir=$JSDOCDIR" - _APPDIR="$JSDOCDIR/app" - _BASEDIR="$JSDOCDIR" -else - _DOCDIR="" - _APPDIR="./app" - _BASEDIR="." -fi - -if [[ -n "$JSDOCTEMPLATEDIR" ]]; then - _TDIR="-Djsdoc.template.dir=$JSDOCTEMPLATEDIR" -else - _TDIR="" -fi - -CMD="java $_DOCDIR $_TDIR -jar $_BASEDIR/jsrun.jar $_APPDIR/run.js $@" -echo $CMD -$CMD - diff --git a/lib/jsdoc-toolkit/out/jsdoc/files.html b/lib/jsdoc-toolkit/out/jsdoc/files.html deleted file mode 100644 index 855eef3b..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/files.html +++ /dev/null @@ -1,626 +0,0 @@ - - - - - - JsDoc Reference - File Index - - - - - - - - - - -
-

File Index

- - - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
-
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 21:41:43 GMT-0400 (EDT) -
- - \ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/index.html b/lib/jsdoc-toolkit/out/jsdoc/index.html deleted file mode 100644 index 6c850889..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/index.html +++ /dev/null @@ -1,410 +0,0 @@ - - - - - - JsDoc Reference - Index - - - - - - - - - - -
-

Class Index

- - -
-

_global_

- -
-
- -
-

Array

- -
-
- -
-

fabric.Circle

- Circle -
-
- -
-

fabric.Color

- Color -
-
- -
-

fabric.Element

- fabric.Element -
-
- - -
- -
-

fabric.Ellipse

- Ellipse -
-
- -
-

fabric.Group

- Group -
-
- -
-

fabric.Image

- Image -
-
- -
-

fabric.Intersection

- Intersection -
-
- -
-

fabric.Line

- Line -
-
- -
-

fabric.Object

- Object -
-
- -
-

fabric.Path

- Path -
-
- -
-

fabric.PathGroup

- PathGroup -
-
- -
-

fabric.Point

- -
-
- -
-

fabric.Polygon

- Polygon -
-
- -
-

fabric.Polyline

- Polyline -
-
- -
-

fabric.Rect

- Rect -
-
- -
-

fabric.Text

- Text -
-
- -
-

fabric.Triangle

- Triangle -
-
- -
-

fabric.util

- -
-
- - -
- -
-

fabric.util.object

- fabric.util.object -
-
- - -
- -
-

Function

- -
-
- -
-

String

- -
-
- - -
-
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 21:41:43 GMT-0400 (EDT) -
- - \ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/Array.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/Array.html deleted file mode 100644 index 97d88764..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/Array.html +++ /dev/null @@ -1,694 +0,0 @@ - - - - - - - JsDoc Reference - Array - - - - - - - - - - - - - -
- -

- - Built-In Namespace Array -

- - -

- - - - - - -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
  -
every(fn, context) -
-
-
  -
filter(fn, context) -
-
-
  -
forEach(fn, context) -
-
-
  -
indexOf(value, from) -
-
-
  -
map(fn, context) -
-
-
  -
reduce(fn) -
-
-
  -
some(fn, context) -
-
-
- - - - - - - - - - - - - - - -
- Method Detail -
- - -
- - - every(fn, context) - -
-
- - -
- Defined in: lang_array.js. - - -
- - - - -
-
Parameters:
- -
- fn - -
-
- -
- context - -
-
- -
- - - - - - - - -
- - -
- - - filter(fn, context) - -
-
- - -
- Defined in: lang_array.js. - - -
- - - - -
-
Parameters:
- -
- fn - -
-
- -
- context - -
-
- -
- - - - - - - - -
- - -
- - - forEach(fn, context) - -
-
- - -
- Defined in: lang_array.js. - - -
- - - - -
-
Parameters:
- -
- fn - -
-
- -
- context - -
-
- -
- - - - - - - - -
- - -
- - - indexOf(value, from) - -
-
- - -
- Defined in: lang_array.js. - - -
- - - - -
-
Parameters:
- -
- value - -
-
- -
- from - -
-
- -
- - - - - - - - -
- - -
- - - map(fn, context) - -
-
- - -
- Defined in: lang_array.js. - - -
- - - - -
-
Parameters:
- -
- fn - -
-
- -
- context - -
-
- -
- - - - - - - - -
- - -
- - - reduce(fn) - -
-
- - -
- Defined in: lang_array.js. - - -
- - - - -
-
Parameters:
- -
- fn - -
-
- -
- - - - - - - - -
- - -
- - - some(fn, context) - -
-
- - -
- Defined in: lang_array.js. - - -
- - - - -
-
Parameters:
- -
- fn - -
-
- -
- context - -
-
- -
- - - - - - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 21:41:42 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/Canvas.fabric.Object.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/Canvas.fabric.Object.html deleted file mode 100644 index 6e8adc50..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/Canvas.fabric.Object.html +++ /dev/null @@ -1,313 +0,0 @@ - - - - - - - JsDoc Reference - Canvas.fabric.Object - - - - - - - - - - - -
- - -
-

Classes

- -
- -
- -
- -

- - Class Canvas.fabric.Object -

- - -

- - - - Object - - -
Defined in: object.class.js. - -

- - - - - - - - - - - - - - - - - -
Class Summary
Constructor AttributesConstructor Name and Description
  - -
-
- - - - - - - - - - - - -
-
- Class Detail -
- -
- Canvas.fabric.Object() -
- -
- - -
- - - - - - - - - - - - -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Wed Oct 13 2010 16:13:28 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/Canvas.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/Canvas.html deleted file mode 100644 index f2b95d57..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/Canvas.html +++ /dev/null @@ -1,313 +0,0 @@ - - - - - - - JsDoc Reference - Canvas - - - - - - - - - - - -
- - -
-

Classes

- -
- -
- -
- -

- - Namespace Canvas -

- - -

- - - - - - -
Defined in: object.class.js. - -

- - - - - - - - - - - - - - - - - -
Namespace Summary
Constructor AttributesConstructor Name and Description
  -
- Canvas -
-
-
- - - - - - - - - - - - -
-
- Namespace Detail -
- -
- Canvas -
- -
- - -
- - - - - - - - - - - - -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Wed Oct 13 2010 16:13:28 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/Color.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/Color.html deleted file mode 100644 index 0bb64865..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/Color.html +++ /dev/null @@ -1,1217 +0,0 @@ - - - - - - - JsDoc Reference - Color - - - - - - - - - - - - - -
- -

- - Class Color -

- - -

- - - - - - -
Defined in: color.class.js. - -

- - - - - - - - - - - - - - - - - -
Class Summary
Constructor AttributesConstructor Name and Description
  -
- Color(color) -
-
The purpose of fabric.Color is to abstract and encapsulate common color operations; -fabric.Color is a constructor and creates instances of fabric.Color objects.
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Summary
Field AttributesField Name and Description
<static>   -
- Color.reHex -
-
Regex matching color in HEX format (ex: #FF5555, 010155, aff)
-
<static>   -
- Color.reRGBa -
-
Regex matching color in RGB or RGBA formats (ex: rgb(0, 0, 0), rgb(255, 100, 10, 0.5), rgb(1,1,1))
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
<static>   -
Color.fromHex(color) -
-
Returns new color object, when given a color in HEX format
-
<static>   -
Color.fromRgb(color) -
-
Returns new color object, when given a color in RGB format
-
<static>   -
Color.fromRgba(color) -
-
Returns new color object, when given a color in RGBA format
-
<static>   -
Color.fromSource(source) -
-
Returns new color object, when given color in array representation (ex: [200, 100, 100, 0.5])
-
  - -
Gets value of alpha channel for this color
-
  - -
Returns source of this color (where source is an array representation; ex: [200, 200, 100, 1])
-
  -
overlayWith(otherColor) -
-
Overlays color with another color
-
  -
setAlpha(0-1) -
-
Sets value of alpha channel for this color
-
  -
setSource(source) -
-
Sets source of this color (where source is an array representation; ex: [200, 200, 100, 1])
-
<static>   -
Color.sourceFromHex(color) -
-
Returns array represenatation (ex: [100, 100, 200, 1]) of a color that's in HEX format
-
<static>   -
Color.sourceFromRgb(color) -
-
Returns array represenatation (ex: [100, 100, 200, 1]) of a color that's in RGB or RGBA format
-
  -
toBlackWhite(threshold) -
-
Transforms color to its black and white representation
-
  - -
Transforms color to its grayscale representation
-
  -
toHex() -
-
Returns color represenation in HEX format
-
  -
toRgb() -
-
Returns color represenation in RGB format
-
  -
toRgba() -
-
Returns color represenation in RGBA format
-
- - - - - - - - - -
-
- Class Detail -
- -
- Color(color) -
- -
- The purpose of fabric.Color is to abstract and encapsulate common color operations; -fabric.Color is a constructor and creates instances of fabric.Color objects. - -
- - - - - -
-
Parameters:
- -
- {String} color - -
-
(optional) in hex or rgb(a) format
- -
- - - - - - - - -
- - - - -
- Field Detail -
- - -
<static> - - - Color.reHex - -
-
- Regex matching color in HEX format (ex: #FF5555, 010155, aff) - - -
- - - - - - - - -
- - -
<static> - - - Color.reRGBa - -
-
- Regex matching color in RGB or RGBA formats (ex: rgb(0, 0, 0), rgb(255, 100, 10, 0.5), rgb(1,1,1)) - - -
- - - - - - - - - - - - - - -
- Method Detail -
- - -
<static> - - {Color} - Color.fromHex(color) - -
-
- Returns new color object, when given a color in HEX format - - -
- - - - -
-
Parameters:
- -
- color - -
-
- -
- - - - - -
-
Returns:
- -
{Color}
- -
- - - - -
- - -
<static> - - {Color} - Color.fromRgb(color) - -
-
- Returns new color object, when given a color in RGB format - - -
- - - - -
-
Parameters:
- -
- {String} color - -
-
ex: rgb(0-255,0-255,0-255)
- -
- - - - - -
-
Returns:
- -
{Color}
- -
- - - - -
- - -
<static> - - {Color} - Color.fromRgba(color) - -
-
- Returns new color object, when given a color in RGBA format - - -
- - - - -
-
Parameters:
- -
- {String} color - -
-
- -
- - - - - -
-
Returns:
- -
{Color}
- -
- - - - -
- - -
<static> - - {Color} - Color.fromSource(source) - -
-
- Returns new color object, when given color in array representation (ex: [200, 100, 100, 0.5]) - - -
- - - - -
-
Parameters:
- -
- source - -
-
- -
- - - - - -
-
Returns:
- -
{Color}
- -
- - - - -
- - -
- - {Number} - getAlpha() - -
-
- Gets value of alpha channel for this color - - -
- - - - - - - - -
-
Returns:
- -
{Number} 0-1
- -
- - - - -
- - -
- - {Array} - getSource() - -
-
- Returns source of this color (where source is an array representation; ex: [200, 200, 100, 1]) - - -
- - - - - - - - -
-
Returns:
- -
{Array}
- -
- - - - -
- - -
- - {Color} - overlayWith(otherColor) - -
-
- Overlays color with another color - - -
- - - - -
-
Parameters:
- -
- {String|Color} otherColor - -
-
- -
- - - - - -
-
Returns:
- -
{Color} thisArg
- -
- - - - -
- - -
- - {Color} - setAlpha(0-1) - -
-
- Sets value of alpha channel for this color - - -
- - - - -
-
Parameters:
- -
- {Number} 0-1 - -
-
- -
- - - - - -
-
Returns:
- -
{Color} thisArg
- -
- - - - -
- - -
- - - setSource(source) - -
-
- Sets source of this color (where source is an array representation; ex: [200, 200, 100, 1]) - - -
- - - - -
-
Parameters:
- -
- {Array} source - -
-
- -
- - - - - - - - -
- - -
<static> - - {Array} - Color.sourceFromHex(color) - -
-
- Returns array represenatation (ex: [100, 100, 200, 1]) of a color that's in HEX format - - -
- - - - -
-
Parameters:
- -
- {String} color - -
-
ex: FF5555
- -
- - - - - -
-
Returns:
- -
{Array} source
- -
- - - - -
- - -
<static> - - {Array} - Color.sourceFromRgb(color) - -
-
- Returns array represenatation (ex: [100, 100, 200, 1]) of a color that's in RGB or RGBA format - - -
- - - - -
-
Parameters:
- -
- {String} color - -
-
ex: rgb(0-255,0-255,0-255)
- -
- - - - - -
-
Returns:
- -
{Array} source
- -
- - - - -
- - -
- - {Color} - toBlackWhite(threshold) - -
-
- Transforms color to its black and white representation - - -
- - - - -
-
Parameters:
- -
- threshold - -
-
- -
- - - - - -
-
Returns:
- -
{Color} thisArg
- -
- - - - -
- - -
- - {Color} - toGrayscale() - -
-
- Transforms color to its grayscale representation - - -
- - - - - - - - -
-
Returns:
- -
{Color} thisArg
- -
- - - - -
- - -
- - {String} - toHex() - -
-
- Returns color represenation in HEX format - - -
- - - - - - - - -
-
Returns:
- -
{String} ex: FF5555
- -
- - - - -
- - -
- - {String} - toRgb() - -
-
- Returns color represenation in RGB format - - -
- - - - - - - - -
-
Returns:
- -
{String} ex: rgb(0-255,0-255,0-255)
- -
- - - - -
- - -
- - {String} - toRgba() - -
-
- Returns color represenation in RGBA format - - -
- - - - - - - - -
-
Returns:
- -
{String} ex: rgba(0-255,0-255,0-255,0-1)
- -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 17:01:39 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/Function.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/Function.html deleted file mode 100644 index 168849c9..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/Function.html +++ /dev/null @@ -1,370 +0,0 @@ - - - - - - - JsDoc Reference - Function - - - - - - - - - - - - - -
- -

- - Built-In Namespace Function -

- - -

- - - - - - -

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
  -
bind(thisArg) -
-
-
- - - - - - - - - - - - - - - -
- Method Detail -
- - -
- - - bind(thisArg) - -
-
- - -
- Defined in: lang_function.js. - - -
- - - - -
-
Parameters:
- -
- thisArg - -
-
- -
- - - - - - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 21:41:43 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/Point.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/Point.html deleted file mode 100644 index 85f1999c..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/Point.html +++ /dev/null @@ -1,1578 +0,0 @@ - - - - - - - JsDoc Reference - Point - - - - - - - - - - - -
- - -
-

Classes

- -
- -
- -
- -

- - Class Point -

- - -

- - - - - - -
Defined in: point.class.js. - -

- - - - - - - - - - - - - - - - - -
Class Summary
Constructor AttributesConstructor Name and Description
  -
- Point(x, y) -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
  -
add(that) -
-
-
  -
addEquals(that) -
-
-
  -
distanceFrom(that) -
-
-
  -
divide(scalar) -
-
-
  -
divideEquals(scalar) -
-
-
  -
eq(that) -
-
-
  -
gt(that) -
-
-
  -
gte(that) -
-
-
  -
init(x, y) -
-
-
  -
lerp(that, t) -
-
-
  -
lt(that) -
-
-
  -
lte(that) -
-
-
  -
max(that) -
-
-
  -
min(that) -
-
-
  -
multiply(scalar) -
-
-
  -
multiplyEquals(scalar) -
-
-
  -
scalarAdd(scalar) -
-
-
  -
scalarAddEquals(scalar, thisArg) -
-
-
  -
scalarSubtract(scalar) -
-
-
  - -
-
  -
setFromPoint(that) -
-
-
  -
setXY(x, y) -
-
-
  -
subtract(that) -
-
-
  - -
-
  -
swap(that) -
-
-
  - -
-
- - - - - - - - - -
-
- Class Detail -
- -
- Point(x, y) -
- -
- - -
- - - - - -
-
Parameters:
- -
- {Number} x - -
-
- -
- {Number} y - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Point} thisArg
- -
- - - - -
- - - - - - - -
- Method Detail -
- - -
- - {fabric.Point} - add(that) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {fabric.Point} that - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Point} new Point instance with added values
- -
- - - - -
- - -
- - {fabric.Point} - addEquals(that) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {fabric.Point} that - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Point} thisArg
- -
- - - - -
- - -
- - - distanceFrom(that) - -
-
- - - -
- - - - -
-
Parameters:
- -
- that - -
-
- -
- - - - - - - - -
- - -
- - - divide(scalar) - -
-
- - - -
- - - - -
-
Parameters:
- -
- scalar - -
-
- -
- - - - - - - - -
- - -
- - - divideEquals(scalar) - -
-
- - - -
- - - - -
-
Parameters:
- -
- scalar - -
-
- -
- - - - - - - - -
- - -
- - - eq(that) - -
-
- - - -
- - - - -
-
Parameters:
- -
- that - -
-
- -
- - - - - - - - -
- - -
- - - gt(that) - -
-
- - - -
- - - - -
-
Parameters:
- -
- that - -
-
- -
- - - - - - - - -
- - -
- - - gte(that) - -
-
- - - -
- - - - -
-
Parameters:
- -
- that - -
-
- -
- - - - - - - - -
- - -
- - - init(x, y) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {Number} x - -
-
- -
- {Number} y - -
-
- -
- - - - - - - - -
- - -
- - - lerp(that, t) - -
-
- - - -
- - - - -
-
Parameters:
- -
- that - -
-
- -
- t - -
-
- -
- - - - - - - - -
- - -
- - - lt(that) - -
-
- - - -
- - - - -
-
Parameters:
- -
- that - -
-
- -
- - - - - - - - -
- - -
- - - lte(that) - -
-
- - - -
- - - - -
-
Parameters:
- -
- that - -
-
- -
- - - - - - - - -
- - -
- - - max(that) - -
-
- - - -
- - - - -
-
Parameters:
- -
- that - -
-
- -
- - - - - - - - -
- - -
- - - min(that) - -
-
- - - -
- - - - -
-
Parameters:
- -
- that - -
-
- -
- - - - - - - - -
- - -
- - - multiply(scalar) - -
-
- - - -
- - - - -
-
Parameters:
- -
- scalar - -
-
- -
- - - - - - - - -
- - -
- - - multiplyEquals(scalar) - -
-
- - - -
- - - - -
-
Parameters:
- -
- scalar - -
-
- -
- - - - - - - - -
- - -
- - {fabric.Point} - scalarAdd(scalar) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {Number} scalar - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Point} new Point with added value
- -
- - - - -
- - -
- - - scalarAddEquals(scalar, thisArg) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {Number} scalar - -
-
- -
- {fabric.Point} thisArg - -
-
- -
- - - - - - - - -
- - -
- - - scalarSubtract(scalar) - -
-
- - - -
- - - - -
-
Parameters:
- -
- scalar - -
-
- -
- - - - - - - - -
- - -
- - - scalarSubtractEquals(scalar) - -
-
- - - -
- - - - -
-
Parameters:
- -
- scalar - -
-
- -
- - - - - - - - -
- - -
- - - setFromPoint(that) - -
-
- - - -
- - - - -
-
Parameters:
- -
- that - -
-
- -
- - - - - - - - -
- - -
- - - setXY(x, y) - -
-
- - - -
- - - - -
-
Parameters:
- -
- x - -
-
- -
- y - -
-
- -
- - - - - - - - -
- - -
- - {fabric.Point} - subtract(that) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {fabric.Point} that - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Point} new Point object with subtracted values
- -
- - - - -
- - -
- - {fabric.Point} - subtractEquals(that) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {fabric.Point} that - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Point} thisArg
- -
- - - - -
- - -
- - - swap(that) - -
-
- - - -
- - - - -
-
Parameters:
- -
- that - -
-
- -
- - - - - - - - -
- - -
- - - toString() - -
-
- - - -
- - - - - - - - - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Wed Oct 13 2010 16:15:02 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/String.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/String.html deleted file mode 100644 index 720c1f1e..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/String.html +++ /dev/null @@ -1,359 +0,0 @@ - - - - - - - JsDoc Reference - String - - - - - - - - - - - - - -
- -

- - Built-In Namespace String -

- - -

- - - - - - -

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
  -
trim() -
-
Trims a string (removing whitespace from the beginning and the end)
-
- - - - - - - - - - - - - - - -
- Method Detail -
- - -
- - - trim() - -
-
- Trims a string (removing whitespace from the beginning and the end) - -
- Defined in: lang_string.js. - - -
- - - - - - - - - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 21:41:43 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/_global_.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/_global_.html deleted file mode 100644 index e55d5e5f..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/_global_.html +++ /dev/null @@ -1,912 +0,0 @@ - - - - - - - JsDoc Reference - _global_ - - - - - - - - - - - - - -
- -

- - Built-In Namespace _global_ -

- - -

- - - - - - -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Summary
Field AttributesField Name and Description
  -
- fabric -
-
-
  - -
-
  -
- scout -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
  -
addClass(element, className) -
-
-
  -
animate(options) -
-
-
  -
getById(id) -
-
-
  -
getElement(uid) -
-
-
  -
makeElement(tagName, attributes) -
-
-
  -
setElement(uid, element) -
-
-
  -
setOpacity(element) -
-
-
  -
toArray(arrayLike) -
-
-
  -
wrapElement(element, wrapper, attributes) -
-
-
- - - - - - - - - - - - -
- Field Detail -
- - -
- - - fabric - -
-
- - -
- Defined in: parser.js. - - -
- - - - - - - - -
- - -
- - - getElementOffset - -
-
- - -
- Defined in: dom_misc.js. - - -
- - - - - - - - -
- - -
- - - scout - -
-
- - -
- Defined in: scout.js. - - -
- - - - - - - - - - - - - - -
- Method Detail -
- - -
- - - addClass(element, className) - -
-
- - -
- Defined in: dom_misc.js. - - -
- - - - -
-
Parameters:
- -
- element - -
-
- -
- className - -
-
- -
- - - - - - - - -
- - -
- - - animate(options) - -
-
- - -
- Defined in: dom_misc.js. - - -
- - - - -
-
Parameters:
- -
- options - -
-
- -
- - - - - - - - -
- - -
- - - getById(id) - -
-
- - -
- Defined in: dom_misc.js. - - -
- - - - -
-
Parameters:
- -
- id - -
-
- -
- - - - - - - - -
- - -
- - - getElement(uid) - -
-
- - -
- Defined in: dom_event.js. - - -
- - - - -
-
Parameters:
- -
- uid - -
-
- -
- - - - - - - - -
- - -
- - - makeElement(tagName, attributes) - -
-
- - -
- Defined in: dom_misc.js. - - -
- - - - -
-
Parameters:
- -
- tagName - -
-
- -
- attributes - -
-
- -
- - - - - - - - -
- - -
- - - setElement(uid, element) - -
-
- - -
- Defined in: dom_event.js. - - -
- - - - -
-
Parameters:
- -
- uid - -
-
- -
- element - -
-
- -
- - - - - - - - -
- - -
- - - setOpacity(element) - -
-
- - -
- Defined in: dom_style.js. - - -
- - - - -
-
Parameters:
- -
- element - -
-
- -
- - - - - - - - -
- - -
- - - toArray(arrayLike) - -
-
- - -
- Defined in: dom_misc.js. - - -
- - - - -
-
Parameters:
- -
- arrayLike - -
-
- -
- - - - - - - - -
- - -
- - - wrapElement(element, wrapper, attributes) - -
-
- - -
- Defined in: dom_misc.js. - - -
- - - - -
-
Parameters:
- -
- element - -
-
- -
- wrapper - -
-
- -
- attributes - -
-
- -
- - - - - - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 21:41:42 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Circle#initialize.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Circle#initialize.html deleted file mode 100644 index 0d205f4a..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Circle#initialize.html +++ /dev/null @@ -1,333 +0,0 @@ - - - - - - - JsDoc Reference - fabric.Circle#initialize - - - - - - - - - - - - - -
- -

- - Class fabric.Circle#initialize -

- - -

- - - - - - -
Defined in: circle.class.js. - -

- - - - - - - - - - - - - - - - - -
Class Summary
Constructor AttributesConstructor Name and Description
  - -
-
- - - - - - - - - - - - -
-
- Class Detail -
- -
- fabric.Circle#initialize(options) -
- -
- - -
- - - - - -
-
Parameters:
- -
- options - -
-
{Object} options object
- -
- - - - - -
-
Returns:
- -
{Object} thisArg
- -
- - - - -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 14:04:31 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Circle.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Circle.html deleted file mode 100644 index 5f375cf9..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Circle.html +++ /dev/null @@ -1,723 +0,0 @@ - - - - - - - JsDoc Reference - fabric.Circle - - - - - - - - - - - - - -
- -

- - Class fabric.Circle -

- - -

- -
Extends - fabric.Object.
- - - Circle - - -
Defined in: circle.class.js. - -

- - - - - - - - - - - - - - - - - -
Class Summary
Constructor AttributesConstructor Name and Description
  - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Summary
Field AttributesField Name and Description
<static>   -
- fabric.Circle.ATTRIBUTE_NAMES -
-
List of attribute names to account for when parsing SVG element (used by `fabric.Circle.fromElement`)
-
  -
- type -
-
-
- - - -
-
Fields borrowed from class fabric.Object:
FX_DURATION, FX_TRANSITION, includeDefaultValues, MIN_SCALE_LIMIT, NUM_FRACTION_DIGITS, options, rotate, stateProperties
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
  - -
Returns complexity of an instance
-
<static>   -
fabric.Circle.fromElement(element, options) -
-
Returns fabric.Circle instance from an SVG element
-
<static>   -
fabric.Circle.fromObject(object) -
-
Returns fabric.Circle instance from an object representation
-
  -
initialize(options) -
-
Constructor
-
  - -
Returns object representation of an instance
-
- - - -
-
Methods borrowed from class fabric.Object:
callSuper, clone, cloneAsImage, drawBorders, drawCorners, fxRemove, fxStraighten, get, getAngle, getCenter, getHeight, getWidth, hasStateChanged, intersectsWithObject, intersectsWithRect, isActive, isContainedWithinRect, isType, render, saveState, scale, scaleToHeight, scaleToWidth, set, setActive, setAngle, setCoords, setOpacity, setOptions, setSourcePath, straighten, toDatalessObject, toDataURL, toggle, toGrayscale, toJSON, toString, transform
-
- - - - - - - -
-
- Class Detail -
- -
- fabric.Circle() -
- -
- - -
- - - - - - - - - - - - -
- - - - -
- Field Detail -
- - -
<static> - - - fabric.Circle.ATTRIBUTE_NAMES - -
-
- List of attribute names to account for when parsing SVG element (used by `fabric.Circle.fromElement`) - - -
- - - - - - - - -
- - -
- - - type - -
-
- - - -
- - - - - - - - - - - - - - -
- Method Detail -
- - -
- - {Number} - complexity() - -
-
- Returns complexity of an instance - - -
- - - - - - - - -
-
Returns:
- -
{Number} complexity of this instance
- -
- - - - -
- - -
<static> - - {Object} - fabric.Circle.fromElement(element, options) - -
-
- Returns fabric.Circle instance from an SVG element - - -
- - - - -
-
Parameters:
- -
- element - -
-
{SVGElement} element to parse
- -
- options - -
-
{Object} options object
- -
- - - - -
-
Throws:
- -
- {Error} -
-
If value of `r` attribute is missing or invalid
- -
- - -
-
Returns:
- -
{Object} instance of fabric.Circle
- -
- - - - -
- - -
<static> - - {Object} - fabric.Circle.fromObject(object) - -
-
- Returns fabric.Circle instance from an object representation - - -
- - - - -
-
Parameters:
- -
- {Object} object - -
-
Object to create an instance from
- -
- - - - - -
-
Returns:
- -
{Object} Instance of fabric.Circle
- -
- - - - -
- - -
- - {fabric.Circle} - initialize(options) - -
-
- Constructor - - -
- - - - -
-
Parameters:
- -
- {Object} options - Optional -
-
Options object
- -
- - - - - -
-
Returns:
- -
{fabric.Circle} thisArg
- -
- - - - -
- - -
- - {Object} - toObject() - -
-
- Returns object representation of an instance - - -
- - - - - - - - -
-
Returns:
- -
{Object} object representation of an instance
- -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 21:41:42 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Color.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Color.html deleted file mode 100644 index 8557b545..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Color.html +++ /dev/null @@ -1,1231 +0,0 @@ - - - - - - - JsDoc Reference - fabric.Color - - - - - - - - - - - - - -
- -

- - Class fabric.Color -

- - -

- - - - Color - - -
Defined in: color.class.js. - -

- - - - - - - - - - - - - - - - - -
Class Summary
Constructor AttributesConstructor Name and Description
  -
- fabric.Color(color) -
-
The purpose of fabric.Color is to abstract and encapsulate common color operations; -fabric.Color is a constructor and creates instances of fabric.Color objects.
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Summary
Field AttributesField Name and Description
<static>   -
- fabric.Color.reHex -
-
Regex matching color in HEX format (ex: #FF5555, 010155, aff)
-
<static>   -
- fabric.Color.reRGBa -
-
Regex matching color in RGB or RGBA formats (ex: rgb(0, 0, 0), rgb(255, 100, 10, 0.5), rgb(1,1,1))
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
<static>   -
fabric.Color.fromHex(color) -
-
Returns new color object, when given a color in HEX format
-
<static>   -
fabric.Color.fromRgb(color) -
-
Returns new color object, when given a color in RGB format
-
<static>   -
fabric.Color.fromRgba(color) -
-
Returns new color object, when given a color in RGBA format
-
<static>   -
fabric.Color.fromSource(source) -
-
Returns new color object, when given color in array representation (ex: [200, 100, 100, 0.5])
-
  - -
Gets value of alpha channel for this color
-
  - -
Returns source of this color (where source is an array representation; ex: [200, 200, 100, 1])
-
  -
overlayWith(otherColor) -
-
Overlays color with another color
-
  -
setAlpha(0-1) -
-
Sets value of alpha channel for this color
-
  -
setSource(source) -
-
Sets source of this color (where source is an array representation; ex: [200, 200, 100, 1])
-
<static>   -
fabric.Color.sourceFromHex(color) -
-
Returns array represenatation (ex: [100, 100, 200, 1]) of a color that's in HEX format
-
<static>   -
fabric.Color.sourceFromRgb(color) -
-
Returns array represenatation (ex: [100, 100, 200, 1]) of a color that's in RGB or RGBA format
-
  -
toBlackWhite(threshold) -
-
Transforms color to its black and white representation
-
  - -
Transforms color to its grayscale representation
-
  -
toHex() -
-
Returns color represenation in HEX format
-
  -
toRgb() -
-
Returns color represenation in RGB format
-
  -
toRgba() -
-
Returns color represenation in RGBA format
-
- - - - - - - - - -
-
- Class Detail -
- -
- fabric.Color(color) -
- -
- The purpose of fabric.Color is to abstract and encapsulate common color operations; -fabric.Color is a constructor and creates instances of fabric.Color objects. - -
- - - - - -
-
Parameters:
- -
- {String} color - -
-
(optional) in hex or rgb(a) format
- -
- - - - - - - - -
- - - - -
- Field Detail -
- - -
<static> - - - fabric.Color.reHex - -
-
- Regex matching color in HEX format (ex: #FF5555, 010155, aff) - - -
- - - - - - - - -
- - -
<static> - - - fabric.Color.reRGBa - -
-
- Regex matching color in RGB or RGBA formats (ex: rgb(0, 0, 0), rgb(255, 100, 10, 0.5), rgb(1,1,1)) - - -
- - - - - - - - - - - - - - -
- Method Detail -
- - -
<static> - - {fabric.Color} - fabric.Color.fromHex(color) - -
-
- Returns new color object, when given a color in HEX format - - -
- - - - -
-
Parameters:
- -
- color - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Color}
- -
- - - - -
- - -
<static> - - {fabric.Color} - fabric.Color.fromRgb(color) - -
-
- Returns new color object, when given a color in RGB format - - -
- - - - -
-
Parameters:
- -
- {String} color - -
-
ex: rgb(0-255,0-255,0-255)
- -
- - - - - -
-
Returns:
- -
{fabric.Color}
- -
- - - - -
- - -
<static> - - {fabric.Color} - fabric.Color.fromRgba(color) - -
-
- Returns new color object, when given a color in RGBA format - - -
- - - - -
-
Parameters:
- -
- {String} color - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Color}
- -
- - - - -
- - -
<static> - - {fabric.Color} - fabric.Color.fromSource(source) - -
-
- Returns new color object, when given color in array representation (ex: [200, 100, 100, 0.5]) - - -
- - - - -
-
Parameters:
- -
- source - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Color}
- -
- - - - -
- - -
- - {Number} - getAlpha() - -
-
- Gets value of alpha channel for this color - - -
- - - - - - - - -
-
Returns:
- -
{Number} 0-1
- -
- - - - -
- - -
- - {Array} - getSource() - -
-
- Returns source of this color (where source is an array representation; ex: [200, 200, 100, 1]) - - -
- - - - - - - - -
-
Returns:
- -
{Array}
- -
- - - - -
- - -
- - {fabric.Color} - overlayWith(otherColor) - -
-
- Overlays color with another color - - -
- - - - -
-
Parameters:
- -
- {String|fabric.Color} otherColor - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Color} thisArg
- -
- - - - -
- - -
- - {fabric.Color} - setAlpha(0-1) - -
-
- Sets value of alpha channel for this color - - -
- - - - -
-
Parameters:
- -
- {Number} 0-1 - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Color} thisArg
- -
- - - - -
- - -
- - - setSource(source) - -
-
- Sets source of this color (where source is an array representation; ex: [200, 200, 100, 1]) - - -
- - - - -
-
Parameters:
- -
- {Array} source - -
-
- -
- - - - - - - - -
- - -
<static> - - {Array} - fabric.Color.sourceFromHex(color) - -
-
- Returns array represenatation (ex: [100, 100, 200, 1]) of a color that's in HEX format - - -
- - - - -
-
Parameters:
- -
- {String} color - -
-
ex: FF5555
- -
- - - - - -
-
Returns:
- -
{Array} source
- -
- - - - -
- - -
<static> - - {Array} - fabric.Color.sourceFromRgb(color) - -
-
- Returns array represenatation (ex: [100, 100, 200, 1]) of a color that's in RGB or RGBA format - - -
- - - - -
-
Parameters:
- -
- {String} color - -
-
ex: rgb(0-255,0-255,0-255)
- -
- - - - - -
-
Returns:
- -
{Array} source
- -
- - - - -
- - -
- - {fabric.Color} - toBlackWhite(threshold) - -
-
- Transforms color to its black and white representation - - -
- - - - -
-
Parameters:
- -
- threshold - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Color} thisArg
- -
- - - - -
- - -
- - {fabric.Color} - toGrayscale() - -
-
- Transforms color to its grayscale representation - - -
- - - - - - - - -
-
Returns:
- -
{fabric.Color} thisArg
- -
- - - - -
- - -
- - {String} - toHex() - -
-
- Returns color represenation in HEX format - - -
- - - - - - - - -
-
Returns:
- -
{String} ex: FF5555
- -
- - - - -
- - -
- - {String} - toRgb() - -
-
- Returns color represenation in RGB format - - -
- - - - - - - - -
-
Returns:
- -
{String} ex: rgb(0-255,0-255,0-255)
- -
- - - - -
- - -
- - {String} - toRgba() - -
-
- Returns color represenation in RGBA format - - -
- - - - - - - - -
-
Returns:
- -
{String} ex: rgba(0-255,0-255,0-255,0-1)
- -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 21:41:42 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Element#cache.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Element#cache.html deleted file mode 100644 index bc9bbcb1..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Element#cache.html +++ /dev/null @@ -1,530 +0,0 @@ - - - - - - - JsDoc Reference - fabric.Element#cache - - - - - - - - - - - - - -
- -

- - Namespace fabric.Element#cache -

- - -

- - - - - - -
Defined in: element.class.js. - -

- - - - - - - - - - - - - - - - - -
Namespace Summary
Constructor AttributesConstructor Name and Description
  - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
<static>   -
fabric.Element#cache.get(url, callback) -
-
-
<static>   -
fabric.Element#cache.has(name, callback) -
-
-
<static>   -
fabric.Element#cache.set(url, object) -
-
-
- - - - - - - - - -
-
- Namespace Detail -
- -
- fabric.Element#cache -
- -
- - -
- - - - - - - - - - - - -
- - - - - - - -
- Method Detail -
- - -
<static> - - - fabric.Element#cache.get(url, callback) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {String} url - -
-
- -
- {Function} callback - -
-
- -
- - - - - - - - -
- - -
<static> - - - fabric.Element#cache.has(name, callback) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {String} name - -
-
- -
- {Function} callback - -
-
- -
- - - - - - - - -
- - -
<static> - - - fabric.Element#cache.set(url, object) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {String} url - -
-
- -
- {Object} object - -
-
- -
- - - - - - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 21:41:42 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Element.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Element.html deleted file mode 100644 index bd706aaa..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Element.html +++ /dev/null @@ -1,3711 +0,0 @@ - - - - - - - JsDoc Reference - fabric.Element - - - - - - - - - - - - - -
- -

- - Class fabric.Element -

- - -

- - - - fabric.Element - - -
Defined in: element.class.js. - -

- - - - - - - - - - - - - - - - - -
Class Summary
Constructor AttributesConstructor Name and Description
  -
- fabric.Element(el, options) -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Summary
Field AttributesField Name and Description
<static>   -
- fabric.Element.ATTRIBUTE_NAMES -
-
-
  - -
-
<constant>   - -
-
<constant>   - -
-
<static>   -
- fabric.Element.EMPTY_JSON -
-
-
  - -
-
  - -
-
  - -
-
  - -
-
  - -
-
  - -
-
  - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
  -
add() -
-
Adds objects to canvas, then renders canvas; -Objects should be instances of (or inherit from) fabric.Object
-
  -
bringForward(object) -
-
Moves an object one level up in stack of drawn objects
-
  -
bringToFront(object) -
-
Moves an object to the top of the stack of drawn objects
-
  - -
Calculates canvas element offset relative to the document -This method is also attached as "resize" event handler of window
-
  -
centerObjectH(object) -
-
Centers object horizontally.
-
  -
centerObjectV(object) -
-
Centers object vertically.
-
  -
clear() -
-
Clears all contexts (background, main, top) of an instance
-
  -
clearContext(context) -
-
Clears specified context of canvas element
-
  -
clone(callback) -
-
Clones canvas instance
-
  - -
Returns number representation of an instance complexity
-
  -
containsPoint(e, target) -
-
Applies one implementation of 'point inside polygon' algorithm
-
  - -
Deactivates all objects by calling their setActive(false)
-
  - -
Deactivates all objects and dispatches appropriate events
-
  -
dispose() -
-
Clears a canvas element and removes all event handlers.
-
  -
findTarget(e, skipGroup) -
-
Method that determines what object we are clicking on
-
  -
fxCenterObjectH(object, callbacks) -
-
Centers object horizontally with animation.
-
  -
fxCenterObjectV(object, callbacks) -
-
Centers object vertically with animation.
-
  -
fxRemove(object, callback) -
-
Same as `fabric.Element#remove` but animated
-
  - -
Same as `fabric.Element#straightenObject`, but animated
-
  - -
Returns currently active group
-
  - -
Returns currently active object
-
  - -
Returns coordinates of a center of canvas.
-
  - -
Returns topmost canvas context
-
  - -
Returns <canvas> element corresponding to this instance
-
  - -
Returns canvas height
-
  - -
Returns an array of objects this instance has
-
  - -
Returns pointer coordinates relative to canvas.
-
  - -
Returns canvas width
-
  -
insertAt(object, index) -
-
Inserts an object to canvas at specified index and renders canvas.
-
  -
isEmpty() -
-
Returns true if canvas contains no objects
-
  -
item(index) -
-
Returns object at specified index
-
  -
loadFromDatalessJSON(json, callback) -
-
Populates canvas with data from the specified dataless JSON -JSON format must conform to the one of `fabric.Element#toDatalessJSON`
-
  -
loadFromJSON(json, callback) -
-
Populates canvas with data from the specified JSON -JSON format must conform to the one of `fabric.Element#toJSON`
-
  -
loadImageFromURL(url, callback) -
-
Loads an image from URL
-
  -
loadSVGFromURL(url, callback) -
-
Takes url corresponding to an SVG document, and parses it to a set of objects
-
  - -
Callback; invoked right before object is about to be scaled/rotated
-
  -
onFpsUpdate(fps) -
-
Callback; invoked on every redraw of canvas and is being passed a number indicating current fps
-
  -
remove(object) -
-
Removes an object from canvas and returns it
-
  - -
Removes currently active group
-
  - -
Removes currently active object
-
  -
renderAll(allOnTop) -
-
Renders both the top canvas and the secondary container canvas.
-
  - -
Method to render only the top canvas.
-
  -
sendBackwards(object) -
-
Moves an object one level down in stack of drawn objects
-
  -
sendToBack(object) -
-
Moves an object to the bottom of the stack of drawn objects
-
  -
setActiveGroup(group) -
-
Sets active group to a speicified one
-
  -
setActiveObject(object) -
-
Sets given object as active
-
  -
setDimensions(dimensions) -
-
Sets dimensions (width, height) of this canvas instance
-
  -
setHeight(height) -
-
Sets height of this canvas instance
-
  -
setOverlayImage(url, callback) -
-
Sets overlay image for this canvas
-
  -
setWidth(width) -
-
Sets width of this canvas instance
-
  -
straightenObject(object) -
-
Straightens object, then rerenders canvas
-
<static>   -
fabric.Element.supports(methodName) -
-
Provides a way to check support of some of the canvas methods -(either those of HTMLCanvasElement itself, or rendering context)
-
  - -
Returs dataless JSON representation of canvas
-
  - -
Returns dataless object representation of canvas
-
  -
toDataURL(format) -
-
Exports canvas element to a dataurl image.
-
  -
toDataURLWithMultiplier(format, multiplier) -
-
Exports canvas element to a dataurl image (allowing to change image size via multiplier).
-
<static>   -
fabric.Element.toGrayscale(canvasEl) -
-
Takes <canvas> element and transforms its data in such way that it becomes grayscale
-
  -
toJSON() -
-
Returs JSON representation of canvas
-
  - -
Returns object representation of canvas
-
  - -
Returns a string representation of an instance
-
- - - - - - - - - -
-
- Class Detail -
- -
- fabric.Element(el, options) -
- -
- - -
- - - - - -
-
Parameters:
- -
- {HTMLElement | String} el - -
-
<canvas> element to initialize instance on
- -
- {Object} options - Optional -
-
Options object
- -
- - - - - - - - -
- - - - -
- Field Detail -
- - -
<static> - - - fabric.Element.ATTRIBUTE_NAMES - -
-
- - -
- Defined in: line.class.js. - - -
- - - - - - -
-
See:
- -
http://www.w3.org/TR/SVG/shapes.html#LineElement
- -
- - - -
- - -
- - {String} - backgroundColor - -
-
- - - -
- - - - - - - - -
- - -
<constant> - - {Number} - CANVAS_HEIGHT - -
-
- - - -
- - - - - - - - -
- - -
<constant> - - {Number} - CANVAS_WIDTH - -
-
- - - -
- - - - - - - - -
- - -
<static> - - {String} - fabric.Element.EMPTY_JSON - -
-
- - - -
- - - - - - - - -
- - -
- - {String} - freeDrawingColor - -
-
- - - -
- - - - - - - - -
- - -
- - {Number} - freeDrawingLineWidth - -
-
- - - -
- - - - - - - - -
- - -
- - {Boolean} - includeDefaultValues - -
-
- - - -
- - - - - - - - -
- - -
- - {String} - selectionBorderColor - -
-
- - - -
- - - - - - - - -
- - -
- - {String} - selectionColor - -
-
- - - -
- - - - - - - - -
- - -
- - {Number} - selectionLineWidth - -
-
- - - -
- - - - - - - - -
- - -
- - {Boolean} - shouldCacheImages - -
-
- - - -
- - - - - - - - - - - - - - -
- Method Detail -
- - -
- - {fabric.Element} - add() - -
-
- Adds objects to canvas, then renders canvas; -Objects should be instances of (or inherit from) fabric.Object - - -
- - - - - - - - -
-
Returns:
- -
{fabric.Element} thisArg
- -
- - - - -
- - -
- - {fabric.Element} - bringForward(object) - -
-
- Moves an object one level up in stack of drawn objects - - -
- - - - -
-
Parameters:
- -
- object - -
-
{fabric.Object} Object to send
- -
- - - - - -
-
Returns:
- -
{fabric.Element} thisArg
- -
- - - - -
- - -
- - {fabric.Element} - bringToFront(object) - -
-
- Moves an object to the top of the stack of drawn objects - - -
- - - - -
-
Parameters:
- -
- object - -
-
{fabric.Object} Object to send
- -
- - - - - -
-
Returns:
- -
{fabric.Element} thisArg
- -
- - - - -
- - -
- - {fabric.Element} - calcOffset() - -
-
- Calculates canvas element offset relative to the document -This method is also attached as "resize" event handler of window - - -
- - - - - - - - -
-
Returns:
- -
{fabric.Element} instance
- -
- - - - -
- - -
- - {fabric.Element} - centerObjectH(object) - -
-
- Centers object horizontally. - - -
- - - - -
-
Parameters:
- -
- {fabric.Object} object - -
-
Object to center
- -
- - - - - -
-
Returns:
- -
{fabric.Element} thisArg
- -
- - - - -
- - -
- - {fabric.Element} - centerObjectV(object) - -
-
- Centers object vertically. - - -
- - - - -
-
Parameters:
- -
- {fabric.Object} object - -
-
Object to center
- -
- - - - - -
-
Returns:
- -
{fabric.Element} thisArg
- -
- - - - -
- - -
- - {fabric.Element} - clear() - -
-
- Clears all contexts (background, main, top) of an instance - - -
- - - - - - - - -
-
Returns:
- -
{fabric.Element} thisArg
- -
- - - - -
- - -
- - {fabric.Element} - clearContext(context) - -
-
- Clears specified context of canvas element - - -
- - - - -
-
Parameters:
- -
- context - -
-
{Object} ctx context to clear
- -
- - - - - -
-
Returns:
- -
{fabric.Element} thisArg
- -
- - - - -
- - -
- - {fabric.Element} - clone(callback) - -
-
- Clones canvas instance - - -
- - - - -
-
Parameters:
- -
- {Object} callback - Optional -
-
Expects `onBeforeClone` and `onAfterClone` functions
- -
- - - - - -
-
Returns:
- -
{fabric.Element} Clone of this instance
- -
- - - - -
- - -
- - {Number} - complexity() - -
-
- Returns number representation of an instance complexity - - -
- - - - - - - - -
-
Returns:
- -
{Number} complexity
- -
- - - - -
- - -
- - {Boolean} - containsPoint(e, target) - -
-
- Applies one implementation of 'point inside polygon' algorithm - - -
- - - - -
-
Parameters:
- -
- e - -
-
{ Event } event object
- -
- target - -
-
{ fabric.Object } object to test against
- -
- - - - - -
-
Returns:
- -
{Boolean} true if point contains within area of given object
- -
- - - - -
- - -
- - {fabric.Element} - deactivateAll() - -
-
- Deactivates all objects by calling their setActive(false) - - -
- - - - - - - - -
-
Returns:
- -
{fabric.Element} thisArg
- -
- - - - -
- - -
- - {fabric.Element} - deactivateAllWithDispatch() - -
-
- Deactivates all objects and dispatches appropriate events - - -
- - - - - - - - -
-
Returns:
- -
{fabric.Element} thisArg
- -
- - - - -
- - -
- - {fabric.Element} - dispose() - -
-
- Clears a canvas element and removes all event handlers. - - -
- - - - - - - - -
-
Returns:
- -
{fabric.Element} thisArg
- -
- - - - -
- - -
- - - findTarget(e, skipGroup) - -
-
- Method that determines what object we are clicking on - - -
- - - - -
-
Parameters:
- -
- {Event} e - -
-
mouse event
- -
- {Boolean} skipGroup - -
-
when true, group is skipped and only objects are traversed through
- -
- - - - - - - - -
- - -
- - {fabric.Element} - fxCenterObjectH(object, callbacks) - -
-
- Centers object horizontally with animation. - - -
- - - - -
-
Parameters:
- -
- {fabric.Object} object - -
-
Object to center
- -
- {Object} callbacks - Optional -
-
Callbacks object with optional "onComplete" and/or "onChange" properties
- -
- - - - - -
-
Returns:
- -
{fabric.Element} thisArg
- -
- - - - -
- - -
- - {fabric.Element} - fxCenterObjectV(object, callbacks) - -
-
- Centers object vertically with animation. - - -
- - - - -
-
Parameters:
- -
- {fabric.Object} object - -
-
Object to center
- -
- {Object} callbacks - Optional -
-
Callbacks object with optional "onComplete" and/or "onChange" properties
- -
- - - - - -
-
Returns:
- -
{fabric.Element} thisArg
- -
- - - - -
- - -
- - {fabric.Element} - fxRemove(object, callback) - -
-
- Same as `fabric.Element#remove` but animated - - -
- - - - -
-
Parameters:
- -
- {fabric.Object} object - -
-
Object to remove
- -
- {Function} callback - -
-
Callback, invoked on effect completion
- -
- - - - - -
-
Returns:
- -
{fabric.Element} thisArg
- -
- - - - -
- - -
- - {fabric.Element} - fxStraightenObject(object) - -
-
- Same as `fabric.Element#straightenObject`, but animated - - -
- - - - -
-
Parameters:
- -
- {fabric.Object} object - -
-
Object to straighten
- -
- - - - - -
-
Returns:
- -
{fabric.Element} thisArg
- -
- - - - -
- - -
- - {fabric.Group} - getActiveGroup() - -
-
- Returns currently active group - - -
- - - - - - - - -
-
Returns:
- -
{fabric.Group} Current group
- -
- - - - -
- - -
- - {fabric.Object} - getActiveObject() - -
-
- Returns currently active object - - -
- - - - - - - - -
-
Returns:
- -
{fabric.Object} active object
- -
- - - - -
- - -
- - {Object} - getCenter() - -
-
- Returns coordinates of a center of canvas. -Returned value is an object with top and left properties - - -
- - - - - - - - -
-
Returns:
- -
{Object} object with "top" and "left" number values
- -
- - - - -
- - -
- - {CanvasRenderingContext2D} - getContext() - -
-
- Returns topmost canvas context - - -
- - - - - - - - -
-
Returns:
- -
{CanvasRenderingContext2D}
- -
- - - - -
- - -
- - {HTMLCanvasElement} - getElement() - -
-
- Returns <canvas> element corresponding to this instance - - -
- - - - - - - - -
-
Returns:
- -
{HTMLCanvasElement}
- -
- - - - -
- - -
- - {Number} - getHeight() - -
-
- Returns canvas height - - -
- - - - - - - - -
-
Returns:
- -
{Number}
- -
- - - - -
- - -
- - {Array} - getObjects() - -
-
- Returns an array of objects this instance has - - -
- - - - - - - - -
-
Returns:
- -
{Array}
- -
- - - - -
- - -
- - {Object} - getPointer(e) - -
-
- Returns pointer coordinates relative to canvas. - - -
- - - - -
-
Parameters:
- -
- e - -
-
- -
- - - - - -
-
Returns:
- -
{Object} object with "x" and "y" number values
- -
- - - - -
- - -
- - {Number} - getWidth() - -
-
- Returns canvas width - - -
- - - - - - - - -
-
Returns:
- -
{Number}
- -
- - - - -
- - -
- - {fabric.Element} - insertAt(object, index) - -
-
- Inserts an object to canvas at specified index and renders canvas. -An object should be an instance of (or inherit from) fabric.Object - - -
- - - - -
-
Parameters:
- -
- object - -
-
{Object} Object to insert
- -
- index - -
-
{Number} index to insert object at
- -
- - - - - -
-
Returns:
- -
{fabric.Element} instance
- -
- - - - -
- - -
- - {Boolean} - isEmpty() - -
-
- Returns true if canvas contains no objects - - -
- - - - - - - - -
-
Returns:
- -
{Boolean} true if canvas is empty
- -
- - - - -
- - -
- - {fabric.Object} - item(index) - -
-
- Returns object at specified index - - -
- - - - -
-
Parameters:
- -
- {Number} index - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Object}
- -
- - - - -
- - -
- - {fabric.Element} - loadFromDatalessJSON(json, callback) - -
-
- Populates canvas with data from the specified dataless JSON -JSON format must conform to the one of `fabric.Element#toDatalessJSON` - - -
- - - - -
-
Parameters:
- -
- {String} json - -
-
JSON string
- -
- {Function} callback - -
-
Callback, invoked when json is parsed - and corresponding objects (e.g: fabric.Image) - are initialized
- -
- - - - - -
-
Returns:
- -
{fabric.Element} instance
- -
- - - - -
- - -
- - {fabric.Element} - loadFromJSON(json, callback) - -
-
- Populates canvas with data from the specified JSON -JSON format must conform to the one of `fabric.Element#toJSON` - - -
- - - - -
-
Parameters:
- -
- {String} json - -
-
JSON string
- -
- {Function} callback - -
-
Callback, invoked when json is parsed - and corresponding objects (e.g: fabric.Image) - are initialized
- -
- - - - - -
-
Returns:
- -
{fabric.Element} instance
- -
- - - - -
- - -
- - - loadImageFromURL(url, callback) - -
-
- Loads an image from URL - - -
- - - - -
-
Parameters:
- -
- url - -
-
{String} url of image to load
- -
- callback - -
-
{Function} calback, invoked when image is loaded
- -
- - - - - - - - -
- - -
- - - loadSVGFromURL(url, callback) - -
-
- Takes url corresponding to an SVG document, and parses it to a set of objects - - -
- - - - -
-
Parameters:
- -
- {String} url - -
-
- -
- {Function} callback - -
-
- -
- - - - - - - - -
- - -
- - - onBeforeScaleRotate(target) - -
-
- Callback; invoked right before object is about to be scaled/rotated - - -
- - - - -
-
Parameters:
- -
- {fabric.Object} target - -
-
Object that's about to be scaled/rotated
- -
- - - - - - - - -
- - -
- - - onFpsUpdate(fps) - -
-
- Callback; invoked on every redraw of canvas and is being passed a number indicating current fps - - -
- - - - -
-
Parameters:
- -
- {Number} fps - -
-
- -
- - - - - - - - -
- - -
- - {Object} - remove(object) - -
-
- Removes an object from canvas and returns it - - -
- - - - -
-
Parameters:
- -
- object - -
-
{Object} Object to remove
- -
- - - - - -
-
Returns:
- -
{Object} removed object
- -
- - - - -
- - -
- - {fabric.Element} - removeActiveGroup() - -
-
- Removes currently active group - - -
- - - - - - - - -
-
Returns:
- -
{fabric.Element} thisArg
- -
- - - - -
- - -
- - {fabric.Element} - removeActiveObject() - -
-
- Removes currently active object - - -
- - - - - - - - -
-
Returns:
- -
{fabric.Element} thisArg
- -
- - - - -
- - -
- - {fabric.Element} - renderAll(allOnTop) - -
-
- Renders both the top canvas and the secondary container canvas. - - -
- - - - -
-
Parameters:
- -
- allOnTop - -
-
{Boolean} optional Whether we want to force all images to be rendered on the top canvas
- -
- - - - - -
-
Returns:
- -
{fabric.Element} instance
- -
- - - - -
- - -
- - {fabric.Element} - renderTop() - -
-
- Method to render only the top canvas. -Also used to render the group selection box. - - -
- - - - - - - - -
-
Returns:
- -
{fabric.Element} thisArg
- -
- - - - -
- - -
- - {fabric.Element} - sendBackwards(object) - -
-
- Moves an object one level down in stack of drawn objects - - -
- - - - -
-
Parameters:
- -
- object - -
-
{fabric.Object} Object to send
- -
- - - - - -
-
Returns:
- -
{fabric.Element} thisArg
- -
- - - - -
- - -
- - {fabric.Element} - sendToBack(object) - -
-
- Moves an object to the bottom of the stack of drawn objects - - -
- - - - -
-
Parameters:
- -
- object - -
-
{fabric.Object} Object to send to back
- -
- - - - - -
-
Returns:
- -
{fabric.Element} thisArg
- -
- - - - -
- - -
- - {fabric.Element} - setActiveGroup(group) - -
-
- Sets active group to a speicified one - - -
- - - - -
-
Parameters:
- -
- {fabric.Group} group - -
-
Group to set as a current one
- -
- - - - - -
-
Returns:
- -
{fabric.Element} thisArg
- -
- - - - -
- - -
- - {fabric.Element} - setActiveObject(object) - -
-
- Sets given object as active - - -
- - - - -
-
Parameters:
- -
- object - -
-
{fabric.Object} Object to set as an active one
- -
- - - - - -
-
Returns:
- -
{fabric.Element} thisArg
- -
- - - - -
- - -
- - {fabric.Element} - setDimensions(dimensions) - -
-
- Sets dimensions (width, height) of this canvas instance - - -
- - - - -
-
Parameters:
- -
- {Object} dimensions - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Element} thisArg
- -
- - - - -
- - -
- - {fabric.Element} - setHeight(height) - -
-
- Sets height of this canvas instance - - -
- - - - -
-
Parameters:
- -
- {Number} height - -
-
value to set height to
- -
- - - - - -
-
Returns:
- -
{fabric.Element} instance
- -
- - - - -
- - -
- - {fabric.Element} - setOverlayImage(url, callback) - -
-
- Sets overlay image for this canvas - - -
- - - - -
-
Parameters:
- -
- {String} url - -
-
url of an image to set background to
- -
- {Function} callback - -
-
callback to invoke when image is loaded and set as an overlay one
- -
- - - - - -
-
Returns:
- -
{fabric.Element} thisArg
- -
- - - - -
- - -
- - {fabric.Element} - setWidth(width) - -
-
- Sets width of this canvas instance - - -
- - - - -
-
Parameters:
- -
- {Number} width - -
-
value to set width to
- -
- - - - - -
-
Returns:
- -
{fabric.Element} instance
- -
- - - - -
- - -
- - {fabric.Element} - straightenObject(object) - -
-
- Straightens object, then rerenders canvas - - -
- - - - -
-
Parameters:
- -
- {fabric.Object} object - -
-
Object to straighten
- -
- - - - - -
-
Returns:
- -
{fabric.Element} thisArg
- -
- - - - -
- - -
<static> - - {Boolean | null} - fabric.Element.supports(methodName) - -
-
- Provides a way to check support of some of the canvas methods -(either those of HTMLCanvasElement itself, or rendering context) - - -
- - - - -
-
Parameters:
- -
- methodName - -
-
{String} Method to check support for; - Could be one of "getImageData" or "toDataURL"
- -
- - - - - -
-
Returns:
- -
{Boolean | null} `true` if method is supported (or at least exists), - `null` if canvas element or context can not be initialized
- -
- - - - -
- - -
- - {String} - toDatalessJSON() - -
-
- Returs dataless JSON representation of canvas - - -
- - - - - - - - -
-
Returns:
- -
{String} json string
- -
- - - - -
- - -
- - {Object} - toDatalessObject() - -
-
- Returns dataless object representation of canvas - - -
- - - - - - - - -
-
Returns:
- -
{Object}
- -
- - - - -
- - -
- - {String} - toDataURL(format) - -
-
- Exports canvas element to a dataurl image. - - -
- - - - -
-
Parameters:
- -
- {String} format - -
-
the format of the output image. Either "jpeg" or "png".
- -
- - - - - -
-
Returns:
- -
{String}
- -
- - - - -
- - -
- - {String} - toDataURLWithMultiplier(format, multiplier) - -
-
- Exports canvas element to a dataurl image (allowing to change image size via multiplier). - - -
- - - - -
-
Parameters:
- -
- {String} format - -
-
(png|jpeg)
- -
- {Number} multiplier - -
-
- -
- - - - - -
-
Returns:
- -
{String}
- -
- - - - -
- - -
<static> - - - fabric.Element.toGrayscale(canvasEl) - -
-
- Takes <canvas> element and transforms its data in such way that it becomes grayscale - - -
- - - - -
-
Parameters:
- -
- {HTMLCanvasElement} canvasEl - -
-
- -
- - - - - - - - -
- - -
- - {String} - toJSON() - -
-
- Returs JSON representation of canvas - - -
- - - - - - - - -
-
Returns:
- -
{String} json string
- -
- - - - -
- - -
- - {Object} - toObject() - -
-
- Returns object representation of canvas - - -
- - - - - - - - -
-
Returns:
- -
{Object}
- -
- - - - -
- - -
- - {String} - toString() - -
-
- Returns a string representation of an instance - - -
- - - - - - - - -
-
Returns:
- -
{String} string representation of an instance
- -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 21:41:42 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Ellipse.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Ellipse.html deleted file mode 100644 index 549375c5..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Ellipse.html +++ /dev/null @@ -1,732 +0,0 @@ - - - - - - - JsDoc Reference - fabric.Ellipse - - - - - - - - - - - - - -
- -

- - Class fabric.Ellipse -

- - -

- -
Extends - fabric.Object.
- - - Ellipse - - -
Defined in: ellipse.class.js. - -

- - - - - - - - - - - - - - - - - -
Class Summary
Constructor AttributesConstructor Name and Description
  - -
-
- - - - - - - - - - - - - - - - - - - - - - -
Field Summary
Field AttributesField Name and Description
  -
- type -
-
-
- - - -
-
Fields borrowed from class fabric.Object:
FX_DURATION, FX_TRANSITION, includeDefaultValues, MIN_SCALE_LIMIT, NUM_FRACTION_DIGITS, options, rotate, stateProperties
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
  - -
-
<static>   -
fabric.Ellipse.fromElement(element, options) -
-
Returns fabric.Ellipse instance from an SVG element
-
<static>   -
fabric.Ellipse.fromObject(object) -
-
Returns fabric.Ellipse instance from an object representation
-
  -
initialize(options) -
-
Constructor
-
  -
render(ctx, noTransform) -
-
-
  - -
Returns object representation of an instance
-
- - - -
-
Methods borrowed from class fabric.Object:
callSuper, clone, cloneAsImage, drawBorders, drawCorners, fxRemove, fxStraighten, get, getAngle, getCenter, getHeight, getWidth, hasStateChanged, intersectsWithObject, intersectsWithRect, isActive, isContainedWithinRect, isType, saveState, scale, scaleToHeight, scaleToWidth, set, setActive, setAngle, setCoords, setOpacity, setOptions, setSourcePath, straighten, toDatalessObject, toDataURL, toggle, toGrayscale, toJSON, toString, transform
-
- - - - - - - -
-
- Class Detail -
- -
- fabric.Ellipse() -
- -
- - -
- - - - - - - - - - - - -
- - - - -
- Field Detail -
- - -
- - - type - -
-
- - - -
- - - - - - - - - - - - - - -
- Method Detail -
- - -
- - {Number} - complexity() - -
-
- - - -
- - - - - - - - -
-
Returns:
- -
{Number} complexity
- -
- - - - -
- - -
<static> - - {fabric.Ellipse} - fabric.Ellipse.fromElement(element, options) - -
-
- Returns fabric.Ellipse instance from an SVG element - - -
- - - - -
-
Parameters:
- -
- {SVGElement} element - -
-
Element to parse
- -
- {Object} options - Optional -
-
Options object
- -
- - - - - -
-
Returns:
- -
{fabric.Ellipse}
- -
- - - - -
- - -
<static> - - {fabric.Ellipse} - fabric.Ellipse.fromObject(object) - -
-
- Returns fabric.Ellipse instance from an object representation - - -
- - - - -
-
Parameters:
- -
- {Object} object - -
-
Object to create an instance from
- -
- - - - - -
-
Returns:
- -
{fabric.Ellipse}
- -
- - - - -
- - -
- - {Object} - initialize(options) - -
-
- Constructor - - -
- - - - -
-
Parameters:
- -
- {Object} options - Optional -
-
Options object
- -
- - - - - -
-
Returns:
- -
{Object} thisArg
- -
- - - - -
- - -
- - - render(ctx, noTransform) - -
-
- - - -
- - - - -
-
Parameters:
- -
- ctx - -
-
{CanvasRenderingContext2D} context to render on
- -
- noTransform - -
-
{Boolean} context is not transformed when set to true
- -
- - - - - - - - -
- - -
- - {Object} - toObject() - -
-
- Returns object representation of an instance - - -
- - - - - - - - -
-
Returns:
- -
{Object} object representation of an instance
- -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 21:41:43 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Group#initialize.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Group#initialize.html deleted file mode 100644 index b4fc6552..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Group#initialize.html +++ /dev/null @@ -1,353 +0,0 @@ - - - - - - - JsDoc Reference - fabric.Group#initialize - - - - - - - - - - - - - -
- -

- - Class fabric.Group#initialize -

- - -

- - - - - - -
Defined in: group.class.js. - -

- - - - - - - - - - - - - - - - - -
Class Summary
Constructor AttributesConstructor Name and Description
  -
- fabric.Group#initialize(objects, options) -
-
-
- - - - - - - - - - - - -
-
- Class Detail -
- -
- fabric.Group#initialize(objects, options) -
- -
- - -
- - - - - -
-
Parameters:
- -
- {Object} objects - -
-
Group objects
- -
- options - -
-
- -
- - - - - -
-
Returns:
- -
{Object} thisArg
- -
- - - - -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 15:43:34 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Group.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Group.html deleted file mode 100644 index e6e6400d..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Group.html +++ /dev/null @@ -1,1474 +0,0 @@ - - - - - - - JsDoc Reference - fabric.Group - - - - - - - - - - - - - -
- -

- - Class fabric.Group -

- - -

- -
Extends - fabric.Object.
- - - Group - - -
Defined in: group.class.js. - -

- - - - - - - - - - - - - - - - - -
Class Summary
Constructor AttributesConstructor Name and Description
  -
- fabric.Group() -
-
-
- - - - - - - - - - - - - - - - - - - - - - -
Field Summary
Field AttributesField Name and Description
  -
- type -
-
-
- - - -
-
Fields borrowed from class fabric.Object:
FX_DURATION, FX_TRANSITION, includeDefaultValues, MIN_SCALE_LIMIT, NUM_FRACTION_DIGITS, options, rotate, stateProperties
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
  - -
Activates (makes active) all group objects
-
  -
add(object) -
-
Adds an object to a group; Then recalculates group's dimension, position.
-
  - -
Returns complexity of an instance
-
  -
contains(object) -
-
Returns true if a group contains an object
-
  -
containsPoint(point) -
-
-
  -
destroy() -
-
Destroys a group (restoring state of its objects)
-
  -
forEachObject(callback, context) -
-
-
<static>   -
fabric.Group.fromObject(object, options) -
-
-
  - -
Returns an array of all objects in this group
-
  - -
-
  -
initialize(objects, options) -
-
Constructor
-
  -
item(index) -
-
Returns object from the group at the specified index
-
  -
remove(object) -
-
Removes an object from a group; Then recalculates group's dimension, position.
-
  -
render(ctx) -
-
Renders instance on a given context
-
  - -
-
  -
set(name, value) -
-
Sets property to a given value
-
  -
setActive(value) -
-
Activates (makes active) all group objects
-
  - -
Sets coordinates of all group objects
-
  -
size() -
-
Returns a size of a group (i.e: length of an array containing its objects)
-
  - -
-
  - -
Returns object representation of an instance
-
  - -
Returns string represenation of a group
-
- - - -
-
Methods borrowed from class fabric.Object:
callSuper, clone, cloneAsImage, drawBorders, drawCorners, fxRemove, fxStraighten, get, getAngle, getCenter, getHeight, getWidth, hasStateChanged, intersectsWithObject, intersectsWithRect, isActive, isContainedWithinRect, isType, saveState, scale, scaleToHeight, scaleToWidth, setAngle, setCoords, setOpacity, setOptions, setSourcePath, straighten, toDatalessObject, toDataURL, toggle, toJSON, transform
-
- - - - - - - -
-
- Class Detail -
- -
- fabric.Group() -
- -
- - -
- - - - - - - - - - - - -
- - - - -
- Field Detail -
- - -
- - {String} - type - -
-
- - - -
- - - - - - - - - - - - - - -
- Method Detail -
- - -
- - {fabric.Group} - activateAllObjects() - -
-
- Activates (makes active) all group objects - - -
- - - - - - - - -
-
Returns:
- -
{fabric.Group} thisArg
- -
- - - - -
- - -
- - {fabric.Group} - add(object) - -
-
- Adds an object to a group; Then recalculates group's dimension, position. - - -
- - - - -
-
Parameters:
- -
- {Object} object - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Group} thisArg
- -
- - - - -
- - -
- - {Number} - complexity() - -
-
- Returns complexity of an instance - - -
- - - - - - - - -
-
Returns:
- -
{Number} complexity
- -
- - - - -
- - -
- - {Boolean} - contains(object) - -
-
- Returns true if a group contains an object - - -
- - - - -
-
Parameters:
- -
- {Object} object - -
-
Object to check against
- -
- - - - - -
-
Returns:
- -
{Boolean} `true` if group contains an object
- -
- - - - -
- - -
- - {Boolean} - containsPoint(point) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {Object} point - -
-
point with `x` and `y` properties
- -
- - - - - -
-
Returns:
- -
{Boolean} true if point is contained within group
- -
- - - - -
- - -
- - {fabric.Group} - destroy() - -
-
- Destroys a group (restoring state of its objects) - - -
- - - - - - - - -
-
Returns:
- -
{fabric.Group} thisArg
- -
- - - - -
- - -
- - {fabric.Group} - forEachObject(callback, context) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {Function} callback - -
-
Callback invoked with current object as first argument, - index - as second and an array of all objects - as third. - Iteration happens in reverse order (for performance reasons). - Callback is invoked in a context of Global Object (e.g. `window`) - when no `context` argument is given
- -
- {Object} context - -
-
Context (aka thisObject)
- -
- - - - - -
-
Returns:
- -
{fabric.Group} thisArg
- -
- - - - -
- - -
<static> - - {fabric.Group} - fabric.Group.fromObject(object, options) - -
-
- - - -
- - - - -
-
Parameters:
- -
- object - -
-
{Object} object to create a group from
- -
- options - -
-
{Object} options object
- -
- - - - - -
-
Returns:
- -
{fabric.Group} an instance of fabric.Group
- -
- - - - -
- - -
- - {Array} - getObjects() - -
-
- Returns an array of all objects in this group - - -
- - - - - - - - -
-
Returns:
- -
{Array} group objects
- -
- - - - -
- - -
- - {Boolean} - hasMoved() - -
-
- - - -
- - - - - - - - -
-
Returns:
- -
{Boolean} true if an object was moved (since fabric.Group#saveCoords was called)
- -
- - - - -
- - -
- - {Object} - initialize(objects, options) - -
-
- Constructor - - -
- - - - -
-
Parameters:
- -
- {Object} objects - -
-
Group objects
- -
- {Object} options - Optional -
-
Options object
- -
- - - - - -
-
Returns:
- -
{Object} thisArg
- -
- - - - -
- - -
- - {fabric.Object} - item(index) - -
-
- Returns object from the group at the specified index - - -
- - - - -
-
Parameters:
- -
- index - -
-
{Number} index of item to get
- -
- - - - - -
-
Returns:
- -
{fabric.Object}
- -
- - - - -
- - -
- - {fabric.Group} - remove(object) - -
-
- Removes an object from a group; Then recalculates group's dimension, position. - - -
- - - - -
-
Parameters:
- -
- {Object} object - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Group} thisArg
- -
- - - - -
- - -
- - - render(ctx) - -
-
- Renders instance on a given context - - -
- - - - -
-
Parameters:
- -
- {CanvasRenderingContext2D} ctx - -
-
context to render instance on
- -
- - - - - - - - -
- - -
- - {fabric.Group} - saveCoords() - -
-
- - - -
- - - - - - - - -
-
Returns:
- -
{fabric.Group} thisArg
- -
- - - - -
- - -
- - {fabric.Group} - set(name, value) - -
-
- Sets property to a given value - - -
- - - - -
-
Parameters:
- -
- {String} name - -
-
- -
- {Object|Function} value - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Group} thisArg
- -
- - - - -
- - -
- - {fabric.Group} - setActive(value) - -
-
- Activates (makes active) all group objects - - -
- - - - -
-
Parameters:
- -
- {Boolean} value - -
-
`true` to activate object, `false` otherwise
- -
- - - - - -
-
Returns:
- -
{fabric.Group} thisArg
- -
- - - - -
- - -
- - {fabric.Group} - setObjectsCoords() - -
-
- Sets coordinates of all group objects - - -
- - - - - - - - -
-
Returns:
- -
{fabric.Group} thisArg
- -
- - - - -
- - -
- - {Number} - size() - -
-
- Returns a size of a group (i.e: length of an array containing its objects) - - -
- - - - - - - - -
-
Returns:
- -
{Number} Group size
- -
- - - - -
- - -
- - - toGrayscale() - -
-
- - - -
- - - - - - - - - - - -
- - -
- - {Object} - toObject() - -
-
- Returns object representation of an instance - - -
- - - - - - - - -
-
Returns:
- -
{Object} object representation of an instance
- -
- - - - -
- - -
- - {String} - toString() - -
-
- Returns string represenation of a group - - -
- - - - - - - - -
-
Returns:
- -
{String}
- -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 21:41:43 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Image#initialize.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Image#initialize.html deleted file mode 100644 index 2d6320b9..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Image#initialize.html +++ /dev/null @@ -1,348 +0,0 @@ - - - - - - - JsDoc Reference - fabric.Image#initialize - - - - - - - - - - - - - -
- -

- - Class fabric.Image#initialize -

- - -

- - - - - - -
Defined in: image.class.js. - -

- - - - - - - - - - - - - - - - - -
Class Summary
Constructor AttributesConstructor Name and Description
  -
- fabric.Image#initialize(element, options) -
-
-
- - - - - - - - - - - - -
-
- Class Detail -
- -
- fabric.Image#initialize(element, options) -
- -
- - -
- - - - - -
-
Parameters:
- -
- {HTMLImageElement | String} element - -
-
Image element
- -
- {Object} options - -
-
optional
- -
- - - - - - - - -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 15:53:46 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Image.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Image.html deleted file mode 100644 index dfe14dfa..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Image.html +++ /dev/null @@ -1,1376 +0,0 @@ - - - - - - - JsDoc Reference - fabric.Image - - - - - - - - - - - - - -
- -

- - Class fabric.Image -

- - -

- -
Extends - fabric.Object.
- - - Image - - -
Defined in: image.class.js. - -

- - - - - - - - - - - - - - - - - -
Class Summary
Constructor AttributesConstructor Name and Description
  -
- fabric.Image() -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Summary
Field AttributesField Name and Description
  -
- active -
-
-
  - -
-
  - -
-
<static>   -
- fabric.Image.CSS_CANVAS -
-
Default CSS class name for canvas
-
  -
- maxheight -
-
-
  -
- maxwidth -
-
-
  -
- type -
-
-
- - - -
-
Fields borrowed from class fabric.Object:
FX_DURATION, FX_TRANSITION, includeDefaultValues, MIN_SCALE_LIMIT, NUM_FRACTION_DIGITS, options, rotate, stateProperties
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
  -
clone(callback) -
-
Returns a clone of an instance
-
  - -
Returns complexity of an instance
-
<static>   -
fabric.Image.fromObject(object, callback) -
-
Creates an instance of fabric.Image from its object representation
-
<static>   -
fabric.Image.fromURL(url, callback, imgOptions) -
-
Creates an instance of fabric.Image from an URL string
-
  - -
Returns image element which this instance if based on
-
  -
getNormalizedSize(oImg, maxwidth, maxheight) -
-
Resizes an image depending on whether maxwidth and maxheight are set up; -Width and height have to mantain the same proportion in the final image as it was in the initial one.
-
  - -
Returns original size of an image
-
  -
getSrc() -
-
Returns source of an image
-
  -
initialize(element, options) -
-
Constructor
-
  -
render(ctx, noTransform) -
-
Renders image on a specified context
-
  - -
Sets border visibility
-
  - -
Sets corner visibility
-
  -
setElement(element) -
-
Sets image element for this instance to a specified one
-
  -
toGrayscale(callback) -
-
Makes image grayscale
-
  - -
Returns object representation of an instance
-
  - -
Returns string representation of an instance
-
- - - -
-
Methods borrowed from class fabric.Object:
callSuper, cloneAsImage, drawBorders, drawCorners, fxRemove, fxStraighten, get, getAngle, getCenter, getHeight, getWidth, hasStateChanged, intersectsWithObject, intersectsWithRect, isActive, isContainedWithinRect, isType, saveState, scale, scaleToHeight, scaleToWidth, set, setActive, setAngle, setCoords, setOpacity, setOptions, setSourcePath, straighten, toDatalessObject, toDataURL, toggle, toJSON, transform
-
- - - - - - - -
-
- Class Detail -
- -
- fabric.Image() -
- -
- - -
- - - - - - - - - - - - -
- - - - -
- Field Detail -
- - -
- - {Boolean} - active - -
-
- - - -
- - - - - - - - -
- - -
- - {Boolean} - bordervisibility - -
-
- - - -
- - - - - - - - -
- - -
- - {Boolean} - cornervisibility - -
-
- - - -
- - - - - - - - -
- - -
<static> - - {String} - fabric.Image.CSS_CANVAS - -
-
- Default CSS class name for canvas - - -
- - - - - - - - -
- - -
- - {Number} - maxheight - -
-
- - - -
- - - - - - - - -
- - -
- - {Number} - maxwidth - -
-
- - - -
- - - - - - - - -
- - -
- - {String} - type - -
-
- - - -
- - - - - - - - - - - - - - -
- Method Detail -
- - -
- - - clone(callback) - -
-
- Returns a clone of an instance - - -
- - - - -
-
Parameters:
- -
- {Function} callback - -
-
Callback is invoked with a clone as a first argument
- -
- - - - - - - - -
- - -
- - {Number} - complexity() - -
-
- Returns complexity of an instance - - -
- - - - - - - - -
-
Returns:
- -
{Number} complexity
- -
- - - - -
- - -
<static> - - - fabric.Image.fromObject(object, callback) - -
-
- Creates an instance of fabric.Image from its object representation - - -
- - - - -
-
Parameters:
- -
- object - -
-
{Object}
- -
- callback - -
-
{Function} optional
- -
- - - - - - - - -
- - -
<static> - - - fabric.Image.fromURL(url, callback, imgOptions) - -
-
- Creates an instance of fabric.Image from an URL string - - -
- - - - -
-
Parameters:
- -
- {String} url - -
-
URL to create an image from
- -
- {Function} callback - Optional -
-
Callback to invoke when image is created (newly created image is passed as a first argument)
- -
- {Object} imgOptions - Optional -
-
Options object
- -
- - - - - - - - -
- - -
- - {HTMLImageElement} - getElement() - -
-
- Returns image element which this instance if based on - - -
- - - - - - - - -
-
Returns:
- -
{HTMLImageElement} image element
- -
- - - - -
- - -
- - - getNormalizedSize(oImg, maxwidth, maxheight) - -
-
- Resizes an image depending on whether maxwidth and maxheight are set up; -Width and height have to mantain the same proportion in the final image as it was in the initial one. - - -
- - - - -
-
Parameters:
- -
- {Object} oImg - -
-
- -
- {Number} maxwidth - -
-
maximum width of the image (in px)
- -
- {Number} maxheight - -
-
maximum height of the image (in px)
- -
- - - - - - - - -
- - -
- - {Object} - getOriginalSize() - -
-
- Returns original size of an image - - -
- - - - - - - - -
-
Returns:
- -
{Object} object with "width" and "height" properties
- -
- - - - -
- - -
- - {String} - getSrc() - -
-
- Returns source of an image - - -
- - - - - - - - -
-
Returns:
- -
{String} Source of an image
- -
- - - - -
- - -
- - - initialize(element, options) - -
-
- Constructor - - -
- - - - -
-
Parameters:
- -
- {HTMLImageElement | String} element - -
-
Image element
- -
- {Object} options - -
-
optional
- -
- - - - - - - - -
- - -
- - - render(ctx, noTransform) - -
-
- Renders image on a specified context - - -
- - - - -
-
Parameters:
- -
- {CanvasRenderingContext2D} ctx - -
-
Context to render on
- -
- noTransform - -
-
- -
- - - - - - - - -
- - -
- - - setBorderVisibility(visible) - -
-
- Sets border visibility - - -
- - - - -
-
Parameters:
- -
- {Boolean} visible - -
-
When true, border is set to be visible
- -
- - - - - - - - -
- - -
- - - setCornersVisibility(visible) - -
-
- Sets corner visibility - - -
- - - - -
-
Parameters:
- -
- {Boolean} visible - -
-
When true, corners are set to be visible
- -
- - - - - - - - -
- - -
- - {fabric.Image} - setElement(element) - -
-
- Sets image element for this instance to a specified one - - -
- - - - -
-
Parameters:
- -
- {HTMLImageElement} element - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Image} thisArg
- -
- - - - -
- - -
- - - toGrayscale(callback) - -
-
- Makes image grayscale - - -
- - - - -
-
Parameters:
- -
- {Function} callback - -
-
- -
- - - - - - - - -
- - -
- - {Object} - toObject() - -
-
- Returns object representation of an instance - - -
- - - - - - - - -
-
Returns:
- -
{Object} Object representation of an instance
- -
- - - - -
- - -
- - {String} - toString() - -
-
- Returns string representation of an instance - - -
- - - - - - - - -
-
Returns:
- -
{String} String representation of an instance
- -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 21:41:43 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Intersection.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Intersection.html deleted file mode 100644 index f588e566..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Intersection.html +++ /dev/null @@ -1,746 +0,0 @@ - - - - - - - JsDoc Reference - fabric.Intersection - - - - - - - - - - - - - -
- -

- - Class fabric.Intersection -

- - -

- - - - Intersection - - -
Defined in: intersection.class.js. - -

- - - - - - - - - - - - - - - - - -
Class Summary
Constructor AttributesConstructor Name and Description
  -
- fabric.Intersection(status) -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
  -
appendPoint(status) -
-
-
  -
appendPoints(status) -
-
-
  -
init(status) -
-
-
<static>   -
fabric.Intersection.intersectLineLine(a1, a2, b1, b2) -
-
-
<static>   -
fabric.Intersection.intersectLinePolygon(a1, a2, points) -
-
-
<static>   -
fabric.Intersection.intersectPolygonPolygon(points1, points2) -
-
-
<static>   -
fabric.Intersection.intersectPolygonRectangle(points, r1, r2) -
-
-
- - - - - - - - - -
-
- Class Detail -
- -
- fabric.Intersection(status) -
- -
- - -
- - - - - -
-
Parameters:
- -
- status - -
-
- -
- - - - - - - - -
- - - - - - - -
- Method Detail -
- - -
- - - appendPoint(status) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {String} status - -
-
- -
- - - - - - - - -
- - -
- - - appendPoints(status) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {String} status - -
-
- -
- - - - - - - - -
- - -
- - - init(status) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {String} status - -
-
- -
- - - - - - - - -
- - -
<static> - - - fabric.Intersection.intersectLineLine(a1, a2, b1, b2) - -
-
- - - -
- - - - -
-
Parameters:
- -
- a1 - -
-
- -
- a2 - -
-
- -
- b1 - -
-
- -
- b2 - -
-
- -
- - - - - - - - -
- - -
<static> - - - fabric.Intersection.intersectLinePolygon(a1, a2, points) - -
-
- - - -
- - - - -
-
Parameters:
- -
- a1 - -
-
- -
- a2 - -
-
- -
- points - -
-
- -
- - - - - - - - -
- - -
<static> - - - fabric.Intersection.intersectPolygonPolygon(points1, points2) - -
-
- - - -
- - - - -
-
Parameters:
- -
- points1 - -
-
- -
- points2 - -
-
- -
- - - - - - - - -
- - -
<static> - - - fabric.Intersection.intersectPolygonRectangle(points, r1, r2) - -
-
- - - -
- - - - -
-
Parameters:
- -
- points - -
-
- -
- r1 - -
-
- -
- r2 - -
-
- -
- - - - - - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 21:41:43 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Line.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Line.html deleted file mode 100644 index 48a14c54..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Line.html +++ /dev/null @@ -1,687 +0,0 @@ - - - - - - - JsDoc Reference - fabric.Line - - - - - - - - - - - - - -
- -

- - Class fabric.Line -

- - -

- -
Extends - fabric.Object.
- - - Line - - -
Defined in: line.class.js. - -

- - - - - - - - - - - - - - - - - -
Class Summary
Constructor AttributesConstructor Name and Description
  -
- fabric.Line() -
-
-
- - - - - - - - - - - - - - - - - - - - - - -
Field Summary
Field AttributesField Name and Description
  -
- type -
-
-
- - - -
-
Fields borrowed from class fabric.Object:
FX_DURATION, FX_TRANSITION, includeDefaultValues, MIN_SCALE_LIMIT, NUM_FRACTION_DIGITS, options, rotate, stateProperties
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
  - -
-
<static>   -
fabric.Line.fromElement(element, options) -
-
-
<static>   -
fabric.Line.fromObject(object) -
-
-
  -
initialize(points, options) -
-
Constructor
-
  - -
Returns object representation of an instance
-
- - - -
-
Methods borrowed from class fabric.Object:
callSuper, clone, cloneAsImage, drawBorders, drawCorners, fxRemove, fxStraighten, get, getAngle, getCenter, getHeight, getWidth, hasStateChanged, intersectsWithObject, intersectsWithRect, isActive, isContainedWithinRect, isType, render, saveState, scale, scaleToHeight, scaleToWidth, set, setActive, setAngle, setCoords, setOpacity, setOptions, setSourcePath, straighten, toDatalessObject, toDataURL, toggle, toGrayscale, toJSON, toString, transform
-
- - - - - - - -
-
- Class Detail -
- -
- fabric.Line() -
- -
- - -
- - - - - - - - - - - - -
- - - - -
- Field Detail -
- - -
- - {String} - type - -
-
- - - -
- - - - - - - - - - - - - - -
- Method Detail -
- - -
- - {Number} - complexity() - -
-
- - - -
- - - - - - - - -
-
Returns:
- -
{Number} complexity
- -
- - - - -
- - -
<static> - - {fabric.Line} - fabric.Line.fromElement(element, options) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {SVGElement} element - -
-
Element to parse
- -
- {Object} options - Optional -
-
Options object
- -
- - - - - -
-
Returns:
- -
{fabric.Line} instance of fabric.Line
- -
- - - - -
- - -
<static> - - {fabric.Line} - fabric.Line.fromObject(object) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {Object} object - -
-
Object to create an instance from
- -
- - - - - -
-
Returns:
- -
{fabric.Line} instance of fabric.Line
- -
- - - - -
- - -
- - {fabric.Line} - initialize(points, options) - -
-
- Constructor - - -
- - - - -
-
Parameters:
- -
- {Array} points - -
-
Array of points
- -
- {Object} options - Optional -
-
Options object
- -
- - - - - -
-
Returns:
- -
{fabric.Line} thisArg
- -
- - - - -
- - -
- - {Object} - toObject() - -
-
- Returns object representation of an instance - - -
- - - - - - - - -
-
Returns:
- -
{Object}
- -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 21:41:43 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Object.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Object.html deleted file mode 100644 index df5bdfcc..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Object.html +++ /dev/null @@ -1,2619 +0,0 @@ - - - - - - - JsDoc Reference - fabric.Object - - - - - - - - - - - - - -
- -

- - Class fabric.Object -

- - -

- - - - Object - - -
Defined in: object.class.js. - -

- - - - - - - - - - - - - - - - - -
Class Summary
Constructor AttributesConstructor Name and Description
  - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Summary
Field AttributesField Name and Description
<constant>   - -
-
<constant>   - -
-
  - -
-
<constant>   - -
-
<constant>   - -
-
  -
- options -
-
-
  -
- rotate -
-
-
  - -
-
  -
- type -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
  -
callSuper(methodName) -
-
-
  -
clone(options) -
-
Clones an instance
-
  -
cloneAsImage(callback) -
-
Creates an instance of fabric.Image out of an object
-
  - -
-
  -
drawBorders(ctx) -
-
Draws borders of an object's bounding box.
-
  -
drawCorners(ctx) -
-
Draws corners of an object's bounding box.
-
  -
fxRemove(callbacks) -
-
-
  -
fxStraighten(callbacks) -
-
-
  -
get(property) -
-
Basic getter
-
  - -
Returns object's angle value
-
  - -
-
  - -
Returns height of an object
-
  - -
Returns width of an object
-
  - -
-
  -
initialize(options) -
-
Constructor
-
  - -
Returns true if object intersects with another object
-
  -
intersectsWithRect(selectionTL, selectionBR) -
-
Returns true if object intersects with an area formed by 2 points
-
  - -
Returns true if an object is in its active state
-
  -
isContainedWithinRect(selectionTL, selectionBR) -
-
Returns true if object is fully contained within area formed by 2 points
-
  -
isType(type) -
-
-
  -
render(ctx, noTransform) -
-
-
  - -
-
  -
scale(value) -
-
Scales an object (equally by x and y)
-
  -
scaleToHeight(value) -
-
Scales an object to a given height (scaling by x/y equally)
-
  -
scaleToWidth(value) -
-
Scales an object to a given width (scaling by x/y equally)
-
  -
set(property, value) -
-
Basic setter
-
  -
setActive(active) -
-
Sets state of an object - `true` makes it active, `false` - inactive
-
  -
setAngle(value) -
-
Sets object's angle
-
  - -
Sets corner position coordinates based on current angle, width and height.
-
  -
setOpacity(value) -
-
Sets object opacity
-
  -
setOptions(options) -
-
-
  -
setSourcePath(value) -
-
-
  - -
-
  - -
-
  - -
Converts an object into a data-url-like string
-
  -
toggle(property) -
-
Toggles specified property from `true` to `false` or from `false` to `true`
-
  - -
Makes object's color grayscale
-
  -
toJSON() -
-
Returns a JSON representation of an instance
-
  - -
Returns an object representation of an instance
-
  - -
Returns a string representation of an instance
-
  -
transform(ctx) -
-
-
- - - - - - - - - -
-
- Class Detail -
- -
- fabric.Object() -
- -
- - -
- - - - - - - - - - - - -
- - - - -
- Field Detail -
- - -
<constant> - - {Number} - FX_DURATION - -
-
- - - -
- - - - - - - - -
- - -
<constant> - - {String} - FX_TRANSITION - -
-
- - - -
- - - - - - - - -
- - -
- - {Boolean} - includeDefaultValues - -
-
- - - -
- - - - - - - - -
- - -
<constant> - - {Number} - MIN_SCALE_LIMIT - -
-
- - - -
- - - - - - - - -
- - -
<constant> - - {Number} - NUM_FRACTION_DIGITS - -
-
- - - -
- - - - - - - - -
- - -
- - {Object} - options - -
-
- - - -
- - - - - - - - -
- - -
- - - rotate - -
-
- - - -
- - - - - - - - -
- - -
- - {Array} - stateProperties - -
-
- - - -
- - - - - - - - -
- - -
- - {String} - type - -
-
- - - -
- - - - - - - - - - - - - - -
- Method Detail -
- - -
- - - callSuper(methodName) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {String} methodName - -
-
- -
- - - - - - - - -
- - -
- - {fabric.Object} - clone(options) - -
-
- Clones an instance - - -
- - - - -
-
Parameters:
- -
- {Object} options - -
-
object
- -
- - - - - -
-
Returns:
- -
{fabric.Object} clone of an instance
- -
- - - - -
- - -
- - {fabric.Object} - cloneAsImage(callback) - -
-
- Creates an instance of fabric.Image out of an object - - -
- - - - -
-
Parameters:
- -
- callback - -
-
{Function} callback, invoked with an instance as a first argument
- -
- - - - - -
-
Returns:
- -
{fabric.Object} thisArg
- -
- - - - -
- - -
- - {Number} - complexity() - -
-
- - - -
- - - - - - - - -
-
Returns:
- -
{Number}
- -
- - - - -
- - -
- - {fabric.Object} - drawBorders(ctx) - -
-
- Draws borders of an object's bounding box. -Requires public properties: width, height -Requires public options: padding, borderColor - - -
- - - - -
-
Parameters:
- -
- {CanvasRenderingContext2D} ctx - -
-
Context to draw on
- -
- - - - - -
-
Returns:
- -
{fabric.Object} thisArg
- -
- - - - -
- - -
- - {fabric.Object} - drawCorners(ctx) - -
-
- Draws corners of an object's bounding box. -Requires public properties: width, height, scaleX, scaleY -Requires public options: cornersize, padding - - -
- - - - -
-
Parameters:
- -
- {CanvasRenderingContext2D} ctx - -
-
Context to draw on
- -
- - - - - -
-
Returns:
- -
{fabric.Object} thisArg
- -
- - - - -
- - -
- - {fabric.Object} - fxRemove(callbacks) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {Object} callbacks - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Object} thisArg
- -
- - - - -
- - -
- - {fabric.Object} - fxStraighten(callbacks) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {Object} callbacks - -
-
- onComplete: invoked on completion - - onChange: invoked on every step of animation
- -
- - - - - -
-
Returns:
- -
{fabric.Object} thisArg
- -
- - - - -
- - -
- - {Any} - get(property) - -
-
- Basic getter - - -
- - - - -
-
Parameters:
- -
- {Any} property - -
-
- -
- - - - - -
-
Returns:
- -
{Any} value of a property
- -
- - - - -
- - -
- - {Number} - getAngle() - -
-
- Returns object's angle value - - -
- - - - - - - - -
-
Returns:
- -
{Number} angle value
- -
- - - - -
- - -
- - {Object} - getCenter() - -
-
- - - -
- - - - - - - - -
-
Returns:
- -
{Object} object with `x`, `y` properties corresponding to path center coordinates
- -
- - - - -
- - -
- - {Number} - getHeight() - -
-
- Returns height of an object - - -
- - - - - - - - -
-
Returns:
- -
{Number} height value
- -
- - - - -
- - -
- - {Number} - getWidth() - -
-
- Returns width of an object - - -
- - - - - - - - -
-
Returns:
- -
{Number} width value
- -
- - - - -
- - -
- - {Boolean} - hasStateChanged() - -
-
- - - -
- - - - - - - - -
-
Returns:
- -
{Boolean} true if instance' state has changed
- -
- - - - -
- - -
- - - initialize(options) - -
-
- Constructor - - -
- - - - -
-
Parameters:
- -
- {Object} options - Optional -
-
Options object
- -
- - - - - - - - -
- - -
- - {Boolean} - intersectsWithObject(other) - -
-
- Returns true if object intersects with another object - - -
- - - - -
-
Parameters:
- -
- {Object} other - -
-
Object to test
- -
- - - - - -
-
Returns:
- -
{Boolean}
- -
- - - - -
- - -
- - {Boolean} - intersectsWithRect(selectionTL, selectionBR) - -
-
- Returns true if object intersects with an area formed by 2 points - - -
- - - - -
-
Parameters:
- -
- {Object} selectionTL - -
-
- -
- {Object} selectionBR - -
-
- -
- - - - - -
-
Returns:
- -
{Boolean}
- -
- - - - -
- - -
- - {Boolean} - isActive() - -
-
- Returns true if an object is in its active state - - -
- - - - - - - - -
-
Returns:
- -
{Boolean} true if an object is in its active state
- -
- - - - -
- - -
- - {Boolean} - isContainedWithinRect(selectionTL, selectionBR) - -
-
- Returns true if object is fully contained within area formed by 2 points - - -
- - - - -
-
Parameters:
- -
- {Object} selectionTL - -
-
- -
- {Object} selectionBR - -
-
- -
- - - - - -
-
Returns:
- -
{Boolean}
- -
- - - - -
- - -
- - {Boolean} - isType(type) - -
-
- - - -
- - - - -
-
Parameters:
- -
- type - -
-
{String} type to check against
- -
- - - - - -
-
Returns:
- -
{Boolean} true if specified type is identical to the type of instance
- -
- - - - -
- - -
- - - render(ctx, noTransform) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {CanvasRenderingContext2D} ctx - -
-
context to render on
- -
- {Boolean} noTransform - -
-
- -
- - - - - - - - -
- - -
- - {fabric.Object} - saveState() - -
-
- - - -
- - - - - - - - -
-
Returns:
- -
{fabric.Object} thisArg
- -
- - - - -
- - -
- - {fabric.Object} - scale(value) - -
-
- Scales an object (equally by x and y) - - -
- - - - -
-
Parameters:
- -
- value - -
-
{Number} scale factor
- -
- - - - - -
-
Returns:
- -
{fabric.Object} thisArg
- -
- - - - -
- - -
- - {fabric.Object} - scaleToHeight(value) - -
-
- Scales an object to a given height (scaling by x/y equally) - - -
- - - - -
-
Parameters:
- -
- value - -
-
{Number} new height value
- -
- - - - - -
-
Returns:
- -
{fabric.Object} thisArg
- -
- - - - -
- - -
- - {fabric.Object} - scaleToWidth(value) - -
-
- Scales an object to a given width (scaling by x/y equally) - - -
- - - - -
-
Parameters:
- -
- value - -
-
{Number} new width value
- -
- - - - - -
-
Returns:
- -
{fabric.Object} thisArg
- -
- - - - -
- - -
- - {fabric.Object} - set(property, value) - -
-
- Basic setter - - -
- - - - -
-
Parameters:
- -
- {Any} property - -
-
- -
- {Any} value - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Object} thisArg
- -
- - - - -
- - -
- - {fabric.Object} - setActive(active) - -
-
- Sets state of an object - `true` makes it active, `false` - inactive - - -
- - - - -
-
Parameters:
- -
- {Boolean} active - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Object} thisArg
- -
- - - - -
- - -
- - {Object} - setAngle(value) - -
-
- Sets object's angle - - -
- - - - -
-
Parameters:
- -
- value - -
-
{Number} angle value
- -
- - - - - -
-
Returns:
- -
{Object} thisArg
- -
- - - - -
- - -
- - - setCoords() - -
-
- Sets corner position coordinates based on current angle, width and height. - - -
- - - - - - - - - - - -
- - -
- - {fabric.Object} - setOpacity(value) - -
-
- Sets object opacity - - -
- - - - -
-
Parameters:
- -
- value - -
-
{Number} value 0-1
- -
- - - - - -
-
Returns:
- -
{fabric.Object} thisArg
- -
- - - - -
- - -
- - - setOptions(options) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {Object} options - Optional -
-
- -
- - - - - - - - -
- - -
- - {fabric.Object} - setSourcePath(value) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {String} value - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Object} thisArg
- -
- - - - -
- - -
- - {fabric.Object} - straighten() - -
-
- - - -
- - - - - - - - -
-
Returns:
- -
{fabric.Object} thisArg
- -
- - - - -
- - -
- - - toDatalessObject() - -
-
- - - -
- - - - - - - - - - - -
- - -
- - {String} - toDataURL() - -
-
- Converts an object into a data-url-like string - - -
- - - - - - - - -
-
Returns:
- -
{String} string of data
- -
- - - - -
- - -
- - {fabric.Object} - toggle(property) - -
-
- Toggles specified property from `true` to `false` or from `false` to `true` - - -
- - - - -
-
Parameters:
- -
- {String} property - -
-
property to toggle
- -
- - - - - -
-
Returns:
- -
{fabric.Object} thisArg
- -
- - - - -
- - -
- - {fabric.Object} - toGrayscale() - -
-
- Makes object's color grayscale - - -
- - - - - - - - -
-
Returns:
- -
{fabric.Object} thisArg
- -
- - - - -
- - -
- - {String} - toJSON() - -
-
- Returns a JSON representation of an instance - - -
- - - - - - - - -
-
Returns:
- -
{String} json
- -
- - - - -
- - -
- - {Object} - toObject() - -
-
- Returns an object representation of an instance - - -
- - - - - - - - -
-
Returns:
- -
{Object}
- -
- - - - -
- - -
- - {String} - toString() - -
-
- Returns a string representation of an instance - - -
- - - - - - - - -
-
Returns:
- -
{String}
- -
- - - - -
- - -
- - - transform(ctx) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {CanvasRenderingContext2D} ctx - -
-
Context
- -
- - - - - - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 21:41:43 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Path.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Path.html deleted file mode 100644 index 9b78bee8..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Path.html +++ /dev/null @@ -1,864 +0,0 @@ - - - - - - - JsDoc Reference - fabric.Path - - - - - - - - - - - - - -
- -

- - Class fabric.Path -

- - -

- -
Extends - fabric.Object.
- - - Path - - -
Defined in: path.class.js. - -

- - - - - - - - - - - - - - - - - -
Class Summary
Constructor AttributesConstructor Name and Description
  -
- fabric.Path() -
-
-
- - - - - - - - - - - - - - - - - - - - - - -
Field Summary
Field AttributesField Name and Description
  -
- type -
-
-
- - - -
-
Fields borrowed from class fabric.Object:
FX_DURATION, FX_TRANSITION, includeDefaultValues, MIN_SCALE_LIMIT, NUM_FRACTION_DIGITS, options, rotate, stateProperties
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
  - -
Returns number representation of an instance complexity
-
<static>   -
fabric.Path.fromElement(element, options) -
-
Creates an instance of fabric.Path from an SVG element
-
<static>   -
fabric.Path.fromObject(object) -
-
Creates an instance of fabric.Path from an object
-
  -
initialize(path, options) -
-
Constructor
-
  -
render(ctx, noTransform) -
-
-
  -
set(prop, value) -
-
-
  - -
-
  - -
-
  - -
Returns string representation of an instance
-
- - - -
-
Methods borrowed from class fabric.Object:
callSuper, clone, cloneAsImage, drawBorders, drawCorners, fxRemove, fxStraighten, get, getAngle, getCenter, getHeight, getWidth, hasStateChanged, intersectsWithObject, intersectsWithRect, isActive, isContainedWithinRect, isType, saveState, scale, scaleToHeight, scaleToWidth, setActive, setAngle, setCoords, setOpacity, setOptions, setSourcePath, straighten, toDataURL, toggle, toGrayscale, toJSON, transform
-
- - - - - - - -
-
- Class Detail -
- -
- fabric.Path() -
- -
- - -
- - - - - - - - - - - - -
- - - - -
- Field Detail -
- - -
- - {String} - type - -
-
- - - -
- - - - - - - - - - - - - - -
- Method Detail -
- - -
- - {Number} - complexity() - -
-
- Returns number representation of an instance complexity - - -
- - - - - - - - -
-
Returns:
- -
{Number} complexity
- -
- - - - -
- - -
<static> - - {fabric.Path} - fabric.Path.fromElement(element, options) - -
-
- Creates an instance of fabric.Path from an SVG element - - -
- - - - -
-
Parameters:
- -
- {SVGElement} element - -
-
to parse
- -
- {Object} options - -
-
object
- -
- - - - - -
-
Returns:
- -
{fabric.Path} Instance of fabric.Path
- -
- - - - -
- - -
<static> - - {fabric.Path} - fabric.Path.fromObject(object) - -
-
- Creates an instance of fabric.Path from an object - - -
- - - - -
-
Parameters:
- -
- object - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Path} Instance of fabric.Path
- -
- - - - -
- - -
- - - initialize(path, options) - -
-
- Constructor - - -
- - - - -
-
Parameters:
- -
- {Array|String} path - -
-
Path data (sequence of coordinates and corresponding "command" tokens)
- -
- {Object} options - Optional -
-
Options object
- -
- - - - - - - - -
- - -
- - - render(ctx, noTransform) - -
-
- - - -
- - - - -
-
Parameters:
- -
- ctx - -
-
- -
- noTransform - -
-
- -
- - - - - - - - -
- - -
- - - set(prop, value) - -
-
- - - -
- - - - -
-
Parameters:
- -
- prop - -
-
- -
- value - -
-
- -
- - - - - - - - -
- - -
- - {Object} - toDatalessObject() - -
-
- - - -
- - - - - - - - -
-
Returns:
- -
{Object}
- -
- - - - -
- - -
- - {Object} - toObject() - -
-
- - - -
- - - - - - - - -
-
Returns:
- -
{Object}
- -
- - - - -
- - -
- - {String} - toString() - -
-
- Returns string representation of an instance - - -
- - - - - - - - -
-
Returns:
- -
{String} string representation of an instance
- -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 21:41:43 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.PathGroup.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.PathGroup.html deleted file mode 100644 index 7e929e39..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.PathGroup.html +++ /dev/null @@ -1,1003 +0,0 @@ - - - - - - - JsDoc Reference - fabric.PathGroup - - - - - - - - - - - - - -
- -

- - Class fabric.PathGroup -

- - -

- -
Extends - fabric.Path.
- - - PathGroup - - -
Defined in: path_group.class.js. - -

- - - - - - - - - - - - - - - - - -
Class Summary
Constructor AttributesConstructor Name and Description
  - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Summary
Field AttributesField Name and Description
  - -
-
  -
- type -
-
-
- - - -
-
Fields borrowed from class fabric.Object:
FX_DURATION, FX_TRANSITION, includeDefaultValues, MIN_SCALE_LIMIT, NUM_FRACTION_DIGITS, options, rotate, stateProperties
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
  - -
Returns number representation of object's complexity
-
<static>   -
fabric.PathGroup.fromObject(object) -
-
-
  - -
-
  -
initialize(paths, options) -
-
Constructor
-
  - -
-
  - -
-
  -
render(ctx) -
-
-
  -
set(prop, value) -
-
-
  - -
-
  - -
Makes path group grayscale
-
  - -
-
  - -
Returns a string representation of an object
-
- - - -
-
Methods borrowed from class fabric.Object:
callSuper, clone, cloneAsImage, drawBorders, drawCorners, fxRemove, fxStraighten, get, getAngle, getCenter, getHeight, getWidth, hasStateChanged, intersectsWithObject, intersectsWithRect, isActive, isContainedWithinRect, isType, saveState, scale, scaleToHeight, scaleToWidth, setActive, setAngle, setCoords, setOpacity, setOptions, setSourcePath, straighten, toDataURL, toggle, toJSON, transform
-
- - - - - - - -
-
- Class Detail -
- -
- fabric.PathGroup() -
- -
- - -
- - - - - - - - - - - - -
- - - - -
- Field Detail -
- - -
- - {Boolean} - forceFillOverwrite - -
-
- - - -
- - - - - - - - -
- - -
- - {String} - type - -
-
- - - -
- - - - - - - - - - - - - - -
- Method Detail -
- - -
- - {Number} - complexity() - -
-
- Returns number representation of object's complexity - - -
- - - - - - - - -
-
Returns:
- -
{Number} complexity
- -
- - - - -
- - -
<static> - - {fabric.PathGroup} - fabric.PathGroup.fromObject(object) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {Object} object - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.PathGroup}
- -
- - - - -
- - -
- - {Array} - getObjects() - -
-
- - - -
- - - - - - - - -
-
Returns:
- -
{Array} array of path objects included in this path group
- -
- - - - -
- - -
- - {fabric.PathGroup} - initialize(paths, options) - -
-
- Constructor - - -
- - - - -
-
Parameters:
- -
- {Array} paths - -
-
- -
- {Object} options - Optional -
-
Options object
- -
- - - - - -
-
Returns:
- -
{fabric.PathGroup} thisArg
- -
- - - - -
- - -
- - - initProperties() - -
-
- - - -
- - - - - - - - - - - -
- - -
- - {Boolean} - isSameColor() - -
-
- - - -
- - - - - - - - -
-
Returns:
- -
{Boolean} true if all paths are of the same color (`fill`)
- -
- - - - -
- - -
- - - render(ctx) - -
-
- - - -
- - - - -
-
Parameters:
- -
- ctx - -
-
- -
- - - - - - - - -
- - -
- - {fabric.PathGroup} - set(prop, value) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {String} prop - -
-
- -
- {Any} value - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.PathGroup} thisArg
- -
- - - - -
- - -
- - {Object} - toDatalessObject() - -
-
- - - -
- - - - - - - - -
-
Returns:
- -
{Object} dataless object representation of an instance
- -
- - - - -
- - -
- - {fabric.PathGroup} - toGrayscale() - -
-
- Makes path group grayscale - - -
- - - - - - - - -
-
Returns:
- -
{fabric.PathGroup} thisArg
- -
- - - - -
- - -
- - {Object} - toObject() - -
-
- - - -
- - - - - - - - -
-
Returns:
- -
{Object} object representation of an instance
- -
- - - - -
- - -
- - {String} - toString() - -
-
- Returns a string representation of an object - - -
- - - - - - - - -
-
Returns:
- -
{String} string representation of an object
- -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 21:41:43 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Point.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Point.html deleted file mode 100644 index c945b910..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Point.html +++ /dev/null @@ -1,1614 +0,0 @@ - - - - - - - JsDoc Reference - fabric.Point - - - - - - - - - - - - - -
- -

- - Class fabric.Point -

- - -

- - - - - - -
Defined in: point.class.js. - -

- - - - - - - - - - - - - - - - - -
Class Summary
Constructor AttributesConstructor Name and Description
  -
- fabric.Point(x, y) -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
  -
add(that) -
-
-
  -
addEquals(that) -
-
-
  -
distanceFrom(that) -
-
-
  -
divide(scalar) -
-
-
  -
divideEquals(scalar) -
-
-
  -
eq(that) -
-
-
  -
gt(that) -
-
-
  -
gte(that) -
-
-
  -
init(x, y) -
-
-
  -
lerp(that, t) -
-
-
  -
lt(that) -
-
-
  -
lte(that) -
-
-
  -
max(that) -
-
-
  -
min(that) -
-
-
  -
multiply(scalar) -
-
-
  -
multiplyEquals(scalar) -
-
-
  -
scalarAdd(scalar) -
-
-
  -
scalarAddEquals(scalar, thisArg) -
-
-
  -
scalarSubtract(scalar) -
-
-
  - -
-
  -
setFromPoint(that) -
-
-
  -
setXY(x, y) -
-
-
  -
subtract(that) -
-
-
  - -
-
  -
swap(that) -
-
-
  - -
-
- - - - - - - - - -
-
- Class Detail -
- -
- fabric.Point(x, y) -
- -
- - -
- - - - - -
-
Parameters:
- -
- {Number} x - -
-
- -
- {Number} y - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Point} thisArg
- -
- - - - -
- - - - - - - -
- Method Detail -
- - -
- - {fabric.Point} - add(that) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {fabric.Point} that - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Point} new Point instance with added values
- -
- - - - -
- - -
- - {fabric.Point} - addEquals(that) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {fabric.Point} that - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Point} thisArg
- -
- - - - -
- - -
- - - distanceFrom(that) - -
-
- - - -
- - - - -
-
Parameters:
- -
- that - -
-
- -
- - - - - - - - -
- - -
- - - divide(scalar) - -
-
- - - -
- - - - -
-
Parameters:
- -
- scalar - -
-
- -
- - - - - - - - -
- - -
- - - divideEquals(scalar) - -
-
- - - -
- - - - -
-
Parameters:
- -
- scalar - -
-
- -
- - - - - - - - -
- - -
- - - eq(that) - -
-
- - - -
- - - - -
-
Parameters:
- -
- that - -
-
- -
- - - - - - - - -
- - -
- - - gt(that) - -
-
- - - -
- - - - -
-
Parameters:
- -
- that - -
-
- -
- - - - - - - - -
- - -
- - - gte(that) - -
-
- - - -
- - - - -
-
Parameters:
- -
- that - -
-
- -
- - - - - - - - -
- - -
- - - init(x, y) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {Number} x - -
-
- -
- {Number} y - -
-
- -
- - - - - - - - -
- - -
- - - lerp(that, t) - -
-
- - - -
- - - - -
-
Parameters:
- -
- that - -
-
- -
- t - -
-
- -
- - - - - - - - -
- - -
- - - lt(that) - -
-
- - - -
- - - - -
-
Parameters:
- -
- that - -
-
- -
- - - - - - - - -
- - -
- - - lte(that) - -
-
- - - -
- - - - -
-
Parameters:
- -
- that - -
-
- -
- - - - - - - - -
- - -
- - - max(that) - -
-
- - - -
- - - - -
-
Parameters:
- -
- that - -
-
- -
- - - - - - - - -
- - -
- - - min(that) - -
-
- - - -
- - - - -
-
Parameters:
- -
- that - -
-
- -
- - - - - - - - -
- - -
- - - multiply(scalar) - -
-
- - - -
- - - - -
-
Parameters:
- -
- scalar - -
-
- -
- - - - - - - - -
- - -
- - - multiplyEquals(scalar) - -
-
- - - -
- - - - -
-
Parameters:
- -
- scalar - -
-
- -
- - - - - - - - -
- - -
- - {fabric.Point} - scalarAdd(scalar) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {Number} scalar - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Point} new Point with added value
- -
- - - - -
- - -
- - - scalarAddEquals(scalar, thisArg) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {Number} scalar - -
-
- -
- {fabric.Point} thisArg - -
-
- -
- - - - - - - - -
- - -
- - - scalarSubtract(scalar) - -
-
- - - -
- - - - -
-
Parameters:
- -
- scalar - -
-
- -
- - - - - - - - -
- - -
- - - scalarSubtractEquals(scalar) - -
-
- - - -
- - - - -
-
Parameters:
- -
- scalar - -
-
- -
- - - - - - - - -
- - -
- - - setFromPoint(that) - -
-
- - - -
- - - - -
-
Parameters:
- -
- that - -
-
- -
- - - - - - - - -
- - -
- - - setXY(x, y) - -
-
- - - -
- - - - -
-
Parameters:
- -
- x - -
-
- -
- y - -
-
- -
- - - - - - - - -
- - -
- - {fabric.Point} - subtract(that) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {fabric.Point} that - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Point} new Point object with subtracted values
- -
- - - - -
- - -
- - {fabric.Point} - subtractEquals(that) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {fabric.Point} that - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Point} thisArg
- -
- - - - -
- - -
- - - swap(that) - -
-
- - - -
- - - - -
-
Parameters:
- -
- that - -
-
- -
- - - - - - - - -
- - -
- - - toString() - -
-
- - - -
- - - - - - - - - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 21:41:43 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Polygon#initialize.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Polygon#initialize.html deleted file mode 100644 index b0eb4dd6..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Polygon#initialize.html +++ /dev/null @@ -1,345 +0,0 @@ - - - - - - - JsDoc Reference - fabric.Polygon#initialize - - - - - - - - - - - - - -
- -

- - Class fabric.Polygon#initialize -

- - -

- - - - - - -
Defined in: polygon.class.js. - -

- - - - - - - - - - - - - - - - - -
Class Summary
Constructor AttributesConstructor Name and Description
  -
- fabric.Polygon#initialize(points, options) -
-
-
- - - - - - - - - - - - -
-
- Class Detail -
- -
- fabric.Polygon#initialize(points, options) -
- -
- - -
- - - - - -
-
Parameters:
- -
- points - -
-
{Array} array of points
- -
- options - -
-
{Object} options object
- -
- - - - - -
-
Returns:
- -
{fabric.Point} thisArg
- -
- - - - -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 14:27:05 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Polygon.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Polygon.html deleted file mode 100644 index 0a4bed52..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Polygon.html +++ /dev/null @@ -1,719 +0,0 @@ - - - - - - - JsDoc Reference - fabric.Polygon - - - - - - - - - - - - - -
- -

- - Class fabric.Polygon -

- - -

- -
Extends - fabric.Object.
- - - Polygon - - -
Defined in: polygon.class.js. - -

- - - - - - - - - - - - - - - - - -
Class Summary
Constructor AttributesConstructor Name and Description
  - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Summary
Field AttributesField Name and Description
<static>   -
- fabric.Polygon.ATTRIBUTE_NAMES -
-
List of attribute names to account for when parsing SVG element (used by `fabric.Polygon.fromElement`)
-
  -
- type -
-
-
- - - -
-
Fields borrowed from class fabric.Object:
FX_DURATION, FX_TRANSITION, includeDefaultValues, MIN_SCALE_LIMIT, NUM_FRACTION_DIGITS, options, rotate, stateProperties
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
  - -
Returns complexity of an instance
-
<static>   -
fabric.Polygon.fromElement(element, options) -
-
Returns fabric.Polygon instance from an SVG element
-
<static>   -
fabric.Polygon.fromObject(object) -
-
Returns fabric.Polygon instance from an object representation
-
  -
initialize(points, options) -
-
Constructor
-
  - -
Returns object representation of an instance
-
- - - -
-
Methods borrowed from class fabric.Object:
callSuper, clone, cloneAsImage, drawBorders, drawCorners, fxRemove, fxStraighten, get, getAngle, getCenter, getHeight, getWidth, hasStateChanged, intersectsWithObject, intersectsWithRect, isActive, isContainedWithinRect, isType, render, saveState, scale, scaleToHeight, scaleToWidth, set, setActive, setAngle, setCoords, setOpacity, setOptions, setSourcePath, straighten, toDatalessObject, toDataURL, toggle, toGrayscale, toJSON, toString, transform
-
- - - - - - - -
-
- Class Detail -
- -
- fabric.Polygon() -
- -
- - -
- - - - - - - - - - - - -
- - - - -
- Field Detail -
- - -
<static> - - - fabric.Polygon.ATTRIBUTE_NAMES - -
-
- List of attribute names to account for when parsing SVG element (used by `fabric.Polygon.fromElement`) - - -
- - - - - - - - -
- - -
- - {String} - type - -
-
- - - -
- - - - - - - - - - - - - - -
- Method Detail -
- - -
- - {Number} - complexity() - -
-
- Returns complexity of an instance - - -
- - - - - - - - -
-
Returns:
- -
{Number} complexity of this instance
- -
- - - - -
- - -
<static> - - {fabric.Polygon} - fabric.Polygon.fromElement(element, options) - -
-
- Returns fabric.Polygon instance from an SVG element - - -
- - - - -
-
Parameters:
- -
- {SVGElement} element - -
-
Element to parse
- -
- {Object} options - -
-
Options object
- -
- - - - - -
-
Returns:
- -
{fabric.Polygon}
- -
- - - - -
- - -
<static> - - {fabric.Polygon} - fabric.Polygon.fromObject(object) - -
-
- Returns fabric.Polygon instance from an object representation - - -
- - - - -
-
Parameters:
- -
- {Object} object - -
-
Object to create an instance from
- -
- - - - - -
-
Returns:
- -
{fabric.Polygon}
- -
- - - - -
- - -
- - {fabric.Polygon} - initialize(points, options) - -
-
- Constructor - - -
- - - - -
-
Parameters:
- -
- {Array} points - -
-
Array of points
- -
- {Object} options - -
-
Options object
- -
- - - - - -
-
Returns:
- -
{fabric.Polygon} thisArg
- -
- - - - -
- - -
- - {Object} - toObject() - -
-
- Returns object representation of an instance - - -
- - - - - - - - -
-
Returns:
- -
{Object} object representation of an instance
- -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 21:41:43 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Polyline.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Polyline.html deleted file mode 100644 index 6b751a78..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Polyline.html +++ /dev/null @@ -1,687 +0,0 @@ - - - - - - - JsDoc Reference - fabric.Polyline - - - - - - - - - - - - - -
- -

- - Class fabric.Polyline -

- - -

- -
Extends - fabric.Object.
- - - Polyline - - -
Defined in: polyline.class.js. - -

- - - - - - - - - - - - - - - - - -
Class Summary
Constructor AttributesConstructor Name and Description
  - -
-
- - - - - - - - - - - - - - - - - - - - - - -
Field Summary
Field AttributesField Name and Description
  -
- type -
-
-
- - - -
-
Fields borrowed from class fabric.Object:
FX_DURATION, FX_TRANSITION, includeDefaultValues, MIN_SCALE_LIMIT, NUM_FRACTION_DIGITS, options, rotate, stateProperties
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
  - -
Returns complexity of an instance
-
<static>   -
fabric.Polyline.fromElement(element, options) -
-
Returns fabric.Polyline instance from an SVG element
-
<static>   -
fabric.Polyline.fromObject(object) -
-
Returns fabric.Polyline instance from an object representation
-
  -
initialize(points, options) -
-
Constructor
-
  - -
Returns object representation of an instance
-
- - - -
-
Methods borrowed from class fabric.Object:
callSuper, clone, cloneAsImage, drawBorders, drawCorners, fxRemove, fxStraighten, get, getAngle, getCenter, getHeight, getWidth, hasStateChanged, intersectsWithObject, intersectsWithRect, isActive, isContainedWithinRect, isType, render, saveState, scale, scaleToHeight, scaleToWidth, set, setActive, setAngle, setCoords, setOpacity, setOptions, setSourcePath, straighten, toDatalessObject, toDataURL, toggle, toGrayscale, toJSON, toString, transform
-
- - - - - - - -
-
- Class Detail -
- -
- fabric.Polyline() -
- -
- - -
- - - - - - - - - - - - -
- - - - -
- Field Detail -
- - -
- - {String} - type - -
-
- - - -
- - - - - - - - - - - - - - -
- Method Detail -
- - -
- - {Number} - complexity() - -
-
- Returns complexity of an instance - - -
- - - - - - - - -
-
Returns:
- -
{Number} complexity
- -
- - - - -
- - -
<static> - - {Object} - fabric.Polyline.fromElement(element, options) - -
-
- Returns fabric.Polyline instance from an SVG element - - -
- - - - -
-
Parameters:
- -
- {SVGElement} element - -
-
Element to parse
- -
- {Object} options - Optional -
-
Options object
- -
- - - - - -
-
Returns:
- -
{Object} instance of fabric.Polyline
- -
- - - - -
- - -
<static> - - {fabric.Polyline} - fabric.Polyline.fromObject(object) - -
-
- Returns fabric.Polyline instance from an object representation - - -
- - - - -
-
Parameters:
- -
- {Object} object - Optional -
-
Object to create an instance from
- -
- - - - - -
-
Returns:
- -
{fabric.Polyline}
- -
- - - - -
- - -
- - {Object} - initialize(points, options) - -
-
- Constructor - - -
- - - - -
-
Parameters:
- -
- {Array} points - -
-
array of points
- -
- {Object} options - Optional -
-
Options object
- -
- - - - - -
-
Returns:
- -
{Object} thisArg
- -
- - - - -
- - -
- - {Object} - toObject() - -
-
- Returns object representation of an instance - - -
- - - - - - - - -
-
Returns:
- -
{Object} Object representation of an instance
- -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 21:41:43 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Rect#initialize.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Rect#initialize.html deleted file mode 100644 index 78648269..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Rect#initialize.html +++ /dev/null @@ -1,321 +0,0 @@ - - - - - - - JsDoc Reference - fabric.Rect#initialize - - - - - - - - - - - -
- - -
-

Classes

- -
- -
- -
- -

- - Class fabric.Rect#initialize -

- - -

- - - - - - -
Defined in: rect.class.js. - -

- - - - - - - - - - - - - - - - - -
Class Summary
Constructor AttributesConstructor Name and Description
  -
- fabric.Rect#initialize(options) -
-
-
- - - - - - - - - - - - -
-
- Class Detail -
- -
- fabric.Rect#initialize(options) -
- -
- - -
- - - - - -
-
Parameters:
- -
- options - -
-
{Object} options object
- -
- - - - - -
-
Returns:
- -
{Object} thisArg
- -
- - - - -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Wed Oct 13 2010 16:07:51 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Rect.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Rect.html deleted file mode 100644 index 73a5c2c8..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Rect.html +++ /dev/null @@ -1,672 +0,0 @@ - - - - - - - JsDoc Reference - fabric.Rect - - - - - - - - - - - - - -
- -

- - Class fabric.Rect -

- - -

- -
Extends - fabric.Object.
- - - Rect - - -
Defined in: rect.class.js. - -

- - - - - - - - - - - - - - - - - -
Class Summary
Constructor AttributesConstructor Name and Description
  -
- fabric.Rect() -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Summary
Field AttributesField Name and Description
  -
- options -
-
-
  -
- type -
-
-
- - - -
-
Fields borrowed from class fabric.Object:
FX_DURATION, FX_TRANSITION, includeDefaultValues, MIN_SCALE_LIMIT, NUM_FRACTION_DIGITS, rotate, stateProperties
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
  - -
-
<static>   -
fabric.Rect.fromElement(element, options) -
-
-
<static>   -
fabric.Rect.fromObject(object) -
-
-
  -
initialize(options) -
-
Constructor
-
- - - -
-
Methods borrowed from class fabric.Object:
callSuper, clone, cloneAsImage, drawBorders, drawCorners, fxRemove, fxStraighten, get, getAngle, getCenter, getHeight, getWidth, hasStateChanged, intersectsWithObject, intersectsWithRect, isActive, isContainedWithinRect, isType, render, saveState, scale, scaleToHeight, scaleToWidth, set, setActive, setAngle, setCoords, setOpacity, setOptions, setSourcePath, straighten, toDatalessObject, toDataURL, toggle, toGrayscale, toJSON, toObject, toString, transform
-
- - - - - - - -
-
- Class Detail -
- -
- fabric.Rect() -
- -
- - -
- - - - - - - - - - - - -
- - - - -
- Field Detail -
- - -
- - {Object} - options - -
-
- - - -
- - - - - - - - -
- - -
- - {String} - type - -
-
- - - -
- - - - - - - - - - - - - - -
- Method Detail -
- - -
- - {Number} - complexity() - -
-
- - - -
- - - - - - - - -
-
Returns:
- -
{Number} complexity
- -
- - - - -
- - -
<static> - - {fabric.Rect} - fabric.Rect.fromElement(element, options) - -
-
- - - -
- - - - -
-
Parameters:
- -
- element - -
-
{SVGElement} element to parse
- -
- options - -
-
{Object} options object
- -
- - - - - -
-
Returns:
- -
{fabric.Rect} instance of fabric.Rect
- -
- - - - -
- - -
<static> - - {Object} - fabric.Rect.fromObject(object) - -
-
- - - -
- - - - -
-
Parameters:
- -
- object - -
-
{Object} object to create an instance from
- -
- - - - - -
-
Returns:
- -
{Object} instance of fabric.Rect
- -
- - - - -
- - -
- - {Object} - initialize(options) - -
-
- Constructor - - -
- - - - -
-
Parameters:
- -
- options - -
-
{Object} options object
- -
- - - - - -
-
Returns:
- -
{Object} thisArg
- -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 21:41:43 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Text.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Text.html deleted file mode 100644 index cd6d728e..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Text.html +++ /dev/null @@ -1,1047 +0,0 @@ - - - - - - - JsDoc Reference - fabric.Text - - - - - - - - - - - - - -
- -

- - Class fabric.Text -

- - -

- -
Extends - fabric.Object.
- - - Text - - -
Defined in: text.class.js. - -

- - - - - - - - - - - - - - - - - -
Class Summary
Constructor AttributesConstructor Name and Description
  -
- fabric.Text() -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Summary
Field AttributesField Name and Description
  -
- options -
-
-
  -
- type -
-
-
- - - -
-
Fields borrowed from class fabric.Object:
FX_DURATION, FX_TRANSITION, includeDefaultValues, MIN_SCALE_LIMIT, NUM_FRACTION_DIGITS, rotate, stateProperties
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
<static>   -
fabric.Text.fromElement(element) -
-
-
<static>   -
fabric.Text.fromObject(object) -
-
Returns fabric.Text instance from an object representation
-
  -
getText() -
-
-
  -
initialize(text, options) -
-
Constructor
-
  - -
-
  -
render(ctx) -
-
-
  -
set(name, value) -
-
Sets specified property to a specified value
-
  -
setColor(value) -
-
-
  -
setFontsize(value) -
-
-
  -
setText(value) -
-
Sets text of an instance, and updates its coordinates
-
  - -
-
  - -
Returns string representation of an instance
-
- - - -
-
Methods borrowed from class fabric.Object:
callSuper, clone, cloneAsImage, complexity, drawBorders, drawCorners, fxRemove, fxStraighten, get, getAngle, getCenter, getHeight, getWidth, hasStateChanged, intersectsWithObject, intersectsWithRect, isActive, isContainedWithinRect, isType, saveState, scale, scaleToHeight, scaleToWidth, setActive, setAngle, setCoords, setOpacity, setOptions, setSourcePath, straighten, toDatalessObject, toDataURL, toggle, toGrayscale, toJSON, transform
-
- - - - - - - -
-
- Class Detail -
- -
- fabric.Text() -
- -
- - -
- - - - - - - - - - - - -
- - - - -
- Field Detail -
- - -
- - {Object} - options - -
-
- - - -
- - - - - - - - -
- - -
- - {String} - type - -
-
- - - -
- - - - - - - - - - - - - - -
- Method Detail -
- - -
<static> - - {fabric.Text} - fabric.Text.fromElement(element) - -
-
- - - -
- - - - -
-
Parameters:
- -
- element - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Text} an instance
- -
- - - - -
- - -
<static> - - {fabric.Text} - fabric.Text.fromObject(object) - -
-
- Returns fabric.Text instance from an object representation - - -
- - - - -
-
Parameters:
- -
- {Object} object - -
-
to create an instance from
- -
- - - - - -
-
Returns:
- -
{fabric.Text} an instance
- -
- - - - -
- - -
- - {String} - getText() - -
-
- - - -
- - - - - - - - -
-
Returns:
- -
{String}
- -
- - - - -
- - -
- - {fabric.Text} - initialize(text, options) - -
-
- Constructor - - -
- - - - -
-
Parameters:
- -
- {String} text - -
-
- -
- {Object} options - Optional -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Text} thisArg
- -
- - - - -
- - -
- - - initStateProperties() - -
-
- - - -
- - - - - - - - - - - -
- - -
- - - render(ctx) - -
-
- - - -
- - - - -
-
Parameters:
- -
- ctx - -
-
{CanvasRenderingContext2D} context to render on
- -
- - - - - - - - -
- - -
- - {fabric.Text} - set(name, value) - -
-
- Sets specified property to a specified value - - -
- - - - -
-
Parameters:
- -
- {String} name - -
-
- -
- {Any} value - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Text} thisArg
- -
- - - - -
- - -
- - {fabric.Text} - setColor(value) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {String} value - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Text} thisArg
- -
- - - - -
- - -
- - {fabric.Text} - setFontsize(value) - -
-
- - - -
- - - - -
-
Parameters:
- -
- {Number} value - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Text} thisArg
- -
- - - - -
- - -
- - {fabric.Text} - setText(value) - -
-
- Sets text of an instance, and updates its coordinates - - -
- - - - -
-
Parameters:
- -
- {String} value - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Text} thisArg
- -
- - - - -
- - -
- - {Object} - toObject() - -
-
- - - -
- - - - - - - - -
-
Returns:
- -
{Object} Object representation of text object
- -
- - - - -
- - -
- - {String} - toString() - -
-
- Returns string representation of an instance - - -
- - - - - - - - -
-
Returns:
- -
{String} String representation of text object
- -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 21:41:43 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Triangle#initialize.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Triangle#initialize.html deleted file mode 100644 index 3f2efc4f..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Triangle#initialize.html +++ /dev/null @@ -1,353 +0,0 @@ - - - - - - - JsDoc Reference - fabric.Triangle#initialize - - - - - - - - - - - - - -
- -

- - Class fabric.Triangle#initialize -

- - -

- - - - - - -
Defined in: group.class.js. - -

- - - - - - - - - - - - - - - - - -
Class Summary
Constructor AttributesConstructor Name and Description
  -
- fabric.Triangle#initialize(objects, options) -
-
-
- - - - - - - - - - - - -
-
- Class Detail -
- -
- fabric.Triangle#initialize(objects, options) -
- -
- - -
- - - - - -
-
Parameters:
- -
- {Object} objects - -
-
Group objects
- -
- options - -
-
- -
- - - - - -
-
Returns:
- -
{Object} thisArg
- -
- - - - -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 15:42:58 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Triangle.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Triangle.html deleted file mode 100644 index 2b175542..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.Triangle.html +++ /dev/null @@ -1,582 +0,0 @@ - - - - - - - JsDoc Reference - fabric.Triangle - - - - - - - - - - - - - -
- -

- - Class fabric.Triangle -

- - -

- -
Extends - fabric.Object.
- - - Triangle - - -
Defined in: triangle.class.js. - -

- - - - - - - - - - - - - - - - - -
Class Summary
Constructor AttributesConstructor Name and Description
  - -
-
- - - - - - - - - - - - - - - - - - - - - - -
Field Summary
Field AttributesField Name and Description
  -
- type -
-
-
- - - -
-
Fields borrowed from class fabric.Object:
FX_DURATION, FX_TRANSITION, includeDefaultValues, MIN_SCALE_LIMIT, NUM_FRACTION_DIGITS, options, rotate, stateProperties
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
  - -
Returns complexity of an instance
-
<static>   -
fabric.Triangle.fromObject(object) -
-
Returns fabric.Triangle instance from an object representation
-
  -
initialize(options) -
-
Constructor
-
- - - -
-
Methods borrowed from class fabric.Object:
callSuper, clone, cloneAsImage, drawBorders, drawCorners, fxRemove, fxStraighten, get, getAngle, getCenter, getHeight, getWidth, hasStateChanged, intersectsWithObject, intersectsWithRect, isActive, isContainedWithinRect, isType, render, saveState, scale, scaleToHeight, scaleToWidth, set, setActive, setAngle, setCoords, setOpacity, setOptions, setSourcePath, straighten, toDatalessObject, toDataURL, toggle, toGrayscale, toJSON, toObject, toString, transform
-
- - - - - - - -
-
- Class Detail -
- -
- fabric.Triangle() -
- -
- - -
- - - - - - - - - - - - -
- - - - -
- Field Detail -
- - -
- - {String} - type - -
-
- - - -
- - - - - - - - - - - - - - -
- Method Detail -
- - -
- - {Number} - complexity() - -
-
- Returns complexity of an instance - - -
- - - - - - - - -
-
Returns:
- -
{Number} complexity of this instance
- -
- - - - -
- - -
<static> - - {Object} - fabric.Triangle.fromObject(object) - -
-
- Returns fabric.Triangle instance from an object representation - - -
- - - - -
-
Parameters:
- -
- object - -
-
{Object} object to create an instance from
- -
- - - - - -
-
Returns:
- -
{Object} instance of Canvas.Triangle
- -
- - - - -
- - -
- - {Object} - initialize(options) - -
-
- Constructor - - -
- - - - -
-
Parameters:
- -
- options - -
-
{Object} options object
- -
- - - - - -
-
Returns:
- -
{Object} thisArg
- -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 21:41:43 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.fabric.Point.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.fabric.Point.html deleted file mode 100644 index 92338abe..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.fabric.Point.html +++ /dev/null @@ -1,327 +0,0 @@ - - - - - - - JsDoc Reference - fabric.fabric.Point - - - - - - - - - - - -
- - -
-

Classes

- -
- -
- -
- -

- - Class fabric.fabric.Point -

- - -

- - - - - - -
Defined in: point.class.js. - -

- - - - - - - - - - - - - - - - - -
Class Summary
Constructor AttributesConstructor Name and Description
  - -
-
- - - - - - - - - - - - -
-
- Class Detail -
- -
- fabric.fabric.Point(x, y) -
- -
- - -
- - - - - -
-
Parameters:
- -
- {Number} x - -
-
- -
- {Number} y - -
-
- -
- - - - - -
-
Returns:
- -
{fabric.Point} thisArg
- -
- - - - -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Wed Oct 13 2010 16:03:05 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.html deleted file mode 100644 index 3189f2f3..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.html +++ /dev/null @@ -1,797 +0,0 @@ - - - - - - - JsDoc Reference - fabric - - - - - - - - - - - - - -
- -

- - Namespace fabric -

- - -

- - - - - - -
Defined in: object.class.js. - -

- - - - - - - - - - - - - - - - - -
Namespace Summary
Constructor AttributesConstructor Name and Description
  -
- fabric -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
<static>   -
fabric.log(Values) -
-
Wrapper around `console.log` (when available)
-
<static>   -
fabric.parseAttributes(element, attributes) -
-
Returns an object of attributes' name/value, given element and an array of attribute names; -Parses parent "g" nodes recursively upwards.
-
<static>   -
fabric.parseElements(elements, options) -
-
-
<static>   -
fabric.parsePointsAttribute(points) -
-
-
<static>   -
fabric.parseStyleAttribute(element) -
-
-
<static>   -
fabric.parseSVGDocument(doc, callback) -
-
-
<static>   -
fabric.parseTransformAttribute(attributeValue) -
-
-
<static>   -
fabric.warn(Values) -
-
Wrapper around `console.warn` (when available)
-
- - - - - - - - - -
-
- Namespace Detail -
- -
- fabric -
- -
- - -
- - - - - - - - - - - - -
- - - - - - - -
- Method Detail -
- - -
<static> - - - fabric.log(Values) - -
-
- Wrapper around `console.log` (when available) - -
- Defined in: fabric.js. - - -
- - - - -
-
Parameters:
- -
- {Any} Values - -
-
to log
- -
- - - - - - - - -
- - -
<static> - - {Object} - fabric.parseAttributes(element, attributes) - -
-
- Returns an object of attributes' name/value, given element and an array of attribute names; -Parses parent "g" nodes recursively upwards. - -
- Defined in: parser.js. - - -
- - - - -
-
Parameters:
- -
- {DOMElement} element - -
-
Element to parse
- -
- {Array} attributes - -
-
Array of attributes to parse
- -
- - - - - -
-
Returns:
- -
{Object} object containing parsed attributes' names/values
- -
- - - - -
- - -
<static> - - {Array} - fabric.parseElements(elements, options) - -
-
- - -
- Defined in: parser.js. - - -
- - - - -
-
Parameters:
- -
- {Array} elements - -
-
Array of elements to parse
- -
- {Object} options - -
-
Options object
- -
- - - - - -
-
Returns:
- -
{Array} Array of corresponding instances (transformed from SVG elements)
- -
- - - - -
- - -
<static> - - {Array} - fabric.parsePointsAttribute(points) - -
-
- - -
- Defined in: parser.js. - - -
- - - - -
-
Parameters:
- -
- points - -
-
{String} points attribute string
- -
- - - - - -
-
Returns:
- -
{Array} array of points
- -
- - - - -
- - -
<static> - - {Object} - fabric.parseStyleAttribute(element) - -
-
- - -
- Defined in: parser.js. - - -
- - - - -
-
Parameters:
- -
- {SVGElement} element - -
-
Element to parse
- -
- - - - - -
-
Returns:
- -
{Object} Objects with values parsed from style attribute of an element
- -
- - - - -
- - -
<static> - - - fabric.parseSVGDocument(doc, callback) - -
-
- - -
- Defined in: parser.js. - - -
- - - - -
-
Parameters:
- -
- {SVGDocument} doc - -
-
SVG document to parse
- -
- {Function} callback - -
-
Callback to call when parsing is finished; It's being passed an array of elements (parsed from a document).
- -
- - - - - - - - -
- - -
<static> - - {Array} - fabric.parseTransformAttribute(attributeValue) - -
-
- - -
- Defined in: parser.js. - - -
- - - - -
-
Parameters:
- -
- attributeValue - -
-
{String} string containing attribute value
- -
- - - - - -
-
Returns:
- -
{Array} array of 6 elements representing transformation matrix
- -
- - - - -
- - -
<static> - - - fabric.warn(Values) - -
-
- Wrapper around `console.warn` (when available) - -
- Defined in: fabric.js. - - -
- - - - -
-
Parameters:
- -
- {Any} Values - -
-
to log as a warning
- -
- - - - - - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 16:34:25 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.util.array.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.util.array.html deleted file mode 100644 index 547d215f..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.util.array.html +++ /dev/null @@ -1,525 +0,0 @@ - - - - - - - JsDoc Reference - fabric.util.array - - - - - - - - - - - - - -
- -

- - Namespace fabric.util.array -

- - -

- - - - - - -
Defined in: lang_array.js. - -

- - - - - - - - - - - - - - - - - -
Namespace Summary
Constructor AttributesConstructor Name and Description
  - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
<static>   -
fabric.util.array.invoke(array, method) -
-
Invokes method on all items in a given array
-
<static>   -
fabric.util.array.max(array, byProperty) -
-
Finds maximum value in array (not necessarily "first" one)
-
<static>   -
fabric.util.array.min(array, byProperty) -
-
Finds minimum value in array (not necessarily "first" one)
-
- - - - - - - - - -
-
- Namespace Detail -
- -
- fabric.util.array -
- -
- - -
- - - - - - - - - - - - -
- - - - - - - -
- Method Detail -
- - -
<static> - - - fabric.util.array.invoke(array, method) - -
-
- Invokes method on all items in a given array - - -
- - - - -
-
Parameters:
- -
- {Array} array - -
-
Array to iterate over
- -
- {String} method - -
-
Name of a method to invoke
- -
- - - - - - - - -
- - -
<static> - - - fabric.util.array.max(array, byProperty) - -
-
- Finds maximum value in array (not necessarily "first" one) - - -
- - - - -
-
Parameters:
- -
- {Array} array - -
-
Array to iterate over
- -
- {String} byProperty - -
-
- -
- - - - - - - - -
- - -
<static> - - - fabric.util.array.min(array, byProperty) - -
-
- Finds minimum value in array (not necessarily "first" one) - - -
- - - - -
-
Parameters:
- -
- {Array} array - -
-
Array to iterate over
- -
- {String} byProperty - -
-
- -
- - - - - - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 21:41:43 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.util.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.util.html deleted file mode 100644 index f29e5748..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.util.html +++ /dev/null @@ -1,973 +0,0 @@ - - - - - - - JsDoc Reference - fabric.util - - - - - - - - - - - - - -
- -

- - Namespace fabric.util -

- - -

- - - - - - -
Defined in: util.js. - -

- - - - - - - - - - - - - - - - - -
Namespace Summary
Constructor AttributesConstructor Name and Description
  - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
<static>   -
fabric.util.addListener(element, eventName, handler) -
-
Adds an event listener to an element
-
<static>   -
fabric.util.createClass() -
-
Helper for creation of "classes"
-
<static>   -
fabric.util.degreesToRadians(degrees) -
-
Transforms degrees to radians.
-
<static>   -
fabric.util.falseFunction() -
-
Function which always returns `false`.
-
<static>   -
fabric.util.fireEvent(eventName, memo) -
-
Fires event with an optional memo object
-
<static>   -
fabric.util.getPointer(event) -
-
Cross-browser wrapper for getting event's coordinates
-
<static>   -
fabric.util.getRandomInt(min, max) -
-
Returns random number between 2 specified ones.
-
<static>   -
fabric.util.observeEvent(eventName, handler) -
-
-
<static>   -
fabric.util.removeFromArray(array, value) -
-
Removes value from an array.
-
<static>   -
fabric.util.removeListener(element, eventName, handler) -
-
Removes an event listener from an element
-
<static>   -
fabric.util.toFixed(number, fractionDigits) -
-
A wrapper around Number#toFixed, which contrary to native method returns number, not string.
-
- - - - - - - - - -
-
- Namespace Detail -
- -
- fabric.util -
- -
- - -
- - - - - - - - - - - - -
- - - - - - - -
- Method Detail -
- - -
<static> - - - fabric.util.addListener(element, eventName, handler) - -
-
- Adds an event listener to an element - -
- Defined in: dom_event.js. - - -
- - - - -
-
Parameters:
- -
- {HTMLElement} element - -
-
- -
- {String} eventName - -
-
- -
- {Function} handler - -
-
- -
- - - - - - - - -
- - -
<static> - - - fabric.util.createClass() - -
-
- Helper for creation of "classes" - -
- Defined in: lang_class.js. - - -
- - - - - - - - - - - -
- - -
<static> - - {Number} - fabric.util.degreesToRadians(degrees) - -
-
- Transforms degrees to radians. - -
- Defined in: misc.js. - - -
- - - - -
-
Parameters:
- -
- {Number} degrees - -
-
value in degrees
- -
- - - - - -
-
Returns:
- -
{Number} value in radians
- -
- - - - -
- - -
<static> - - {Boolean} - fabric.util.falseFunction() - -
-
- Function which always returns `false`. - -
- Defined in: misc.js. - - -
- - - - - - - - -
-
Returns:
- -
{Boolean}
- -
- - - - -
- - -
<static> - - - fabric.util.fireEvent(eventName, memo) - -
-
- Fires event with an optional memo object - -
- Defined in: dom_event.js. - - -
- - - - -
-
Parameters:
- -
- {String} eventName - -
-
- -
- {Object} memo - Optional -
-
- -
- - - - - - - - -
- - -
<static> - - - fabric.util.getPointer(event) - -
-
- Cross-browser wrapper for getting event's coordinates - -
- Defined in: dom_event.js. - - -
- - - - -
-
Parameters:
- -
- {Event} event - -
-
- -
- - - - - - - - -
- - -
<static> - - {Number} - fabric.util.getRandomInt(min, max) - -
-
- Returns random number between 2 specified ones. - -
- Defined in: misc.js. - - -
- - - - -
-
Parameters:
- -
- {Number} min - -
-
lower limit
- -
- {Number} max - -
-
upper limit
- -
- - - - - -
-
Returns:
- -
{Number} random value (between min and max)
- -
- - - - -
- - -
<static> - - - fabric.util.observeEvent(eventName, handler) - -
-
- - -
- Defined in: dom_event.js. - - -
- - - - -
-
Parameters:
- -
- {String} eventName - -
-
- -
- {Function} handler - -
-
- -
- - - - - - - - -
- - -
<static> - - {Array} - fabric.util.removeFromArray(array, value) - -
-
- Removes value from an array. -Presence of value (and its position in an array) is determined via `Array.prototype.indexOf` - -
- Defined in: misc.js. - - -
- - - - -
-
Parameters:
- -
- {Array} array - -
-
- -
- {Any} value - -
-
- -
- - - - - -
-
Returns:
- -
{Array} original array
- -
- - - - -
- - -
<static> - - - fabric.util.removeListener(element, eventName, handler) - -
-
- Removes an event listener from an element - -
- Defined in: dom_event.js. - - -
- - - - -
-
Parameters:
- -
- {HTMLElement} element - -
-
- -
- {String} eventName - -
-
- -
- {Function} handler - -
-
- -
- - - - - - - - -
- - -
<static> - - {Number} - fabric.util.toFixed(number, fractionDigits) - -
-
- A wrapper around Number#toFixed, which contrary to native method returns number, not string. - -
- Defined in: misc.js. - - -
- - - - -
-
Parameters:
- -
- {Number | String} number - -
-
number to operate on
- -
- {Number} fractionDigits - -
-
number of fraction digits to "leave"
- -
- - - - - -
-
Returns:
- -
{Number}
- -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 21:41:43 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.util.object.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.util.object.html deleted file mode 100644 index b61152e2..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.util.object.html +++ /dev/null @@ -1,468 +0,0 @@ - - - - - - - JsDoc Reference - fabric.util.object - - - - - - - - - - - - - -
- -

- - Namespace fabric.util.object -

- - -

- - - - fabric.util.object - - -
Defined in: lang_object.js. - -

- - - - - - - - - - - - - - - - - -
Namespace Summary
Constructor AttributesConstructor Name and Description
  - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
<static>   -
fabric.util.object.clone(object) -
-
Creates an empty object and copies all enumerable properties of another object to it
-
<static>   -
fabric.util.object.extend(destination, source) -
-
Copies all enumerable properties of one object to another
-
- - - - - - - - - -
-
- Namespace Detail -
- -
- fabric.util.object -
- -
- - -
- - - - - - - - - - - - -
- - - - - - - -
- Method Detail -
- - -
<static> - - - fabric.util.object.clone(object) - -
-
- Creates an empty object and copies all enumerable properties of another object to it - - -
- - - - -
-
Parameters:
- -
- {Object} object - -
-
Object to clone
- -
- - - - - - - - -
- - -
<static> - - - fabric.util.object.extend(destination, source) - -
-
- Copies all enumerable properties of one object to another - - -
- - - - -
-
Parameters:
- -
- {Object} destination - -
-
Where to copy to
- -
- {Object} source - -
-
Where to copy from
- -
- - - - - - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 21:41:43 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.util.string.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.util.string.html deleted file mode 100644 index a3d0fa21..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/fabric.util.string.html +++ /dev/null @@ -1,476 +0,0 @@ - - - - - - - JsDoc Reference - fabric.util.string - - - - - - - - - - - - - -
- -

- - Namespace fabric.util.string -

- - -

- - - - - - -
Defined in: lang_string.js. - -

- - - - - - - - - - - - - - - - - -
Namespace Summary
Constructor AttributesConstructor Name and Description
  - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
<static>   -
fabric.util.string.camelize(string) -
-
Camelizes a string
-
<static>   -
fabric.util.string.capitalize(string) -
-
Capitalizes a string
-
- - - - - - - - - -
-
- Namespace Detail -
- -
- fabric.util.string -
- -
- - -
- - - - - - - - - - - - -
- - - - - - - -
- Method Detail -
- - -
<static> - - {String} - fabric.util.string.camelize(string) - -
-
- Camelizes a string - - -
- - - - -
-
Parameters:
- -
- {String} string - -
-
String to camelize
- -
- - - - - -
-
Returns:
- -
{String} Camelized version of a string
- -
- - - - -
- - -
<static> - - {String} - fabric.util.string.capitalize(string) - -
-
- Capitalizes a string - - -
- - - - -
-
Parameters:
- -
- {String} string - -
-
String to capitalize
- -
- - - - - -
-
Returns:
- -
{String} Capitalized version of a string
- -
- - - - - - - - - - - -
-
- - - -
- - Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 14 2010 21:41:43 GMT-0400 (EDT) -
- - diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_fabric.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_fabric.js.html deleted file mode 100644 index d7ae42e7..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_fabric.js.html +++ /dev/null @@ -1,67 +0,0 @@ -
  1 /*! Fabric.js Copyright 2010, Bitsonnet (Juriy Zaytsev, Maxim Chernyak) */
-  2 
-  3 var fabric = fabric || { version: 0.1 };
-  4 
-  5 /**
-  6  * Wrapper around `console.log` (when available)
-  7  * @method log
-  8  * @param {Any} Values to log
-  9  */
- 10 fabric.log = function() { };
- 11 
- 12 /**
- 13  * Wrapper around `console.warn` (when available)
- 14  * @method warn
- 15  * @param {Any} Values to log as a warning
- 16  */
- 17 fabric.warn = function() { };
- 18 
- 19 if (typeof console !== 'undefined') {
- 20   if (typeof console.log !== 'undefined' && console.log.apply) {
- 21     fabric.log = function() { 
- 22       return console.log.apply(console, arguments);
- 23     };
- 24   }
- 25   if (typeof console.warn !== 'undefined' && console.warn.apply) {
- 26     fabric.warn = function() { 
- 27       return console.warn.apply(console, arguments);
- 28     };
- 29   }
- 30 }
- 31 
- 32 //= require "lib/json2"
- 33 
- 34 //= require "src/util"
- 35 //= require "src/parser"
- 36                  
- 37 //= require "src/point.class"
- 38 //= require "src/intersection.class"
- 39 
- 40 //= require "src/color.class"
- 41 
- 42 //= require "src/element.class"
- 43 
- 44 //= require "src/object.class"
- 45 //= require "src/line.class"
- 46 //= require "src/circle.class"
- 47 //= require "src/triangle.class"
- 48 //= require "src/ellipse.class"
- 49 //= require "src/rect.class"
- 50 //= require "src/polyline.class"
- 51 //= require "src/polygon.class"
- 52 
- 53 //= require "src/path.class"
- 54 //= require "src/path_group.class"
- 55 
- 56 //= require "src/group.class"
- 57 
- 58 //= require "src/text.class"
- 59 
- 60 //= require "src/image.class"
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_circle.class.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_circle.class.js.html deleted file mode 100644 index 0e78bb5a..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_circle.class.js.html +++ /dev/null @@ -1,133 +0,0 @@ -
  1 //= require "object.class"
-  2 
-  3 (function() {
-  4   
-  5   var fabric  = this.fabric || (this.fabric = { }),
-  6       piBy2   = Math.PI * 2,
-  7       extend = fabric.util.object.extend;
-  8   
-  9   if (fabric.Circle) {
- 10     fabric.warn('fabric.Circle is already defined.');
- 11     return;
- 12   }
- 13 
- 14   /** 
- 15    * @class Circle
- 16    * @extends fabric.Object
- 17    */
- 18   fabric.Circle = fabric.util.createClass(fabric.Object, /** @scope fabric.Circle.prototype */ {
- 19     
- 20     /** @property */
- 21     type: 'circle',
- 22     
- 23     /**
- 24      * Constructor
- 25      * @method initialize
- 26      * @param {Object} [options] Options object
- 27      * @return {fabric.Circle} thisArg
- 28      */
- 29     initialize: function(options) {
- 30       options = options || { };
- 31       
- 32       this.set('radius', options.radius || 0);
- 33       this.callSuper('initialize', options);
- 34       
- 35       var radiusBy2ByScale = this.get('radius') * 2 * this.get('scaleX');
- 36       this.set('width', radiusBy2ByScale).set('height', radiusBy2ByScale);
- 37     },
- 38     
- 39     /**
- 40      * Returns object representation of an instance
- 41      * @method toObject
- 42      * @return {Object} object representation of an instance
- 43      */
- 44     toObject: function() {
- 45       return extend(this.callSuper('toObject'), {
- 46         radius: this.get('radius')
- 47       });
- 48     },
- 49     
- 50     /**
- 51      * @private
- 52      * @method _render
- 53      * @param ctx {CanvasRenderingContext2D} context to render on
- 54      */
- 55     _render: function(ctx, noTransform) {
- 56       ctx.beginPath();
- 57       ctx.arc(noTransform ? this.left : 0, noTransform ? this.top : 0, this.radius, 0, piBy2, false);
- 58       ctx.closePath();
- 59       if (this.fill) {
- 60         ctx.fill();
- 61       }
- 62       if (this.stroke) {
- 63         ctx.stroke();
- 64       }
- 65     },
- 66     
- 67     
- 68     /**
- 69      * Returns complexity of an instance
- 70      * @method complexity
- 71      * @return {Number} complexity of this instance
- 72      */
- 73     complexity: function() {
- 74       return 1;
- 75     }
- 76   });
- 77   
- 78   /**
- 79    * List of attribute names to account for when parsing SVG element (used by `fabric.Circle.fromElement`)
- 80    * @static
- 81    * @see: http://www.w3.org/TR/SVG/shapes.html#CircleElement
- 82    */
- 83   fabric.Circle.ATTRIBUTE_NAMES = 'cx cy r fill fill-opacity stroke stroke-width transform'.split(' ');
- 84   
- 85   /**
- 86    * Returns fabric.Circle instance from an SVG element
- 87    * @static
- 88    * @method fabric.Circle.fromElement
- 89    * @param element {SVGElement} element to parse
- 90    * @param options {Object} options object
- 91    * @throws {Error} If value of `r` attribute is missing or invalid
- 92    * @return {Object} instance of fabric.Circle
- 93    */
- 94   fabric.Circle.fromElement = function(element, options) {
- 95     options || (options = { });
- 96     var parsedAttributes = fabric.parseAttributes(element, fabric.Circle.ATTRIBUTE_NAMES);
- 97     if (!isValidRadius(parsedAttributes)) {
- 98       throw Error('value of `r` attribute is required and can not be negative');
- 99     }
-100     if ('left' in parsedAttributes) {
-101       parsedAttributes.left -= (options.width / 2) || 0;
-102     }
-103     if ('top' in parsedAttributes) {
-104       parsedAttributes.top -= (options.height / 2) || 0;
-105     }
-106     return new fabric.Circle(extend(parsedAttributes, options));
-107   };
-108   
-109   /**
-110    * @private
-111    */
-112   function isValidRadius(attributes) {
-113     return (('radius' in attributes) && (attributes.radius > 0));
-114   }
-115   
-116   /**
-117    * Returns fabric.Circle instance from an object representation
-118    * @static
-119    * @method fabric.Circle.fromObject
-120    * @param {Object} object Object to create an instance from
-121    * @return {Object} Instance of fabric.Circle
-122    */
-123   fabric.Circle.fromObject = function(object) {
-124     return new fabric.Circle(object);
-125   }
-126 })();
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_color.class.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_color.class.js.html deleted file mode 100644 index ba52cf84..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_color.class.js.html +++ /dev/null @@ -1,285 +0,0 @@ -
  1 (function() {
-  2   
-  3   var fabric = this.fabric || (this.fabric = { });
-  4   
-  5   if (fabric.Color) {
-  6     fabric.warn('fabric.Color is already defined.');
-  7     return;
-  8   }
-  9   
- 10   /**
- 11    * The purpose of fabric.Color is to abstract and encapsulate common color operations;
- 12    * fabric.Color is a constructor and creates instances of fabric.Color objects.
- 13    *
- 14    * @class Color
- 15    * @memberOf fabric
- 16    * @param {String} color (optional) in hex or rgb(a) format
- 17    */
- 18   function Color(color) {
- 19     if (!color) {
- 20       this.setSource([0, 0, 0, 1]);
- 21     }
- 22     else {
- 23       this._tryParsingColor(color);
- 24     }
- 25   }
- 26   
- 27   fabric.Color = Color;
- 28   
- 29   fabric.Color.prototype = /** @scope fabric.Color.prototype */ {
- 30     
- 31     /**
- 32      * @private
- 33      * @method _tryParsingColor
- 34      */
- 35     _tryParsingColor: function(color) {
- 36       var source = Color.sourceFromHex(color);
- 37       if (!source) {
- 38         source = Color.sourceFromRgb(color);
- 39       }
- 40       if (source) {
- 41         this.setSource(source);
- 42       }
- 43     },
- 44 
- 45     /**
- 46      * Returns source of this color (where source is an array representation; ex: [200, 200, 100, 1])
- 47      * @method getSource
- 48      * @return {Array}
- 49      */
- 50     getSource: function() {
- 51       return this._source;
- 52     },
- 53 
- 54     /**
- 55      * Sets source of this color (where source is an array representation; ex: [200, 200, 100, 1])
- 56      * @method setSource
- 57      * @param {Array} source
- 58      */
- 59     setSource: function(source) {
- 60       this._source = source;
- 61     },
- 62 
- 63     /**
- 64      * Returns color represenation in RGB format
- 65      * @method toRgb
- 66      * @return {String} ex: rgb(0-255,0-255,0-255)
- 67      */
- 68     toRgb: function() {
- 69       var source = this.getSource();
- 70       return 'rgb(' + source[0] + ',' + source[1] + ',' + source[2] + ')';
- 71     },
- 72 
- 73     /**
- 74      * Returns color represenation in RGBA format
- 75      * @method toRgba
- 76      * @return {String} ex: rgba(0-255,0-255,0-255,0-1)
- 77      */
- 78     toRgba: function() {
- 79       var source = this.getSource();
- 80       return 'rgba(' + source[0] + ',' + source[1] + ',' + source[2] + ',' + source[3] + ')';
- 81     },
- 82 
- 83     /**
- 84      * Returns color represenation in HEX format
- 85      * @method toHex
- 86      * @return {String} ex: FF5555
- 87      */
- 88     toHex: function() {
- 89       var source = this.getSource();
- 90 
- 91       var r = source[0].toString(16);
- 92       r = (r.length == 1) ? ('0' + r) : r;
- 93 
- 94       var g = source[1].toString(16);
- 95       g = (g.length == 1) ? ('0' + g) : g;
- 96 
- 97       var b = source[2].toString(16);
- 98       b = (b.length == 1) ? ('0' + b) : b;
- 99 
-100       return r.toUpperCase() + g.toUpperCase() + b.toUpperCase();
-101     },
-102 
-103     /**
-104      * Gets value of alpha channel for this color 
-105      * @method getAlpha
-106      * @return {Number} 0-1
-107      */
-108     getAlpha: function() {
-109       return this.getSource()[3];
-110     },
-111 
-112     /**
-113      * Sets value of alpha channel for this color
-114      * @method setAlpha
-115      * @param {Number} 0-1
-116      * @return {fabric.Color} thisArg
-117      */
-118     setAlpha: function(alpha) {
-119       var source = this.getSource();
-120       source[3] = alpha;
-121       this.setSource(source);
-122       return this;
-123     },
-124 
-125     /**
-126      * Transforms color to its grayscale representation
-127      * @method toGrayscale
-128      * @return {fabric.Color} thisArg
-129      */
-130     toGrayscale: function() {
-131       var source = this.getSource(),
-132           average = parseInt((source[0] * 0.3 + source[1] * 0.59 + source[2] * 0.11).toFixed(0), 10),
-133           currentAlpha = source[3];
-134       this.setSource([average, average, average, currentAlpha]);
-135       return this;
-136     },
-137 
-138     /**
-139      * Transforms color to its black and white representation
-140      * @method toGrayscale
-141      * @return {fabric.Color} thisArg
-142      */
-143     toBlackWhite: function(threshold) {
-144       var source = this.getSource(),
-145           average = (source[0] * 0.3 + source[1] * 0.59 + source[2] * 0.11).toFixed(0),
-146           currentAlpha = source[3],
-147           threshold = threshold || 127;
-148 
-149       average = (Number(average) < Number(threshold)) ? 0 : 255;
-150       this.setSource([average, average, average, currentAlpha]);
-151       return this;
-152     },
-153 
-154     /**
-155      * Overlays color with another color
-156      * @method overlayWith
-157      * @param {String|fabric.Color} otherColor
-158      * @return {fabric.Color} thisArg
-159      */
-160     overlayWith: function(otherColor) {
-161       if (!(otherColor instanceof Color)) {
-162         otherColor = new Color(otherColor);
-163       }
-164 
-165       var result = [],
-166           alpha = this.getAlpha(),
-167           otherAlpha = 0.5,
-168           source = this.getSource(),
-169           otherSource = otherColor.getSource();
-170 
-171       for (var i = 0; i < 3; i++) {
-172         result.push(Math.round((source[i] * (1 - otherAlpha)) + (otherSource[i] * otherAlpha)));
-173       }
-174 
-175       result[4] = alpha;
-176       this.setSource(result);
-177       return this;
-178     }
-179   };
-180   
-181   /**
-182    * Regex matching color in RGB or RGBA formats (ex: rgb(0, 0, 0), rgb(255, 100, 10, 0.5), rgb(1,1,1))
-183    * @static
-184    * @field
-185    */
-186   fabric.Color.reRGBa = /^rgba?\((\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})(?:\s*,\s*(\d+(?:\.\d+)?))?\)$/;
-187   
-188   /**
-189    * Regex matching color in HEX format (ex: #FF5555, 010155, aff)
-190    * @static
-191    * @field
-192    */
-193   fabric.Color.reHex = /^#?([0-9a-f]{6}|[0-9a-f]{3})$/i;
-194 
-195   /**
-196    * Returns new color object, when given a color in RGB format
-197    * @method fromRgb
-198    * @param {String} color ex: rgb(0-255,0-255,0-255)
-199    * @return {fabric.Color}
-200    */
-201   fabric.Color.fromRgb = function(color) {
-202     return Color.fromSource(Color.sourceFromRgb(color));
-203   };
-204   
-205   /**
-206    * Returns array represenatation (ex: [100, 100, 200, 1]) of a color that's in RGB or RGBA format
-207    * @method sourceFromRgb
-208    * @param {String} color ex: rgb(0-255,0-255,0-255)
-209    * @return {Array} source
-210    */
-211   fabric.Color.sourceFromRgb = function(color) {
-212     var match = color.match(Color.reRGBa);
-213     if (match) {
-214       return [
-215         parseInt(match[1], 10),
-216         parseInt(match[2], 10),
-217         parseInt(match[3], 10),
-218         match[4] ? parseFloat(match[4]) : 1
-219       ];
-220     }
-221   };
-222 
-223   /**
-224    * Returns new color object, when given a color in RGBA format
-225    * @static
-226    * @function
-227    * @method fromRgba
-228    * @param {String} color
-229    * @return {fabric.Color}
-230    */
-231   fabric.Color.fromRgba = Color.fromRgb;
-232 
-233   /**
-234    * Returns new color object, when given a color in HEX format
-235    * @static
-236    * @method fromHex
-237    * @return {fabric.Color}
-238    */
-239   fabric.Color.fromHex = function(color) {
-240     return Color.fromSource(Color.sourceFromHex(color));
-241   };
-242   
-243   /**
-244    * Returns array represenatation (ex: [100, 100, 200, 1]) of a color that's in HEX format
-245    * @static
-246    * @method sourceFromHex
-247    * @param {String} color ex: FF5555
-248    * @return {Array} source
-249    */
-250   fabric.Color.sourceFromHex = function(color) {
-251     if (color.match(Color.reHex)) {
-252       var value = color.slice(color.indexOf('#') + 1),
-253           isShortNotation = (value.length === 3),
-254           r = isShortNotation ? (value.charAt(0) + value.charAt(0)) : value.substring(0, 2),
-255           g = isShortNotation ? (value.charAt(1) + value.charAt(1)) : value.substring(2, 4),
-256           b = isShortNotation ? (value.charAt(2) + value.charAt(2)) : value.substring(4, 6);
-257 
-258       return [
-259         parseInt(r, 16),
-260         parseInt(g, 16),
-261         parseInt(b, 16),
-262         1
-263       ];
-264     }
-265   };
-266   
-267   /**
-268    * Returns new color object, when given color in array representation (ex: [200, 100, 100, 0.5])
-269    * @static
-270    * @method fromSource
-271    * @return {fabric.Color}
-272    */
-273   fabric.Color.fromSource = function(source) {
-274     var oColor = new Color();
-275     oColor.setSource(source);
-276     return oColor;
-277   };
-278 })();
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_element.class.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_element.class.js.html deleted file mode 100644 index 63fd8832..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_element.class.js.html +++ /dev/null @@ -1,2381 +0,0 @@ -
  1 (function () {
-  2   
-  3   if (fabric.Element) {
-  4     fabric.warn('fabric.Element is already defined.');
-  5     return;
-  6   }
-  7   
-  8   var global = this,
-  9       window = global.window,
- 10       document = window.document,
- 11       
- 12       // aliases for faster resolution
- 13       extend = fabric.util.object.extend,
- 14       capitalize = fabric.util.string.capitalize,
- 15       camelize = fabric.util.string.camelize,
- 16       fireEvent = fabric.util.fireEvent,
- 17       getPointer = fabric.util.getPointer,
- 18       getElementOffset = fabric.util.getElementOffset,
- 19       removeFromArray = fabric.util.removeFromArray,
- 20       addListener = fabric.util.addListener,
- 21       removeListener = fabric.util.removeListener,
- 22       
- 23       utilMin = fabric.util.array.min,
- 24       utilMax = fabric.util.array.max,
- 25       
- 26       sqrt = Math.sqrt,
- 27       pow = Math.pow,
- 28       atan2 = Math.atan2,
- 29       abs = Math.abs,
- 30       min = Math.min,
- 31       max = Math.max,
- 32       
- 33       CANVAS_INIT_ERROR = new Error('Could not initialize `canvas` element'),
- 34       FX_DURATION = 500,
- 35       STROKE_OFFSET = 0.5,
- 36       FX_TRANSITION = 'decel',
- 37       
- 38       cursorMap = {
- 39         'tr': 'ne-resize',
- 40         'br': 'se-resize',
- 41         'bl': 'sw-resize',
- 42         'tl': 'nw-resize',
- 43         'ml': 'w-resize',
- 44         'mt': 'n-resize',
- 45         'mr': 'e-resize',
- 46         'mb': 's-resize'
- 47       };
- 48   
- 49   /**
- 50    * @class fabric.Element
- 51    * @constructor
- 52    * @param {HTMLElement | String} el <canvas> element to initialize instance on
- 53    * @param {Object} [options] Options object
- 54    */
- 55   fabric.Element = function (el, options) {
- 56     
- 57     /**
- 58      * The object literal containing mouse position if clicked in an empty area (no image)
- 59      * @property _groupSelector
- 60      * @type object
- 61      */
- 62     this._groupSelector = null;
- 63 
- 64     /**
- 65      * The array literal containing all objects on canvas
- 66      * @property _objects
- 67      * @type array
- 68      */
- 69     this._objects = [];
- 70 
- 71     /**
- 72      * The element that references the canvas interface implementation
- 73      * @property _context
- 74      * @type object
- 75      */
- 76     this._context = null;
- 77 
- 78     /**
- 79      * The main element that contains the canvas
- 80      * @property _element
- 81      * @type object
- 82      */
- 83     this._element = null;
- 84 
- 85     /**
- 86      * The object literal containing the current x,y params of the transformation
- 87      * @property _currentTransform
- 88      * @type object
- 89      */
- 90     this._currentTransform = null;
- 91     
- 92     /**
- 93      * References instance of fabric.Group - when multiple objects are selected
- 94      * @property _activeGroup
- 95      * @type object
- 96      */
- 97     this._activeGroup = null;
- 98     
- 99     /**
-100      * X coordinates of a path, captured during free drawing
-101      */
-102     this._freeDrawingXPoints = [ ];
-103     
-104     /**
-105      * Y coordinates of a path, captured during free drawing
-106      */
-107     this._freeDrawingYPoints = [ ];
-108     
-109      /**
-110       * An object containing config parameters
-111       * @property _config
-112       * @type object
-113       */
-114     this._config = { 
-115       width: 300, 
-116       height: 150 
-117     };
-118     
-119     config = config || { };
-120     
-121     this._initElement(el);
-122     this._initConfig(config);
-123     
-124     if (config.overlayImage) {
-125       this.setOverlayImage(config.overlayImage);
-126     }
-127     
-128     if (config.afterRender) {
-129       this.afterRender = config.afterRender;
-130     }
-131     
-132     this._createCanvasBackground();
-133     this._createCanvasContainer();
-134     this._initEvents();
-135     this.calcOffset();
-136   };
-137   
-138   extend(fabric.Element.prototype, /** @scope fabric.Element.prototype */ {
-139     
-140     /**
-141      * @property
-142      * @type String
-143      */
-144     selectionColor:         'rgba(100, 100, 255, 0.3)', // blue
-145     
-146     /**
-147      * @property
-148      * @type String
-149      */
-150     selectionBorderColor:   'rgba(255, 255, 255, 0.3)',
-151     
-152     /**
-153      * @property
-154      * @type String
-155      */
-156     freeDrawingColor:       'rgb(0, 0, 0)',
-157     
-158     /**
-159      * @property
-160      * @type String
-161      */
-162     backgroundColor:        'rgba(0, 0, 0, 0)',
-163     
-164     /**
-165      * @property
-166      * @type Number
-167      */
-168     freeDrawingLineWidth:   1,
-169     
-170     /**
-171      * @property
-172      * @type Number
-173      */
-174     selectionLineWidth:     1,
-175     
-176     /**
-177      * @property
-178      * @type Boolean
-179      */
-180     includeDefaultValues:   true,
-181     
-182     /**
-183      * @property
-184      * @type Boolean
-185      */
-186     shouldCacheImages:      false,
-187     
-188     /**
-189      * @constant
-190      * @type Number
-191      */
-192     CANVAS_WIDTH:           600,
-193     
-194     /**
-195      * @constant
-196      * @type Number
-197      */
-198     CANVAS_HEIGHT:          600,
-199     
-200     /**
-201      * Callback; invoked right before object is about to be scaled/rotated
-202      * @method onBeforeScaleRotate
-203      * @param {fabric.Object} target Object that's about to be scaled/rotated
-204      */
-205     onBeforeScaleRotate: function (target) {
-206       /* NOOP */
-207     },
-208     
-209     /**
-210      * Callback; invoked on every redraw of canvas and is being passed a number indicating current fps
-211      * @method onFpsUpdate
-212      * @param {Number} fps
-213      */
-214     onFpsUpdate: function(fps) {
-215       /* NOOP */
-216     },
-217     
-218     /**
-219      * Calculates canvas element offset relative to the document
-220      * This method is also attached as "resize" event handler of window
-221      * @method calcOffset
-222      * @return {fabric.Element} instance
-223      * @chainable
-224      */
-225     calcOffset: function () {
-226       this._offset = getElementOffset(this.getElement());
-227       return this;
-228     },
-229     
-230     /**
-231      * Sets overlay image for this canvas
-232      * @method setOverlayImage
-233      * @param {String} url url of an image to set background to
-234      * @param {Function} callback callback to invoke when image is loaded and set as an overlay one
-235      * @return {fabric.Element} thisArg
-236      * @chainable
-237      */
-238     setOverlayImage: function (url, callback) { // TODO (kangax): test callback
-239       if (url) {
-240         var _this = this, img = new Image();
-241         
-242         /** @ignore */
-243         img.onload = function () { 
-244           _this.overlayImage = img;
-245           if (callback) {
-246             callback();
-247           }
-248           img = img.onload = null;
-249         };
-250         img.src = url;
-251       }
-252       return this;
-253     },
-254     
-255     /**
-256      * Canvas class' initialization method; Automatically called by constructor;
-257      * Sets up all DOM references for pre-existing markup and creates required markup if it's not yet created.
-258      * already present.
-259      * @method _initElement
-260      * @param {HTMLElement|String} canvasEl Canvas element
-261      * @throws {CANVAS_INIT_ERROR} If canvas can not be initialized
-262      */
-263     _initElement: function (canvasEl) {
-264       var el = fabric.util.getById(canvasEl);
-265       this._element = el || document.createElement('canvas');
-266       
-267       if (typeof this._element.getContext === 'undefined' && typeof G_vmlCanvasManager !== 'undefined') {
-268         G_vmlCanvasManager.initElement(this._element);
-269       }
-270       if (typeof this._element.getContext === 'undefined') {
-271         throw CANVAS_INIT_ERROR;
-272       }
-273       if (!(this.contextTop = this._element.getContext('2d'))) {
-274         throw CANVAS_INIT_ERROR;
-275       }
-276       
-277       var width = this._element.width || 0,
-278           height = this._element.height || 0;
-279       
-280       this._initWrapperElement(width, height);
-281       this._setElementStyle(width, height);
-282     },
-283     
-284     /**
-285      * @private
-286      * @method _initWrapperElement
-287      * @param {Number} width
-288      * @param {Number} height
-289      */
-290     _initWrapperElement: function (width, height) {
-291       var wrapper = fabric.util.wrapElement(this.getElement(), 'div', { 'class': 'canvas_container' });
-292       fabric.util.setStyle(wrapper, {
-293         width: width + 'px',
-294         height: height + 'px'
-295       });
-296       fabric.util.makeElementUnselectable(wrapper);
-297       this.wrapper = wrapper;
-298     },
-299     
-300     /**
-301      * @private
-302      * @method _setElementStyle
-303      * @param {Number} width
-304      * @param {Number} height
-305      */
-306     _setElementStyle: function (width, height) {
-307       fabric.util.setStyle(this.getElement(), {
-308         position: 'absolute',
-309         width: width + 'px',
-310         height: height + 'px',
-311         left: 0,
-312         top: 0
-313       });
-314     },
-315 
-316     /**
-317      * For now, use an object literal without methods to store the config params
-318      * @method _initConfig
-319      * @param config {Object} userConfig The configuration Object literal 
-320      * containing the configuration that should be set for this module;
-321      * See configuration documentation for more details.
-322      */
-323     _initConfig: function (config) {
-324       extend(this._config, config || { });
-325       
-326       this._config.width = parseInt(this._element.width, 10) || 0;
-327       this._config.height = parseInt(this._element.height, 10) || 0;
-328 
-329       this._element.style.width = this._config.width + 'px';
-330       this._element.style.height = this._config.height + 'px';
-331     },
-332 
-333     /**
-334      * Adds mouse listeners to  canvas
-335      * @method _initEvents
-336      * @private
-337      * See configuration documentation for more details.
-338      */
-339     _initEvents: function () {
-340       
-341       var _this = this;
-342       
-343       this._onMouseDown = function (e) { _this.__onMouseDown(e); };
-344       this._onMouseUp = function (e) { _this.__onMouseUp(e); };
-345       this._onMouseMove = function (e) { _this.__onMouseMove(e); };
-346       this._onResize = function (e) { _this.calcOffset() };
-347       
-348       addListener(this._element, 'mousedown', this._onMouseDown);
-349       addListener(document, 'mousemove', this._onMouseMove);
-350       addListener(document, 'mouseup', this._onMouseUp);
-351       addListener(window, 'resize', this._onResize);
-352     },
-353     
-354     /**
-355      * Creates canvas elements
-356      * @method _createCanvasElement
-357      * @private
-358      */
-359     _createCanvasElement: function (className) {
-360         
-361       var element = document.createElement('canvas');
-362       if (!element) {
-363         return;
-364       }
-365       
-366       element.className = className;
-367       var oContainer = this._element.parentNode.insertBefore(element, this._element);
-368       
-369       oContainer.width = this.getWidth();
-370       oContainer.height = this.getHeight();
-371       oContainer.style.width = this.getWidth() + 'px';
-372       oContainer.style.height = this.getHeight() + 'px';
-373       oContainer.style.position = 'absolute';
-374       oContainer.style.left = 0;
-375       oContainer.style.top = 0;
-376       
-377       if (typeof element.getContext === 'undefined' && typeof G_vmlCanvasManager !== 'undefined') {
-378         // try augmenting element with excanvas' G_vmlCanvasManager
-379         G_vmlCanvasManager.initElement(element);
-380       }
-381       if (typeof element.getContext === 'undefined') {
-382         // if that didn't work, throw error
-383         throw CANVAS_INIT_ERROR;
-384       }
-385       fabric.util.makeElementUnselectable(oContainer);
-386       return oContainer;
-387     },
-388 
-389     /**
-390      * Creates a secondary canvas to contain all the images are not being translated/rotated/scaled
-391      * @method _createCanvasContainer
-392      */
-393     _createCanvasContainer: function () {
-394       var canvas = this._createCanvasElement('canvas-container');
-395       this.contextContainerEl = canvas;
-396       this.contextContainer = canvas.getContext('2d');
-397     },
-398 
-399     /**
-400      * Creates a "background" canvas
-401      * @method _createCanvasBackground
-402      */
-403     _createCanvasBackground: function () {
-404       var canvas = this._createCanvasElement('canvas-container');
-405       this._contextBackgroundEl = canvas;
-406       this._contextBackground = canvas.getContext('2d');
-407     },
-408     
-409     /**
-410      * Returns canvas width
-411      * @method getWidth
-412      * @return {Number}
-413      */
-414     getWidth: function () {
-415       return this._config.width;
-416     },
-417     
-418     /**
-419      * Returns canvas height
-420      * @method getHeight
-421      * @return {Number}
-422      */
-423     getHeight: function () {
-424       return this._config.height;
-425     },
-426     
-427     /**
-428      * Sets width of this canvas instance
-429      * @method setWidth
-430      * @param {Number} width value to set width to
-431      * @return {fabric.Element} instance
-432      * @chainable true
-433      */
-434     setWidth: function (value) {
-435       return this._setDimension('width', value);
-436     },
-437     
-438     /**
-439      * Sets height of this canvas instance
-440      * @method setHeight
-441      * @param {Number} height value to set height to
-442      * @return {fabric.Element} instance
-443      * @chainable true
-444      */
-445     setHeight: function (value) {
-446       return this._setDimension('height', value);
-447     },
-448     
-449     /**
-450      * Sets dimensions (width, height) of this canvas instance
-451      * @method setDimensions
-452      * @param {Object} dimensions
-453      * @return {fabric.Element} thisArg
-454      * @chainable
-455      */
-456     setDimensions: function(dimensions) {
-457       for (var prop in dimensions) {
-458         this._setDimension(prop, dimensions[prop]);
-459       }
-460       return this;
-461     },
-462     
-463     /**
-464      * Helper for setting width/height
-465      * @private
-466      * @method _setDimensions
-467      * @param {String} prop property (width|height)
-468      * @param {Number} value value to set property to
-469      * @return {fabric.Element} instance
-470      * @chainable true
-471      */
-472     _setDimension: function (prop, value) {
-473       this.contextContainerEl[prop] = value;
-474       this.contextContainerEl.style[prop] = value + 'px';
-475       
-476       this._contextBackgroundEl[prop] = value;
-477       this._contextBackgroundEl.style[prop] = value + 'px';
-478       
-479       this._element[prop] = value;
-480       this._element.style[prop] = value + 'px';
-481       
-482       // <DIV> container (parent of all <CANVAS> elements)
-483       this._element.parentNode.style[prop] = value + 'px';
-484       
-485       this._config[prop] = value;
-486       this.calcOffset();
-487       this.renderAll();
-488       
-489       return this;
-490     },
-491     
-492     /**
-493      * Method that defines the actions when mouse is released on canvas.
-494      * The method resets the currentTransform parameters, store the image corner
-495      * position in the image object and render the canvas on top.
-496      * @method __onMouseUp
-497      * @param {Event} e Event object fired on mouseup
-498      *
-499      */
-500     __onMouseUp: function (e) {
-501       
-502       if (this.isDrawingMode && this._isCurrentlyDrawing) {
-503         this._finalizeDrawingPath();
-504         return;
-505       }
-506       
-507       if (this._currentTransform) {
-508         
-509         var transform = this._currentTransform,
-510             target = transform.target;
-511             
-512         if (target._scaling) {
-513           fireEvent('object:scaled', { target: target });
-514           target._scaling = false;
-515         }
-516         
-517         // determine the new coords everytime the image changes its position
-518         var i = this._objects.length;
-519         while (i--) {
-520           this._objects[i].setCoords();
-521         }
-522         
-523         // only fire :modified event if target coordinates were changed during mousedown-mouseup
-524         if (target.hasStateChanged()) {
-525           target.isMoving = false;
-526           fireEvent('object:modified', { target: target });
-527         }
-528       }
-529       
-530       this._currentTransform = null;
-531       
-532       if (this._groupSelector) {
-533         // group selection was completed, determine its bounds
-534         this._findSelectedObjects(e);
-535       }
-536       var activeGroup = this.getActiveGroup();
-537       if (activeGroup) {
-538         if (activeGroup.hasStateChanged() && 
-539             activeGroup.containsPoint(this.getPointer(e))) {
-540           fireEvent('group:modified', { target: activeGroup });
-541         }
-542         activeGroup.setObjectsCoords();
-543         activeGroup.set('isMoving', false);
-544         this._setCursor('default');
-545       }
-546       
-547       // clear selection
-548       this._groupSelector = null;
-549       this.renderAll();
-550       
-551       this._setCursorFromEvent(e, target);
-552       // fix for FF
-553       this._setCursor('');
-554       
-555       var _this = this;
-556       setTimeout(function () {
-557         _this._setCursorFromEvent(e, target);
-558       }, 50);
-559     },
-560     
-561     _shouldClearSelection: function (e) {
-562       var target = this.findTarget(e),
-563           activeGroup = this.getActiveGroup();
-564       return (
-565         !target || (
-566           target && 
-567           activeGroup && 
-568           !activeGroup.contains(target) && 
-569           activeGroup !== target && 
-570           !e.shiftKey
-571         )
-572       );
-573     },
-574 
-575     /**
-576      * Method that defines the actions when mouse is clic ked on canvas.
-577      * The method inits the currentTransform parameters and renders all the
-578      * canvas so the current image can be placed on the top canvas and the rest
-579      * in on the container one.
-580      * @method __onMouseDown
-581      * @param e {Event} Event object fired on mousedown
-582      *
-583      */
-584     __onMouseDown: function (e) {
-585       
-586       if (this.isDrawingMode) {
-587         this._prepareForDrawing(e);
-588         
-589         // capture coordinates immediately; this allows to draw dots (when movement never occurs)
-590         this._captureDrawingPath(e);
-591         
-592         return;
-593       }
-594       
-595       // ignore if some object is being transformed at this moment
-596       if (this._currentTransform) return;
-597       
-598       var target = this.findTarget(e),
-599           pointer = this.getPointer(e),
-600           activeGroup = this.getActiveGroup(), 
-601           corner;
-602       
-603       if (this._shouldClearSelection(e)) {
-604         
-605         this._groupSelector = {
-606           ex: pointer.x,
-607           ey: pointer.y,
-608           top: 0,
-609           left: 0
-610         };
-611         
-612         this.deactivateAllWithDispatch();
-613       }
-614       else {
-615         // determine if it's a drag or rotate case
-616         // rotate and scale will happen at the same time
-617         target.saveState();
-618         
-619         if (corner = target._findTargetCorner(e, this._offset)) {
-620           this.onBeforeScaleRotate(target);
-621         }
-622         
-623         this._setupCurrentTransform(e, target);
-624         
-625         var shouldHandleGroupLogic = e.shiftKey && (activeGroup || this.getActiveObject());
-626         if (shouldHandleGroupLogic) {
-627           this._handleGroupLogic(e, target);
-628         }
-629         else {
-630           if (target !== this.getActiveGroup()) {
-631             this.deactivateAll();
-632           }
-633           this.setActiveObject(target);
-634         }
-635       }
-636       // we must renderAll so that active image is placed on the top canvas
-637       this.renderAll();
-638     },
-639     
-640     /**
-641      * Returns <canvas> element corresponding to this instance
-642      * @method getElement
-643      * @return {HTMLCanvasElement}
-644      */
-645     getElement: function () {
-646       return this._element;
-647     },
-648     
-649     /**
-650      * Deactivates all objects and dispatches appropriate events
-651      * @method deactivateAllWithDispatch
-652      * @return {fabric.Element} thisArg
-653      */
-654     deactivateAllWithDispatch: function () {
-655       var activeGroup = this.getActiveGroup();
-656       if (activeGroup) {
-657         fireEvent('before:group:destroyed', {
-658           target: activeGroup
-659         });
-660       }
-661       this.deactivateAll();
-662       if (activeGroup) {
-663         fireEvent('after:group:destroyed');
-664       }
-665       fireEvent('selection:cleared');
-666       return this;
-667     },
-668     
-669     /**
-670      * @private
-671      * @method _setupCurrentTransform
-672      */
-673     _setupCurrentTransform: function (e, target) {
-674       var action = 'drag', 
-675           corner,
-676           pointer = getPointer(e);
-677       
-678       if (corner = target._findTargetCorner(e, this._offset)) {
-679         action = (corner === 'ml' || corner === 'mr') 
-680           ? 'scaleX' 
-681           : (corner === 'mt' || corner === 'mb') 
-682             ? 'scaleY' 
-683             : 'rotate';
-684       }
-685       
-686       this._currentTransform = {
-687         target: target,
-688         action: action,
-689         scaleX: target.scaleX,
-690         scaleY: target.scaleY,
-691         offsetX: pointer.x - target.left,
-692         offsetY: pointer.y - target.top,
-693         ex: pointer.x,
-694         ey: pointer.y,
-695         left: target.left, 
-696         top: target.top,
-697         theta: target.theta,
-698         width: target.width * target.scaleX
-699       };
-700       
-701       this._currentTransform.original = {
-702         left: target.left,
-703         top: target.top
-704       };
-705     },
-706     
-707     _handleGroupLogic: function (e, target) {
-708       if (target.isType('group')) {
-709         // if it's a group, find target again, this time skipping group
-710         target = this.findTarget(e, true);
-711         // if even object is not found, bail out
-712         if (!target || target.isType('group')) {
-713           return;
-714         }
-715       }
-716       var activeGroup = this.getActiveGroup();
-717       if (activeGroup) {
-718         if (activeGroup.contains(target)) {
-719           activeGroup.remove(target);
-720           target.setActive(false);
-721           if (activeGroup.size() === 1) {
-722             // remove group alltogether if after removal it only contains 1 object
-723             this.removeActiveGroup();
-724           }
-725         }
-726         else {
-727           activeGroup.add(target);
-728         }
-729         fireEvent('group:selected', { target: activeGroup });
-730         activeGroup.setActive(true);
-731       }
-732       else {
-733         // group does not exist
-734         if (this._activeObject) {
-735           // only if there's an active object
-736           if (target !== this._activeObject) {
-737             // and that object is not the actual target
-738             var group = new fabric.Group([ this._activeObject,target ]);
-739             this.setActiveGroup(group);
-740             activeGroup = this.getActiveGroup();
-741           }
-742         }
-743         // activate target object in any case
-744         target.setActive(true);
-745       }
-746       
-747       if (activeGroup) {
-748         activeGroup.saveCoords();
-749       }
-750     },
-751     
-752     /**
-753      * @private
-754      * @method _prepareForDrawing
-755      */
-756     _prepareForDrawing: function(e) {
-757       
-758       this._isCurrentlyDrawing = true;
-759       
-760       this.removeActiveObject().renderAll();
-761       
-762       var pointer = this.getPointer(e);
-763       
-764       this._freeDrawingXPoints.length = this._freeDrawingYPoints.length = 0;
-765       
-766       this._freeDrawingXPoints.push(pointer.x);
-767       this._freeDrawingYPoints.push(pointer.y);
-768       
-769       this.contextTop.beginPath();
-770       this.contextTop.moveTo(pointer.x, pointer.y);
-771       this.contextTop.strokeStyle = this.freeDrawingColor;
-772       this.contextTop.lineWidth = this.freeDrawingLineWidth;
-773       this.contextTop.lineCap = this.contextTop.lineJoin = 'round';
-774     },
-775     
-776     /**
-777      * @private
-778      * @method _captureDrawingPath
-779      */
-780     _captureDrawingPath: function(e) {
-781       var pointer = this.getPointer(e);
-782       
-783       this._freeDrawingXPoints.push(pointer.x);
-784       this._freeDrawingYPoints.push(pointer.y);
-785       
-786       this.contextTop.lineTo(pointer.x, pointer.y);
-787       this.contextTop.stroke();
-788     },
-789     
-790     /**
-791      * @private
-792      * @method _finalizeDrawingPath
-793      */
-794     _finalizeDrawingPath: function() {
-795       
-796       this.contextTop.closePath();
-797       
-798       this._isCurrentlyDrawing = false;
-799       
-800       var minX = utilMin(this._freeDrawingXPoints),
-801           minY = utilMin(this._freeDrawingYPoints),
-802           maxX = utilMax(this._freeDrawingXPoints),
-803           maxY = utilMax(this._freeDrawingYPoints),
-804           ctx = this.contextTop,
-805           path = [ ],
-806           xPoints = this._freeDrawingXPoints,
-807           yPoints = this._freeDrawingYPoints;
-808       
-809       path.push('M ', xPoints[0] - minX, ' ', yPoints[0] - minY, ' ');
-810       
-811       for (var i = 1; xPoint = xPoints[i], yPoint = yPoints[i]; i++) {
-812         path.push('L ', xPoint - minX, ' ', yPoint - minY, ' ');
-813       }
-814       
-815       // TODO (kangax): maybe remove Path creation from here, to decouple fabric.Element from fabric.Path, 
-816       // and instead fire something like "drawing:completed" event with path string
-817       
-818       var p = new fabric.Path(path.join('')); 
-819       p.fill = null;
-820       p.stroke = this.freeDrawingColor;
-821       p.strokeWidth = this.freeDrawingLineWidth;
-822       this.add(p);
-823       p.set("left", minX + (maxX - minX) / 2).set("top", minY + (maxY - minY) / 2).setCoords();
-824       this.renderAll();
-825       fireEvent('path:created', { path: p });
-826     },
-827 
-828    /**
-829     * Method that defines the actions when mouse is hovering the canvas.
-830     * The currentTransform parameter will definde whether the user is rotating/scaling/translating
-831     * an image or neither of them (only hovering). A group selection is also possible and would cancel
-832     * all any other type of action.
-833     * In case of an image transformation only the top canvas will be rendered.
-834     * @method __onMouseMove
-835     * @param e {Event} Event object fired on mousemove
-836     *
-837     */
-838     __onMouseMove: function (e) {
-839       
-840       if (this.isDrawingMode) {
-841         if (this._isCurrentlyDrawing) {
-842           this._captureDrawingPath(e);
-843         }
-844         return;
-845       }
-846       
-847       var groupSelector = this._groupSelector;
-848       
-849       // We initially clicked in an empty area, so we draw a box for multiple selection.
-850       if (groupSelector !== null) {
-851         var pointer = getPointer(e);
-852         groupSelector.left = pointer.x - this._offset.left - groupSelector.ex;
-853         groupSelector.top = pointer.y - this._offset.top - groupSelector.ey;
-854         this.renderTop();
-855       }
-856       else if (!this._currentTransform) {
-857         
-858         // alias style to elimintate unnecessary lookup
-859         var style = this._element.style;
-860         
-861         // Here we are hovering the canvas then we will determine
-862         // what part of the pictures we are hovering to change the caret symbol.
-863         // We won't do that while dragging or rotating in order to improve the
-864         // performance.
-865         var target = this.findTarget(e);
-866         
-867         if (!target) {  
-868           // image/text was hovered-out from, we remove its borders
-869           for (var i = this._objects.length; i--; ) {
-870             if (!this._objects[i].active) {
-871               this._objects[i].setActive(false);
-872             }
-873           }
-874           style.cursor = 'default';
-875         }
-876         else {
-877           // set proper cursor 
-878           this._setCursorFromEvent(e, target);
-879           if (target.isActive()) {
-880             // display corners when hovering over an image
-881             target.setCornersVisibility && target.setCornersVisibility(true);
-882           }
-883         }
-884       }
-885       else {
-886         // object is being transformed (scaled/rotated/moved/etc.)
-887         var pointer = getPointer(e), 
-888             x = pointer.x, 
-889             y = pointer.y;
-890             
-891         this._currentTransform.target.isMoving = true;
-892         
-893         if (this._currentTransform.action === 'rotate') {  
-894           // rotate object only if shift key is not pressed 
-895           // and if it is not a group we are transforming
-896           
-897           if (!e.shiftKey) {
-898             this._rotateObject(x, y);
-899           }
-900           this._scaleObject(x, y);
-901         }
-902         else if (this._currentTransform.action === 'scaleX') {
-903           this._scaleObject(x, y, 'x');
-904         }
-905         else if (this._currentTransform.action === 'scaleY') {
-906           this._scaleObject(x, y, 'y');
-907         }
-908         else {
-909           this._translateObject(x, y);
-910         }
-911         // only commit here. when we are actually moving the pictures
-912         this.renderAll();
-913       }
-914     },
-915 
-916     /**
-917      * Translates object by "setting" its left/top
-918      * @method _translateObject
-919      * @param x {Number} pointer's x coordinate
-920      * @param y {Number} pointer's y coordinate
-921      */
-922     _translateObject: function (x, y) {
-923       var target = this._currentTransform.target;
-924       target.lockHorizontally || target.set('left', x - this._currentTransform.offsetX);
-925       target.lockVertically || target.set('top', y - this._currentTransform.offsetY);
-926     },
-927 
-928     /**
-929      * Scales object by invoking its scaleX/scaleY methods
-930      * @method _scaleObject
-931      * @param x {Number} pointer's x coordinate
-932      * @param y {Number} pointer's y coordinate
-933      * @param by {String} Either 'x' or 'y' - specifies dimension constraint by which to scale an object. 
-934      *                    When not provided, an object is scaled by both dimensions equally
-935      */ 
-936     _scaleObject: function (x, y, by) {
-937       var t = this._currentTransform,
-938           offset = this._offset,
-939           target = t.target;
-940       
-941       if (target.lockScaling) return;
-942       
-943       var lastLen = sqrt(pow(t.ey - t.top - offset.top, 2) + pow(t.ex - t.left - offset.left, 2)),
-944           curLen = sqrt(pow(y - t.top - offset.top, 2) + pow(x - t.left - offset.left, 2));
-945       
-946       target._scaling = true;
-947       
-948       if (!by) {
-949         target.set('scaleX', t.scaleX * curLen/lastLen);
-950         target.set('scaleY', t.scaleY * curLen/lastLen);
-951       }
-952       else if (by === 'x') {
-953         target.set('scaleX', t.scaleX * curLen/lastLen);
-954       }
-955       else if (by === 'y') {
-956         target.set('scaleY', t.scaleY * curLen/lastLen);
-957       }
-958     },
-959 
-960     /**
-961      * Rotates object by invoking its rotate method
-962      * @method _rotateObject
-963      * @param x {Number} pointer's x coordinate
-964      * @param y {Number} pointer's y coordinate
-965      */ 
-966     _rotateObject: function (x, y) {
-967       
-968       var t = this._currentTransform, 
-969           o = this._offset;
-970       
-971       if (t.target.lockRotation) return;
-972       
-973       var lastAngle = atan2(t.ey - t.top - o.top, t.ex - t.left - o.left),
-974           curAngle = atan2(y - t.top - o.top, x - t.left - o.left);
-975           
-976       t.target.set('theta', (curAngle - lastAngle) + t.theta);
-977     },
-978     
-979     /**
-980      * @method _setCursor
-981      */
-982     _setCursor: function (value) {
-983       this._element.style.cursor = value;
-984     },
-985     
-986     /**
-987      * Sets the cursor depending on where the canvas is being hovered.
-988      * Note: very buggy in Opera
-989      * @method _setCursorFromEvent
-990      * @param e {Event} Event object
-991      * @param target {Object} Object that the mouse is hovering, if so.
-992      */
-993     _setCursorFromEvent: function (e, target) {
-994       var s = this._element.style;
-995       if (!target) {
-996         s.cursor = 'default';
-997         return false;
-998       }
-999       else {
-1000         var activeGroup = this.getActiveGroup();
-1001         // only show proper corner when group selection is not active
-1002         var corner = !!target._findTargetCorner 
-1003                       && (!activeGroup || !activeGroup.contains(target)) 
-1004                       && target._findTargetCorner(e, this._offset);
-1005         
-1006         if (!corner) {
-1007           s.cursor = 'move';
-1008         }
-1009         else {
-1010           if (corner in cursorMap) {
-1011             s.cursor = cursorMap[corner];
-1012           }
-1013           else {
-1014             s.cursor = 'default';
-1015             return false;
-1016           }
-1017         }
-1018       }
-1019       return true;
-1020     },
-1021     
-1022     /**
-1023      * Given a context, renders an object on that context 
-1024      * @param ctx {Object} context to render object on
-1025      * @param object {Object} object to render
-1026      * @private
-1027      */
-1028     _draw: function (ctx, object) {
-1029       object && object.render(ctx);
-1030     },
-1031     
-1032     /**
-1033      * @method _drawSelection
-1034      * @private
-1035      */
-1036     _drawSelection: function () {
-1037       var groupSelector = this._groupSelector,
-1038           left = groupSelector.left,
-1039           top = groupSelector.top,
-1040           aleft = abs(left),
-1041           atop = abs(top);
-1042 
-1043       this.contextTop.fillStyle = this.selectionColor;
-1044 
-1045       this.contextTop.fillRect(
-1046         groupSelector.ex - ((left > 0) ? 0 : -left),
-1047         groupSelector.ey - ((top > 0) ? 0 : -top),
-1048         aleft, 
-1049         atop
-1050       );
-1051 
-1052       this.contextTop.lineWidth = this.selectionLineWidth;
-1053       this.contextTop.strokeStyle = this.selectionBorderColor;
-1054       
-1055       this.contextTop.strokeRect(
-1056         groupSelector.ex + STROKE_OFFSET - ((left > 0) ? 0 : aleft), 
-1057         groupSelector.ey + STROKE_OFFSET - ((top > 0) ? 0 : atop),
-1058         aleft,
-1059         atop
-1060       );
-1061     },
-1062     
-1063     _findSelectedObjects: function (e) {
-1064       var target, 
-1065           targetRegion,
-1066           group = [ ],
-1067           x1 = this._groupSelector.ex,
-1068           y1 = this._groupSelector.ey,
-1069           x2 = x1 + this._groupSelector.left,
-1070           y2 = y1 + this._groupSelector.top,
-1071           currentObject,
-1072           selectionX1Y1 = new fabric.Point(min(x1, x2), min(y1, y2)),
-1073           selectionX2Y2 = new fabric.Point(max(x1, x2), max(y1, y2));
-1074       
-1075       for (var i = 0, len = this._objects.length; i < len; ++i) {
-1076         currentObject = this._objects[i];
-1077         
-1078         if (currentObject.intersectsWithRect(selectionX1Y1, selectionX2Y2) || 
-1079             currentObject.isContainedWithinRect(selectionX1Y1, selectionX2Y2)) {
-1080               
-1081           currentObject.setActive(true);
-1082           group.push(currentObject);
-1083         }
-1084       }
-1085       // do not create group for 1 element only
-1086       if (group.length === 1) {
-1087         this.setActiveObject(group[0]);
-1088         fireEvent('object:selected', {
-1089           target: group[0]
-1090         });
-1091       } 
-1092       else if (group.length > 1) {
-1093         var group = new fabric.Group(group);
-1094         this.setActiveGroup(group);
-1095         group.saveCoords();
-1096         fireEvent('group:selected', { target: group });
-1097       }
-1098       this.renderAll();
-1099     },
-1100     
-1101     /**
-1102      * Adds objects to canvas, then renders canvas;
-1103      * Objects should be instances of (or inherit from) fabric.Object
-1104      * @method add
-1105      * @return {fabric.Element} thisArg
-1106      * @chainable
-1107      */
-1108     add: function () {
-1109       this._objects.push.apply(this._objects, arguments);
-1110       this.renderAll();
-1111       return this;
-1112     },
-1113     
-1114     /**
-1115      * Inserts an object to canvas at specified index and renders canvas. 
-1116      * An object should be an instance of (or inherit from) fabric.Object
-1117      * @method insertAt
-1118      * @param object {Object} Object to insert
-1119      * @param index {Number} index to insert object at
-1120      * @return {fabric.Element} instance
-1121      */
-1122     insertAt: function (object, index) {
-1123       this._objects.splice(index, 0, object);
-1124       this.renderAll();
-1125       return this;
-1126     },
-1127     
-1128     /**
-1129      * Returns an array of objects this instance has
-1130      * @method getObjects
-1131      * @return {Array}
-1132      */
-1133     getObjects: function () {
-1134       return this._objects;
-1135     },
-1136     
-1137     /**
-1138      * Returns topmost canvas context
-1139      * @method getContext
-1140      * @return {CanvasRenderingContext2D}
-1141      */
-1142     getContext: function () {
-1143       return this.contextTop;
-1144     },
-1145     
-1146     /**
-1147      * Clears specified context of canvas element
-1148      * @method clearContext
-1149      * @param context {Object} ctx context to clear
-1150      * @return {fabric.Element} thisArg
-1151      * @chainable
-1152      */
-1153     clearContext: function(ctx) {
-1154       // this sucks, but we can't use `getWidth`/`getHeight` here for perf. reasons
-1155       ctx.clearRect(0, 0, this._config.width, this._config.height);
-1156       return this;
-1157     },
-1158     
-1159     /**
-1160      * Clears all contexts (background, main, top) of an instance
-1161      * @method clear
-1162      * @return {fabric.Element} thisArg
-1163      * @chainable
-1164      */
-1165     clear: function () {
-1166       this._objects.length = 0;
-1167       this.clearContext(this.contextTop);
-1168       this.clearContext(this.contextContainer);
-1169       this.renderAll();
-1170       return this;
-1171     },
-1172 
-1173     /**
-1174      * Renders both the top canvas and the secondary container canvas.
-1175      * @method renderAll
-1176      * @param allOnTop {Boolean} optional Whether we want to force all images to be rendered on the top canvas
-1177      * @return {fabric.Element} instance
-1178      * @chainable
-1179      */ 
-1180     renderAll: function (allOnTop) {
-1181       
-1182       // this sucks, but we can't use `getWidth`/`getHeight` here for perf. reasons
-1183       var w = this._config.width,
-1184           h = this._config.height;
-1185           
-1186       // when allOnTop is true all images are rendered in the top canvas.
-1187       // This is used for actions like toDataUrl that needs to take some actions on a unique canvas.
-1188       var containerCanvas = allOnTop ? this.contextTop : this.contextContainer;
-1189 
-1190       this.clearContext(this.contextTop);
-1191 
-1192       if (!allOnTop) {
-1193         this.clearContext(containerCanvas);
-1194       }
-1195       containerCanvas.fillStyle = this.backgroundColor;
-1196       containerCanvas.fillRect(0, 0, w, h);
-1197       
-1198       var length = this._objects.length,
-1199           activeGroup = this.getActiveGroup();
-1200       
-1201       var startTime = new Date();
-1202       
-1203       if (length) {
-1204         for (var i = 0; i < length; ++i) {
-1205           if (!activeGroup ||
-1206               (activeGroup &&
-1207               !activeGroup.contains(this._objects[i]))) {
-1208             this._draw(containerCanvas, this._objects[i]);
-1209           }
-1210         }
-1211       }
-1212       
-1213       // delegate rendering to group selection (if one exists)
-1214       if (activeGroup) {
-1215         this._draw(this.contextTop, activeGroup);
-1216       }
-1217       
-1218       if (this.overlayImage) {
-1219         this.contextTop.drawImage(this.overlayImage, 0, 0);
-1220       }
-1221       
-1222       var elapsedTime = new Date() - startTime;
-1223       this.onFpsUpdate(~~(1000 / elapsedTime));
-1224       
-1225       if (this.afterRender) {
-1226         this.afterRender();
-1227       }
-1228       
-1229       return this;
-1230     },
-1231 
-1232     /**
-1233      * Method to render only the top canvas.
-1234      * Also used to render the group selection box.
-1235      * @method renderTop
-1236      * @return {fabric.Element} thisArg
-1237      * @chainable
-1238      */
-1239     renderTop: function () {
-1240       
-1241       this.clearContext(this.contextTop);
-1242       if (this.overlayImage) {
-1243         this.contextTop.drawImage(this.overlayImage, 0, 0);
-1244       }
-1245       
-1246       // we render the top context - last object
-1247       if (this._groupSelector) {
-1248         this._drawSelection();
-1249       }
-1250       
-1251       // delegate rendering to group selection if one exists
-1252       // used for drawing selection borders/corners
-1253       var activeGroup = this.getActiveGroup();
-1254       if (activeGroup) {
-1255         activeGroup.render(this.contextTop);
-1256       }
-1257       
-1258       if (this.afterRender) {
-1259         this.afterRender();
-1260       }
-1261       
-1262       return this;
-1263     },
-1264     
-1265     /**
-1266      * Applies one implementation of 'point inside polygon' algorithm
-1267      * @method containsPoint
-1268      * @param e { Event } event object
-1269      * @param target { fabric.Object } object to test against
-1270      * @return {Boolean} true if point contains within area of given object
-1271      */
-1272     containsPoint: function (e, target) {
-1273       var pointer = this.getPointer(e),
-1274           xy = this._normalizePointer(target, pointer),
-1275           x = xy.x, 
-1276           y = xy.y;
-1277       
-1278       // http://www.geog.ubc.ca/courses/klink/gis.notes/ncgia/u32.html
-1279       // http://idav.ucdavis.edu/~okreylos/TAship/Spring2000/PointInPolygon.html
-1280       
-1281       // we iterate through each object. If target found, return it.
-1282       var iLines = target._getImageLines(target.oCoords),
-1283           xpoints = target._findCrossPoints(x, y, iLines);
-1284       
-1285       // if xcount is odd then we clicked inside the object
-1286       // For the specific case of square images xcount === 1 in all true cases
-1287       if ((xpoints && xpoints % 2 === 1) || target._findTargetCorner(e, this._offset)) {
-1288         return true;
-1289       }
-1290       return false;
-1291     },
-1292     
-1293     /**
-1294      * @private
-1295      * @method _normalizePointer
-1296      */
-1297     _normalizePointer: function (object, pointer) {
-1298       
-1299       var activeGroup = this.getActiveGroup(), 
-1300           x = pointer.x, 
-1301           y = pointer.y;
-1302       
-1303       var isObjectInGroup = (
-1304         activeGroup && 
-1305         object.type !== 'group' && 
-1306         activeGroup.contains(object)
-1307       );
-1308       
-1309       if (isObjectInGroup) {
-1310         x -= activeGroup.left;
-1311         y -= activeGroup.top;
-1312       }
-1313       return { x: x, y: y };
-1314     },
-1315 
-1316     /**
-1317      * Method that determines what object we are clicking on
-1318      * @method findTarget
-1319      * @param {Event} e mouse event
-1320      * @param {Boolean} skipGroup when true, group is skipped and only objects are traversed through
-1321      */ 
-1322     findTarget: function (e, skipGroup) {
-1323       var target,
-1324           pointer = this.getPointer(e);
-1325       
-1326       // first check current group (if one exists)
-1327       var activeGroup = this.getActiveGroup();
-1328       
-1329       if (activeGroup && !skipGroup && this.containsPoint(e, activeGroup)) {
-1330         target = activeGroup;
-1331         return target;
-1332       }
-1333       
-1334       // then check all of the objects on canvas
-1335       for (var i = this._objects.length; i--; ) {
-1336         if (this.containsPoint(e, this._objects[i])) {
-1337           target = this._objects[i];
-1338           this.relatedTarget = target;
-1339           break;
-1340         }
-1341       }
-1342       return target;
-1343     },
-1344 
-1345     /**
-1346      * Exports canvas element to a dataurl image.
-1347      * @method toDataURL
-1348      * @param {String} format the format of the output image. Either "jpeg" or "png".
-1349      * @return {String}
-1350      */
-1351     toDataURL: function (format) {
-1352       var data;
-1353       if (!format) {
-1354         format = 'png';
-1355       }
-1356       if (format === 'jpeg' || format === 'png') {
-1357         this.renderAll(true);
-1358         data = this.getElement().toDataURL('image/' + format);
-1359         this.renderAll();
-1360       }
-1361       return data;
-1362     },
-1363     
-1364     /**
-1365      * Exports canvas element to a dataurl image (allowing to change image size via multiplier).
-1366      * @method toDataURLWithMultiplier
-1367      * @param {String} format (png|jpeg)
-1368      * @param {Number} multiplier
-1369      * @return {String}
-1370      */
-1371     toDataURLWithMultiplier: function (format, multiplier) {
-1372       
-1373       var origWidth = this.getWidth(),
-1374           origHeight = this.getHeight(),
-1375           scaledWidth = origWidth * multiplier,
-1376           scaledHeight = origHeight * multiplier,
-1377           activeObject = this.getActiveObject();
-1378       
-1379       this.setWidth(scaledWidth).setHeight(scaledHeight);
-1380       this.contextTop.scale(multiplier, multiplier);
-1381       
-1382       if (activeObject) {
-1383         this.deactivateAll().renderAll();
-1384       }
-1385       var dataURL = this.toDataURL(format);
-1386 
-1387       this.contextTop.scale( 1 / multiplier,  1 / multiplier);
-1388       this.setWidth(origWidth).setHeight(origHeight);
-1389       
-1390       if (activeObject) {
-1391         this.setActiveObject(activeObject);
-1392       }
-1393       this.renderAll();
-1394       
-1395       return dataURL;
-1396     },
-1397     
-1398     /**
-1399      * Returns pointer coordinates relative to canvas.
-1400      * @method getPointer
-1401      * @return {Object} object with "x" and "y" number values
-1402      */
-1403     getPointer: function (e) {
-1404       var pointer = getPointer(e);
-1405       return {
-1406         x: pointer.x - this._offset.left,
-1407         y: pointer.y - this._offset.top
-1408       };
-1409     },
-1410     
-1411     /**
-1412      * Returns coordinates of a center of canvas.
-1413      * Returned value is an object with top and left properties
-1414      * @method getCenter
-1415      * @return {Object} object with "top" and "left" number values
-1416      */
-1417     getCenter: function () {
-1418       return {
-1419         top: this.getHeight() / 2,
-1420         left: this.getWidth() / 2
-1421       };
-1422     },
-1423     
-1424     /**
-1425      * Centers object horizontally.
-1426      * @method centerObjectH
-1427      * @param {fabric.Object} object Object to center
-1428      * @return {fabric.Element} thisArg
-1429      */
-1430     centerObjectH: function (object) {
-1431       object.set('left', this.getCenter().left);
-1432       this.renderAll();
-1433       return this;
-1434     },
-1435     
-1436     /**
-1437      * Centers object horizontally with animation.
-1438      * @method fxCenterObjectH
-1439      * @param {fabric.Object} object Object to center
-1440      * @param {Object} [callbacks] Callbacks object with optional "onComplete" and/or "onChange" properties
-1441      * @return {fabric.Element} thisArg
-1442      * @chainable
-1443      */
-1444     fxCenterObjectH: function (object, callbacks) {
-1445       callbacks = callbacks || { };
-1446 
-1447       var empty = function() { },
-1448           onComplete = callbacks.onComplete || empty,
-1449           onChange = callbacks.onChange || empty,
-1450           _this = this;
-1451 
-1452       fabric.util.animate({
-1453         startValue: object.get('left'),
-1454         endValue: this.getCenter().left,
-1455         duration: this.FX_DURATION,
-1456         onChange: function(value) {
-1457           object.set('left', value);
-1458           _this.renderAll();
-1459           onChange();
-1460         },
-1461         onComplete: function() {
-1462           object.setCoords();
-1463           onComplete();
-1464         }
-1465       });
-1466 
-1467       return this;
-1468     },
-1469     
-1470     /**
-1471      * Centers object vertically.
-1472      * @method centerObjectH
-1473      * @param {fabric.Object} object Object to center
-1474      * @return {fabric.Element} thisArg
-1475      * @chainable
-1476      */
-1477     centerObjectV: function (object) {
-1478       object.set('top', this.getCenter().top);
-1479       this.renderAll();
-1480       return this;
-1481     },
-1482     
-1483     /**
-1484      * Centers object vertically with animation.
-1485      * @method fxCenterObjectV
-1486      * @param {fabric.Object} object Object to center
-1487      * @param {Object} [callbacks] Callbacks object with optional "onComplete" and/or "onChange" properties
-1488      * @return {fabric.Element} thisArg
-1489      * @chainable
-1490      */
-1491     fxCenterObjectV: function (object, callbacks) {
-1492       callbacks = callbacks || { };
-1493 
-1494       var empty = function() { },
-1495           onComplete = callbacks.onComplete || empty,
-1496           onChange = callbacks.onChange || empty,
-1497           _this = this;
-1498 
-1499       fabric.util.animate({
-1500         startValue: object.get('top'),
-1501         endValue: this.getCenter().top,
-1502         duration: this.FX_DURATION,
-1503         onChange: function(value) {
-1504           object.set('top', value);
-1505           _this.renderAll();
-1506           onChange();
-1507         },
-1508         onComplete: function() {
-1509           object.setCoords();
-1510           onComplete();
-1511         }
-1512       });
-1513 
-1514       return this;
-1515     },
-1516     
-1517     /**
-1518      * Straightens object, then rerenders canvas
-1519      * @method straightenObject
-1520      * @param {fabric.Object} object Object to straighten
-1521      * @return {fabric.Element} thisArg
-1522      * @chainable
-1523      */
-1524     straightenObject: function (object) {
-1525       object.straighten();
-1526       this.renderAll();
-1527       return this;
-1528     },
-1529     
-1530     /**
-1531      * Same as `fabric.Element#straightenObject`, but animated
-1532      * @method fxStraightenObject
-1533      * @param {fabric.Object} object Object to straighten
-1534      * @return {fabric.Element} thisArg
-1535      * @chainable
-1536      */
-1537     fxStraightenObject: function (object) {
-1538       object.fxStraighten({
-1539         onChange: this.renderAll.bind(this)
-1540       });
-1541       return this;
-1542     },
-1543     
-1544     /**
-1545      * Returs dataless JSON representation of canvas
-1546      * @method toDatalessJSON
-1547      * @return {String} json string
-1548      */
-1549     toDatalessJSON: function () {
-1550       return this.toDatalessObject();
-1551     },
-1552     
-1553     /**
-1554      * Returns object representation of canvas
-1555      * @method toObject
-1556      * @return {Object}
-1557      */
-1558     toObject: function () {
-1559       return this._toObjectMethod('toObject');
-1560     },
-1561     
-1562     /**
-1563      * Returns dataless object representation of canvas
-1564      * @method toDatalessObject
-1565      * @return {Object}
-1566      */
-1567     toDatalessObject: function () {
-1568       return this._toObjectMethod('toDatalessObject');
-1569     },
-1570     
-1571     /**
-1572      * @private
-1573      * @method _toObjectMethod
-1574      */
-1575     _toObjectMethod: function (methodName) {
-1576       return { 
-1577         objects: this._objects.map(function (instance){
-1578           // TODO (kangax): figure out how to clean this up
-1579           if (!this.includeDefaultValues) {
-1580             var originalValue = instance.includeDefaultValues;
-1581             instance.includeDefaultValues = false;
-1582           }
-1583           var object = instance[methodName]();
-1584           if (!this.includeDefaultValues) {
-1585             instance.includeDefaultValues = originalValue;
-1586           }
-1587           return object;
-1588         }, this),
-1589         background: this.backgroundColor
-1590       }
-1591     },
-1592 
-1593     /**
-1594      * Returns true if canvas contains no objects
-1595      * @method isEmpty
-1596      * @return {Boolean} true if canvas is empty
-1597      */
-1598     isEmpty: function () {
-1599       return this._objects.length === 0;
-1600     },
-1601     
-1602     /**
-1603      * Populates canvas with data from the specified JSON
-1604      * JSON format must conform to the one of `fabric.Element#toJSON`
-1605      * @method loadFromJSON
-1606      * @param {String} json JSON string
-1607      * @param {Function} callback Callback, invoked when json is parsed 
-1608      *                            and corresponding objects (e.g: fabric.Image) 
-1609      *                            are initialized
-1610      * @return {fabric.Element} instance
-1611      * @chainable
-1612      */
-1613     loadFromJSON: function (json, callback) {
-1614       if (!json) return;
-1615       
-1616       var serialized = JSON.parse(json);
-1617       if (!serialized || (serialized && !serialized.objects)) return;
-1618       
-1619       this.clear();
-1620       var _this = this;
-1621       this._enlivenObjects(serialized.objects, function () {
-1622         _this.backgroundColor = serialized.background;
-1623         if (callback) {
-1624           callback();
-1625         }
-1626       });
-1627       
-1628       return this;
-1629     },
-1630     
-1631     /**
-1632      * @method _enlivenObjects
-1633      * @param {Array} objects
-1634      * @param {Function} callback
-1635      */
-1636     _enlivenObjects: function (objects, callback) {
-1637       var numLoadedImages = 0,
-1638           // get length of all images 
-1639           numTotalImages = objects.filter(function (o) {
-1640             return o.type === 'image';
-1641           }).length;
-1642       
-1643       var _this = this;
-1644       
-1645       objects.forEach(function (o, index) {
-1646         if (!o.type) {
-1647           return;
-1648         }
-1649         switch (o.type) {
-1650           case 'image':
-1651           case 'font':
-1652             fabric[capitalize(o.type)].fromObject(o, function (o) {
-1653               _this.insertAt(o, index);
-1654               if (++numLoadedImages === numTotalImages) {
-1655                 if (callback) {
-1656                   callback();
-1657                 }
-1658               }
-1659             });
-1660             break;
-1661           default:
-1662             var klass = fabric[camelize(capitalize(o.type))];
-1663             if (klass && klass.fromObject) {
-1664               _this.insertAt(klass.fromObject(o), index);
-1665             }
-1666             break;
-1667         }
-1668       });
-1669       
-1670       if (numTotalImages === 0 && callback) {
-1671         callback();
-1672       }
-1673     },
-1674     
-1675     /**
-1676      * Populates canvas with data from the specified dataless JSON
-1677      * JSON format must conform to the one of `fabric.Element#toDatalessJSON`
-1678      * @method loadFromDatalessJSON
-1679      * @param {String} json JSON string
-1680      * @param {Function} callback Callback, invoked when json is parsed 
-1681      *                            and corresponding objects (e.g: fabric.Image) 
-1682      *                            are initialized
-1683      * @return {fabric.Element} instance
-1684      * @chainable
-1685      */
-1686     loadFromDatalessJSON: function (json, callback) {
-1687       
-1688       if (!json) {
-1689         return;
-1690       }
-1691 
-1692       // serialize if it wasn't already
-1693       var serialized = (typeof json === 'string')
-1694         ? JSON.parse(json)
-1695         : json;
-1696       
-1697       if (!serialized || (serialized && !serialized.objects)) return;
-1698       
-1699       this.clear();
-1700 
-1701       // TODO: test this
-1702       this.backgroundColor = serialized.background;
-1703       this._enlivenDatalessObjects(serialized.objects, callback);
-1704     },
-1705     
-1706     /**
-1707      * @method _enlivenDatalessObjects
-1708      * @param {Array} objects
-1709      * @param {Function} callback
-1710      */
-1711     _enlivenDatalessObjects: function (objects, callback) {
-1712       
-1713       /** @ignore */
-1714       function onObjectLoaded(object, index) {
-1715         _this.insertAt(object, index);
-1716 				object.setCoords();
-1717         if (++numLoadedObjects === numTotalObjects) {
-1718           callback && callback();
-1719         }
-1720       }
-1721       
-1722       var _this = this,
-1723           numLoadedObjects = 0,
-1724           numTotalObjects = objects.length;
-1725       
-1726       if (numTotalObjects === 0 && callback) {
-1727         callback();
-1728       }
-1729       
-1730       try {
-1731         objects.forEach(function (obj, index) {
-1732           
-1733           var pathProp = obj.paths ? 'paths' : 'path';
-1734           var path = obj[pathProp];
-1735 
-1736           delete obj[pathProp];
-1737           
-1738           if (typeof path !== 'string') {
-1739             switch (obj.type) {
-1740               case 'image':
-1741               case 'text':
-1742                 fabric[capitalize(obj.type)].fromObject(obj, function (o) {
-1743                   onObjectLoaded(o, index);
-1744                 });
-1745                 break;
-1746               default:
-1747                 var klass = fabric[camelize(capitalize(obj.type))];
-1748                 if (klass && klass.fromObject) {
-1749                   onObjectLoaded(klass.fromObject(obj), index);
-1750                 }
-1751                 break;
-1752             }
-1753           }
-1754           else {
-1755             if (obj.type === 'image') {
-1756               _this.loadImageFromURL(path, function (image) {
-1757                 image.setSourcePath(path);
-1758 
-1759                 extend(image, obj);
-1760                 image.setAngle(obj.angle);
-1761 
-1762                 onObjectLoaded(image, index);
-1763               });
-1764             }
-1765             else if (obj.type === 'text') {
-1766               
-1767               obj.path = path;
-1768               var object = fabric.Text.fromObject(obj);
-1769               var onscriptload = function () {
-1770                 // TODO (kangax): find out why Opera refuses to work without this timeout
-1771                 if (Object.prototype.toString.call(window.opera) === '[object Opera]') {
-1772                   setTimeout(function () {
-1773                     onObjectLoaded(object, index);
-1774                   }, 500);
-1775                 }
-1776                 else {
-1777                   onObjectLoaded(object, index);
-1778                 }
-1779               }
-1780               
-1781               fabric.util.getScript(path, onscriptload);
-1782             }
-1783             else {
-1784               _this.loadSVGFromURL(path, function (elements, options) {
-1785                 if (elements.length > 1) {
-1786                   var object = new fabric.PathGroup(elements, obj);
-1787                 }
-1788                 else {
-1789                   var object = elements[0];
-1790                 }
-1791                 object.setSourcePath(path);
-1792 
-1793                 // copy parameters from serialied json to object (left, top, scaleX, scaleY, etc.)
-1794                 // skip this step if an object is a PathGroup, since we already passed it options object before
-1795                 if (!(object instanceof fabric.PathGroup)) {
-1796                   extend(object, obj);
-1797                   if (typeof obj.angle !== 'undefined') {
-1798                     object.setAngle(obj.angle);
-1799                   }
-1800                 }
-1801 
-1802                 onObjectLoaded(object, index);
-1803               });
-1804             }
-1805           }
-1806         }, this);
-1807       } 
-1808       catch(e) {
-1809         fabric.log(e.message);
-1810       }
-1811     },
-1812     
-1813     /**
-1814      * Loads an image from URL
-1815      * @function
-1816      * @method loadImageFromURL
-1817      * @param url {String} url of image to load
-1818      * @param callback {Function} calback, invoked when image is loaded
-1819      */
-1820     loadImageFromURL: (function () {
-1821       var imgCache = { };
-1822 
-1823       return function (url, callback) {
-1824         // check cache first
-1825         
-1826         var _this = this;
-1827         
-1828         function checkIfLoaded() {
-1829           var imgEl = document.getElementById(imgCache[url]);
-1830           if (imgEl.width && imgEl.height) {
-1831             callback(new fabric.Image(imgEl));
-1832           }
-1833           else {
-1834             setTimeout(checkIfLoaded, 50);
-1835           }
-1836         }
-1837 
-1838         // get by id from cache
-1839         if (imgCache[url]) {
-1840           // id can be cached but image might still not be loaded, so we poll here
-1841           checkIfLoaded();
-1842         }
-1843         // else append a new image element
-1844         else {
-1845           var imgEl = new Image();
-1846           
-1847           /** @ignore */
-1848           imgEl.onload = function () {
-1849             imgEl.onload = null;
-1850             
-1851             _this._resizeImageToFit(imgEl);
-1852             
-1853             var oImg = new fabric.Image(imgEl);
-1854             callback(oImg);
-1855           };
-1856           
-1857           imgEl.className = 'canvas-img-clone';
-1858           imgEl.src = url;
-1859           
-1860           if (this.shouldCacheImages) {
-1861             imgCache[url] = Element.identify(imgEl);
-1862           }
-1863           document.body.appendChild(imgEl);
-1864         }
-1865       }
-1866     })(),
-1867     
-1868     /**
-1869      * Takes url corresponding to an SVG document, and parses it to a set of objects
-1870      * @method loadSVGFromURL
-1871      * @param {String} url
-1872      * @param {Function} callback
-1873      */
-1874     loadSVGFromURL: function (url, callback) {
-1875       
-1876       var _this = this;
-1877       
-1878       url = url.replace(/^\n\s*/, '').replace(/\?.*$/, '').trim();
-1879       
-1880       this.cache.has(url, function (hasUrl) {
-1881         if (hasUrl) {
-1882           _this.cache.get(url, function (value) {
-1883             var enlivedRecord = _this._enlivenCachedObject(value);
-1884             callback(enlivedRecord.objects, enlivedRecord.options);
-1885           });
-1886         }
-1887         else {
-1888           // TODO (kangax): replace Prototype's API with fabric's util one
-1889           new Ajax.Request(url, {
-1890             method: 'get',
-1891             onComplete: onComplete,
-1892             onFailure: onFailure
-1893           });
-1894         }
-1895       });
-1896       
-1897       function onComplete(r) {
-1898         
-1899         var xml = r.responseXML;
-1900         if (!xml) return;
-1901         
-1902         var doc = xml.documentElement;
-1903         if (!doc) return;
-1904         
-1905         fabric.parseSVGDocument(doc, function (results, options) {
-1906           _this.cache.set(url, {
-1907             objects: results.invoke('toObject'),
-1908             options: options
-1909           });
-1910           callback(results, options);
-1911         });
-1912       }
-1913       
-1914       function onFailure() {
-1915         fabric.log('ERROR!');
-1916       }
-1917     },
-1918     
-1919     /**
-1920      * @method _enlivenCachedObject
-1921      */
-1922     _enlivenCachedObject: function (cachedObject) {
-1923       
-1924       var objects = cachedObject.objects,
-1925           options = cachedObject.options;
-1926       
-1927       objects = objects.map(function (o) {
-1928         return fabric[capitalize(o.type)].fromObject(o);
-1929       });
-1930       
-1931       return ({ objects: objects, options: options });
-1932     },
-1933     
-1934     /**
-1935      * Removes an object from canvas and returns it
-1936      * @method remove
-1937      * @param object {Object} Object to remove
-1938      * @return {Object} removed object
-1939      */
-1940     remove: function (object) {
-1941       removeFromArray(this._objects, object);
-1942       this.renderAll();
-1943       return object;
-1944     },
-1945     
-1946     /**
-1947      * Same as `fabric.Element#remove` but animated
-1948      * @method fxRemove
-1949      * @param {fabric.Object} object Object to remove
-1950      * @param {Function} callback Callback, invoked on effect completion
-1951      * @return {fabric.Element} thisArg
-1952      * @chainable
-1953      */
-1954     fxRemove: function (object, callback) {
-1955       var _this = this;
-1956       object.fxRemove({
-1957         onChange: this.renderAll.bind(this),
-1958         onComplete: function () {
-1959           _this.remove(object);
-1960           if (typeof callback === 'function') {
-1961             callback();
-1962           }
-1963         }
-1964       });
-1965       return this;
-1966     },
-1967     
-1968     /**
-1969      * Moves an object to the bottom of the stack of drawn objects
-1970      * @method sendToBack
-1971      * @param object {fabric.Object} Object to send to back
-1972      * @return {fabric.Element} thisArg
-1973      * @chainable
-1974      */
-1975     sendToBack: function (object) {
-1976       removeFromArray(this._objects, object);
-1977       this._objects.unshift(object);
-1978       return this.renderAll();
-1979     },
-1980     
-1981     /**
-1982      * Moves an object to the top of the stack of drawn objects
-1983      * @method bringToFront
-1984      * @param object {fabric.Object} Object to send
-1985      * @return {fabric.Element} thisArg
-1986      * @chainable
-1987      */
-1988     bringToFront: function (object) {
-1989       removeFromArray(this._objects, object);
-1990       this._objects.push(object);
-1991       return this.renderAll();
-1992     },
-1993     
-1994     /**
-1995      * Moves an object one level down in stack of drawn objects
-1996      * @method sendBackwards
-1997      * @param object {fabric.Object} Object to send
-1998      * @return {fabric.Element} thisArg
-1999      * @chainable
-2000      */
-2001     sendBackwards: function (object) {
-2002       var idx = this._objects.indexOf(object),
-2003           nextIntersectingIdx = idx;
-2004       
-2005       // if object is not on the bottom of stack
-2006       if (idx !== 0) {
-2007         
-2008         // traverse down the stack looking for the nearest intersecting object
-2009         for (var i=idx-1; i>=0; --i) {
-2010           if (object.intersectsWithObject(this._objects[i])) {
-2011             nextIntersectingIdx = i;
-2012             break;
-2013           }
-2014         }
-2015         removeFromArray(this._objects, object);
-2016         this._objects.splice(nextIntersectingIdx, 0, object);
-2017       }
-2018       return this.renderAll();
-2019     },
-2020     
-2021     /**
-2022      * Moves an object one level up in stack of drawn objects
-2023      * @method sendForward
-2024      * @param object {fabric.Object} Object to send
-2025      * @return {fabric.Element} thisArg
-2026      * @chainable
-2027      */
-2028     bringForward: function (object) {
-2029       var objects = this.getObjects(),
-2030           idx = objects.indexOf(object),
-2031           nextIntersectingIdx = idx;
-2032 
-2033       
-2034       // if object is not on top of stack (last item in an array)
-2035       if (idx !== objects.length-1) {
-2036         
-2037         // traverse up the stack looking for the nearest intersecting object
-2038         for (var i = idx + 1, l = this._objects.length; i < l; ++i) {
-2039           if (object.intersectsWithObject(objects[i])) {
-2040             nextIntersectingIdx = i;
-2041             break;
-2042           }
-2043         }
-2044         removeFromArray(objects, object);
-2045         objects.splice(nextIntersectingIdx, 0, object);
-2046       }
-2047       this.renderAll();
-2048     },
-2049     
-2050     /**
-2051      * Sets given object as active
-2052      * @method setActiveObject
-2053      * @param object {fabric.Object} Object to set as an active one
-2054      * @return {fabric.Element} thisArg
-2055      * @chainable
-2056      */
-2057     setActiveObject: function (object) {
-2058       if (this._activeObject) {
-2059         this._activeObject.setActive(false);
-2060       }
-2061       this._activeObject = object;
-2062       object.setActive(true);
-2063       
-2064       this.renderAll();
-2065       
-2066       fireEvent('object:selected', { target: object });
-2067       return this;
-2068     },
-2069     
-2070     /**
-2071      * Returns currently active object
-2072      * @method getActiveObject
-2073      * @return {fabric.Object} active object
-2074      */
-2075     getActiveObject: function () {
-2076       return this._activeObject;
-2077     },
-2078     
-2079     /**
-2080      * Removes currently active object
-2081      * @method removeActiveObject
-2082      * @return {fabric.Element} thisArg
-2083      * @chainable
-2084      */
-2085     removeActiveObject: function () {
-2086       if (this._activeObject) {
-2087         this._activeObject.setActive(false);
-2088       }
-2089       this._activeObject = null;
-2090       return this;
-2091     },
-2092     
-2093     /**
-2094      * Sets active group to a speicified one
-2095      * @method setActiveGroup
-2096      * @param {fabric.Group} group Group to set as a current one 
-2097      * @return {fabric.Element} thisArg
-2098      * @chainable
-2099      */
-2100     setActiveGroup: function (group) {
-2101       this._activeGroup = group;
-2102       return this;
-2103     },
-2104     
-2105     /**
-2106      * Returns currently active group
-2107      * @method getActiveGroup
-2108      * @return {fabric.Group} Current group
-2109      */
-2110     getActiveGroup: function () {
-2111       return this._activeGroup;
-2112     },
-2113     
-2114     /**
-2115      * Removes currently active group
-2116      * @method removeActiveGroup
-2117      * @return {fabric.Element} thisArg
-2118      */
-2119     removeActiveGroup: function () {
-2120       var g = this.getActiveGroup();
-2121       if (g) {
-2122         g.destroy();
-2123       }
-2124       return this.setActiveGroup(null);
-2125     },
-2126     
-2127     /**
-2128      * Returns object at specified index
-2129      * @method item
-2130      * @param {Number} index
-2131      * @return {fabric.Object}
-2132      */
-2133     item: function (index) {
-2134       return this.getObjects()[index];
-2135     },
-2136     
-2137     /**
-2138      * Deactivates all objects by calling their setActive(false)
-2139      * @method deactivateAll
-2140      * @return {fabric.Element} thisArg
-2141      */
-2142     deactivateAll: function () {
-2143       var allObjects = this.getObjects(),
-2144           i = 0,
-2145           len = allObjects.length;
-2146       for ( ; i < len; i++) {
-2147         allObjects[i].setActive(false);
-2148       }
-2149       this.removeActiveGroup();
-2150       this.removeActiveObject();
-2151       return this;
-2152     },
-2153     
-2154     /**
-2155      * Returns number representation of an instance complexity
-2156      * @method complexity
-2157      * @return {Number} complexity
-2158      */
-2159     complexity: function () {
-2160       return this.getObjects().reduce(function (memo, current) {
-2161         memo += current.complexity ? current.complexity() : 0;
-2162         return memo;
-2163       }, 0);
-2164     },
-2165     
-2166     /**
-2167      * Clears a canvas element and removes all event handlers.
-2168      * @method dispose
-2169      * @return {fabric.Element} thisArg
-2170      * @chainable
-2171      */
-2172     dispose: function () {
-2173       this.clear();
-2174       removeListener(this.getElement(), 'mousedown', this._onMouseDown);
-2175       removeListener(document, 'mouseup', this._onMouseUp);
-2176       removeListener(document, 'mousemove', this._onMouseMove);
-2177       removeListener(window, 'resize', this._onResize);
-2178       return this;
-2179     },
-2180     
-2181     /**
-2182      * Clones canvas instance
-2183      * @method clone
-2184      * @param {Object} [callback] Expects `onBeforeClone` and `onAfterClone` functions
-2185      * @return {fabric.Element} Clone of this instance
-2186      */
-2187     clone: function (callback) {
-2188       var el = document.createElement('canvas');
-2189       
-2190       el.width = this.getWidth();
-2191       el.height = this.getHeight();
-2192           
-2193       // cache
-2194       var clone = this.__clone || (this.__clone = new fabric.Element(el));
-2195       
-2196       return clone.loadFromJSON(JSON.stringify(this.toJSON()), function () {
-2197         if (callback) {
-2198           callback(clone);
-2199         }
-2200       });
-2201     },
-2202     
-2203     /**
-2204      * @private
-2205      * @method _toDataURL
-2206      * @param {String} format
-2207      * @param {Function} callback
-2208      */
-2209     _toDataURL: function (format, callback) {
-2210       this.clone(function (clone) {
-2211         callback(clone.toDataURL(format));
-2212       });
-2213     },
-2214     
-2215     /**
-2216      * @private
-2217      * @method _toDataURLWithMultiplier
-2218      * @param {String} format
-2219      * @param {Number} multiplier
-2220      * @param {Function} callback
-2221      */
-2222     _toDataURLWithMultiplier: function (format, multiplier, callback) {
-2223       this.clone(function (clone) {
-2224         callback(clone.toDataURLWithMultiplier(format, multiplier));
-2225       });
-2226     },
-2227     
-2228     /**
-2229      * @private
-2230      * @method _resizeImageToFit
-2231      * @param {HTMLImageElement} imgEl
-2232      */
-2233     _resizeImageToFit: function (imgEl) {
-2234       
-2235       var imageWidth = imgEl.width || imgEl.offsetWidth,
-2236           widthScaleFactor = this.getWidth() / imageWidth;
-2237       
-2238       // scale image down so that it has original dimensions when printed in large resolution
-2239       if (imageWidth) {
-2240         imgEl.width = imageWidth * widthScaleFactor;
-2241       }
-2242     },
-2243     
-2244     /**
-2245      * @property
-2246      * @namespace
-2247      */
-2248     cache: {
-2249       
-2250       /**
-2251        * @method has
-2252        * @param {String} name
-2253        * @param {Function} callback
-2254        */
-2255       has: function (name, callback) { 
-2256         callback(false);
-2257       },
-2258       
-2259       /**
-2260        * @method get
-2261        * @param {String} url
-2262        * @param {Function} callback
-2263        */
-2264       get: function (url, callback) {
-2265         /* NOOP */
-2266       },
-2267       
-2268       /**
-2269        * @method set
-2270        * @param {String} url
-2271        * @param {Object} object
-2272        */
-2273       set: function (url, object) {
-2274         /* NOOP */
-2275       }
-2276     }
-2277   });
-2278   
-2279   /**
-2280    * Returns a string representation of an instance
-2281    * @method toString
-2282    * @return {String} string representation of an instance
-2283    */
-2284   fabric.Element.prototype.toString = function () { // Assign explicitly since `extend` doesn't take care of DontEnum bug yet
-2285     return '#<fabric.Element (' + this.complexity() + '): '+
-2286            '{ objects: ' + this.getObjects().length + ' }>';
-2287   };
-2288   
-2289   extend(fabric.Element, /** @scope fabric.Element */ {
-2290     
-2291     /**
-2292      * @static
-2293      * @property EMPTY_JSON
-2294      * @type String
-2295      */
-2296     EMPTY_JSON: '{"objects": [], "background": "white"}',
-2297     
-2298     /**
-2299      * Takes <canvas> element and transforms its data in such way that it becomes grayscale
-2300      * @static
-2301      * @method toGrayscale
-2302      * @param {HTMLCanvasElement} canvasEl
-2303      */
-2304     toGrayscale: function (canvasEl) {
-2305        var context = canvasEl.getContext('2d'),
-2306            imageData = context.getImageData(0, 0, canvasEl.width, canvasEl.height),
-2307            data = imageData.data, 
-2308            iLen = imageData.width,
-2309            jLen = imageData.height,
-2310            index, average;
-2311 
-2312        for (i = 0; i < iLen; i++) {
-2313          for (j = 0; j < jLen; j++) {
-2314 
-2315            index = (i * 4) * jLen + (j * 4);
-2316            average = (data[index] + data[index + 1] + data[index + 2]) / 3;
-2317 
-2318            data[index]     = average;
-2319            data[index + 1] = average;
-2320            data[index + 2] = average;
-2321          }
-2322        }
-2323 
-2324        context.putImageData(imageData, 0, 0);
-2325      },
-2326     
-2327     /**
-2328      * Provides a way to check support of some of the canvas methods 
-2329      * (either those of HTMLCanvasElement itself, or rendering context)
-2330      *
-2331      * @method supports
-2332      * @param methodName {String} Method to check support for; 
-2333      *                            Could be one of "getImageData" or "toDataURL"
-2334      * @return {Boolean | null} `true` if method is supported (or at least exists), 
-2335      *                          `null` if canvas element or context can not be initialized
-2336      */
-2337     supports: function (methodName) {
-2338       var el = document.createElement('canvas');
-2339       
-2340       if (typeof G_vmlCanvasManager !== 'undefined') {
-2341         G_vmlCanvasManager.initElement(el);
-2342       }
-2343       if (!el || !el.getContext) {
-2344         return null;
-2345       }
-2346       
-2347       var ctx = el.getContext('2d');
-2348       if (!ctx) {
-2349         return null;
-2350       }
-2351       
-2352       switch (methodName) {
-2353         
-2354         case 'getImageData':
-2355           return typeof ctx.getImageData !== 'undefined';
-2356           
-2357         case 'toDataURL':
-2358           return typeof el.toDataURL !== 'undefined';
-2359           
-2360         default:
-2361           return null;
-2362       }
-2363     }
-2364     
-2365   });
-2366   
-2367   /**
-2368    * Returs JSON representation of canvas
-2369    * @function
-2370    * @method toJSON
-2371    * @return {String} json string
-2372    */
-2373   fabric.Element.prototype.toJSON = fabric.Element.prototype.toObject;
-2374 })();
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_ellipse.class.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_ellipse.class.js.html deleted file mode 100644 index 02efb8c7..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_ellipse.class.js.html +++ /dev/null @@ -1,131 +0,0 @@ -
  1 //= require "object.class"
-  2 
-  3 (function(){
-  4   
-  5   var fabric = this.fabric || (this.fabric = { }),
-  6       piBy2   = Math.PI * 2,
-  7       extend = fabric.util.object.extend;
-  8   
-  9   if (fabric.Ellipse) {
- 10     fabric.warn('fabric.Ellipse is already defined.');
- 11     return;
- 12   }
- 13   
- 14   /** 
- 15    * @class Ellipse
- 16    * @extends fabric.Object
- 17    */
- 18   fabric.Ellipse = fabric.util.createClass(fabric.Object, /** @scope fabric.Ellipse.prototype */ {
- 19     
- 20     /** @property */
- 21     type: 'ellipse',
- 22     
- 23     /**
- 24      * Constructor
- 25      * @method initialize
- 26      * @param {Object} [options] Options object
- 27      * @return {Object} thisArg
- 28      */
- 29     initialize: function(options) {
- 30       options = options || { };
- 31       
- 32       this.callSuper('initialize', options);
- 33       
- 34       this.set('rx', options.rx || 0);
- 35       this.set('ry', options.ry || 0);
- 36       
- 37       this.set('width', this.get('rx') * 2);
- 38       this.set('height', this.get('ry') * 2);
- 39     },
- 40     
- 41     /**
- 42      * Returns object representation of an instance
- 43      * @method toObject
- 44      * @return {Object} object representation of an instance
- 45      */
- 46     toObject: function() {
- 47       return extend(this.callSuper('toObject'), {
- 48         rx: this.get('rx'),
- 49         ry: this.get('ry')
- 50       });
- 51     },
- 52     
- 53     /**
- 54      * @method render
- 55      * @param ctx {CanvasRenderingContext2D} context to render on
- 56      * @param noTransform {Boolean} context is not transformed when set to true
- 57      */
- 58     render: function(ctx, noTransform) {
- 59       // do not use `get` for perf. reasons
- 60       if (this.rx === 0 || this.ry === 0) return;
- 61       return this.callSuper('render', ctx, noTransform);
- 62     },
- 63     
- 64     /**
- 65      * @private
- 66      * @method _render
- 67      * @param ctx {CanvasRenderingContext2D} context to render on
- 68      */
- 69     _render: function(ctx, noTransform) {
- 70       ctx.beginPath();
- 71       ctx.save();
- 72       ctx.transform(1, 0, 0, this.ry/this.rx, 0, 0);
- 73       ctx.arc(noTransform ? this.left : 0, noTransform ? this.top : 0, this.rx, 0, piBy2, false);
- 74       ctx.restore();
- 75       if (this.stroke) {
- 76         ctx.stroke();
- 77       }
- 78       if (this.fill) {
- 79         ctx.fill();
- 80       }
- 81     },
- 82     
- 83     /**
- 84      * @method complexity
- 85      * @return {Number} complexity
- 86      */
- 87     complexity: function() {
- 88       return 1;
- 89     }
- 90   });
- 91   
- 92   fabric.Ellipse.ATTRIBUTE_NAMES = 'cx cy rx ry fill fill-opacity stroke stroke-width transform'.split(' ');
- 93   
- 94   /**
- 95    * Returns fabric.Ellipse instance from an SVG element
- 96    * @static
- 97    * @method fabric.Ellipse.fromElement
- 98    * @param {SVGElement} element Element to parse
- 99    * @param {Object} [options] Options object
-100    * @return {fabric.Ellipse}
-101    */
-102   fabric.Ellipse.fromElement = function(element, options) {
-103     options || (options = { });
-104     var parsedAttributes = fabric.parseAttributes(element, fabric.Ellipse.ATTRIBUTE_NAMES);
-105     if ('left' in parsedAttributes) {
-106       parsedAttributes.left -= (options.width / 2) || 0;
-107     }
-108     if ('top' in parsedAttributes) {
-109       parsedAttributes.top -= (options.height / 2) || 0;
-110     }
-111     return new fabric.Ellipse(extend(parsedAttributes, options));
-112   };
-113   
-114   /**
-115    * Returns fabric.Ellipse instance from an object representation
-116    * @static
-117    * @method fabric.Ellipse.fromObject
-118    * @param {Object} object Object to create an instance from
-119    * @return {fabric.Ellipse}
-120    */
-121   fabric.Ellipse.fromObject = function(object) {
-122     return new fabric.Ellipse(object);
-123   }
-124 })();
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_group.class.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_group.class.js.html deleted file mode 100644 index 42755894..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_group.class.js.html +++ /dev/null @@ -1,463 +0,0 @@ -
  1 //= require "object.class"
-  2 
-  3 (function(){
-  4   
-  5   var fabric = this.fabric || (this.fabric = { }),
-  6       extend = fabric.util.object.extend,
-  7       min = fabric.util.array.min,
-  8       max = fabric.util.array.max,
-  9       invoke = fabric.util.array.invoke,
- 10       removeFromArray = fabric.util.removeFromArray;
- 11       
- 12   if (fabric.Group) {
- 13     return;
- 14   }
- 15   
- 16   /** 
- 17    * @class Group
- 18    * @extends fabric.Object
- 19    */
- 20   fabric.Group = fabric.util.createClass(fabric.Object, /** @scope fabric.Group.prototype */ {
- 21     
- 22     /**
- 23      * @property
- 24      * @type String
- 25      */
- 26     type: 'group',
- 27     
- 28     /**
- 29      * Constructor
- 30      * @method initialized
- 31      * @param {Object} objects Group objects
- 32      * @param {Object} [options] Options object
- 33      * @return {Object} thisArg
- 34      */
- 35     initialize: function(objects, options) {
- 36       this.objects = objects || [];
- 37       this.originalState = { };
- 38       
- 39       this.callSuper('initialize');
- 40       
- 41       this._calcBounds();
- 42       this._updateObjectsCoords();
- 43       
- 44       if (options) {
- 45         extend(this, options);
- 46       }
- 47       this._setOpacityIfSame();
- 48       
- 49       // group is active by default
- 50       this.setCoords(true);
- 51       this.saveCoords();
- 52       
- 53       this.activateAllObjects();
- 54     },
- 55     
- 56     /**
- 57      * @private
- 58      * @method _updateObjectsCoords
- 59      */
- 60     _updateObjectsCoords: function() {
- 61       var groupDeltaX = this.left,
- 62           groupDeltaY = this.top;
- 63       
- 64       this.forEachObject(function(object) {
- 65         
- 66         var objectLeft = object.get('left'),
- 67             objectTop = object.get('top');
- 68         
- 69         object.set('originalLeft', objectLeft);
- 70         object.set('originalTop', objectTop);
- 71         
- 72         object.set('left', objectLeft - groupDeltaX);
- 73         object.set('top', objectTop - groupDeltaY);
- 74         
- 75         object.setCoords();
- 76         
- 77         // do not display corners of objects enclosed in a group
- 78         object.hideCorners = true;
- 79       }, this);
- 80     },
- 81     
- 82     /**
- 83      * Returns string represenation of a group
- 84      * @method toString
- 85      * @return {String}
- 86      */
- 87     toString: function() {
- 88       return '#<fabric.Group: (' + this.complexity() + ')>';
- 89     },
- 90     
- 91     /**
- 92      * Returns an array of all objects in this group
- 93      * @method getObjects
- 94      * @return {Array} group objects
- 95      */
- 96     getObjects: function() {
- 97       return this.objects;
- 98     },
- 99     
-100     /**
-101      * Adds an object to a group; Then recalculates group's dimension, position.
-102      * @method add
-103      * @param {Object} object
-104      * @return {fabric.Group} thisArg
-105      * @chainable
-106      */
-107     add: function(object) {
-108       this._restoreObjectsState();
-109       this.objects.push(object);
-110       object.setActive(true);
-111       this._calcBounds();
-112       this._updateObjectsCoords();
-113       return this;
-114     },
-115     
-116     /**
-117      * Removes an object from a group; Then recalculates group's dimension, position.
-118      * @param {Object} object
-119      * @return {fabric.Group} thisArg
-120      * @chainable
-121      */
-122     remove: function(object) {
-123       this._restoreObjectsState();
-124       removeFromArray(this.objects, object);
-125       object.setActive(false);
-126       this._calcBounds();
-127       this._updateObjectsCoords();
-128       return this;
-129     },
-130     
-131     /**
-132      * Returns a size of a group (i.e: length of an array containing its objects)
-133      * @return {Number} Group size
-134      */
-135     size: function() {
-136       return this.getObjects().length;
-137     },
-138   
-139     /**
-140      * Sets property to a given value
-141      * @method set
-142      * @param {String} name
-143      * @param {Object|Function} value
-144      * @return {fabric.Group} thisArg
-145      * @chainable
-146      */
-147     set: function(name, value) {
-148       if (typeof value == 'function') {
-149         // recurse
-150         this.set(name, value(this[name]));
-151       }
-152       else {
-153         if (name === 'fill' || name === 'opacity') {
-154           var i = this.objects.length;
-155           this[name] = value;
-156           while (i--) {
-157             this.objects[i].set(name, value);
-158           }
-159         }
-160         else {
-161           this[name] = value;
-162         }
-163       }
-164       return this;
-165     },
-166   
-167     /**
-168      * Returns true if a group contains an object
-169      * @method contains
-170      * @param {Object} object Object to check against
-171      * @return {Boolean} `true` if group contains an object
-172      */
-173     contains: function(object) {
-174       return this.objects.indexOf(object) > -1;
-175     },
-176     
-177     /**
-178      * Returns object representation of an instance
-179      * @method toObject
-180      * @return {Object} object representation of an instance
-181      */
-182     toObject: function() {
-183       return extend(this.callSuper('toObject'), {
-184         objects: invoke(this.objects, 'clone')
-185       });
-186     },
-187     
-188     /**
-189      * Renders instance on a given context
-190      * @method render
-191      * @param {CanvasRenderingContext2D} ctx context to render instance on
-192      */
-193     render: function(ctx) {
-194       ctx.save();
-195       this.transform(ctx);
-196       
-197       var groupScaleFactor = Math.max(this.scaleX, this.scaleY);
-198       
-199       for (var i = 0, len = this.objects.length, object; object = this.objects[i]; i++) {
-200         var originalScaleFactor = object.borderScaleFactor;
-201         object.borderScaleFactor = groupScaleFactor;
-202         object.render(ctx);
-203         object.borderScaleFactor = originalScaleFactor;
-204       }
-205       this.hideBorders || this.drawBorders(ctx);
-206       this.hideCorners || this.drawCorners(ctx);
-207       ctx.restore();
-208       this.setCoords();
-209     },
-210     
-211     /**
-212      * Returns object from the group at the specified index
-213      * @method item
-214      * @param index {Number} index of item to get
-215      * @return {fabric.Object}
-216      */
-217     item: function(index) {
-218       return this.getObjects()[index];
-219     },
-220     
-221     /**
-222      * Returns complexity of an instance
-223      * @method complexity
-224      * @return {Number} complexity
-225      */
-226     complexity: function() {
-227       return this.getObjects().reduce(function(total, object) {
-228         total += (typeof object.complexity == 'function') ? object.complexity() : 0;
-229         return total;
-230       }, 0);
-231     },
-232     
-233     /**
-234      * Retores original state of each of group objects (original state is that which was before group was created).
-235      * @private
-236      * @method _restoreObjectsState
-237      * @return {fabric.Group} thisArg
-238      * @chainable
-239      */
-240     _restoreObjectsState: function() {
-241       this.objects.forEach(this._restoreObjectState, this);
-242       return this;
-243     },
-244     
-245     /**
-246      * Restores original state of a specified object in group
-247      * @private
-248      * @method _restoreObjectState
-249      * @param {fabric.Object} object
-250      * @return {fabric.Group} thisArg
-251      */
-252     _restoreObjectState: function(object) {
-253       
-254       var groupLeft = this.get('left'),
-255           groupTop = this.get('top'),
-256           groupAngle = this.getAngle() * (Math.PI / 180),
-257           objectLeft = object.get('originalLeft'),
-258           objectTop = object.get('originalTop'),
-259           rotatedTop = Math.cos(groupAngle) * object.get('top') + Math.sin(groupAngle) * object.get('left'),
-260           rotatedLeft = -Math.sin(groupAngle) * object.get('top') + Math.cos(groupAngle) * object.get('left');
-261       
-262       object.setAngle(object.getAngle() + this.getAngle());
-263       
-264       object.set('left', groupLeft + rotatedLeft * this.get('scaleX'));
-265       object.set('top', groupTop + rotatedTop * this.get('scaleY'));
-266       
-267       object.set('scaleX', object.get('scaleX') * this.get('scaleX'));
-268       object.set('scaleY', object.get('scaleY') * this.get('scaleY'));
-269       
-270       object.setCoords();
-271       object.hideCorners = false;
-272       object.setActive(false);
-273       object.setCoords();
-274       
-275       return this;
-276     },
-277     
-278     /**
-279      * Destroys a group (restoring state of its objects)
-280      * @method destroy
-281      * @return {fabric.Group} thisArg
-282      * @chainable
-283      */
-284     destroy: function() {
-285       return this._restoreObjectsState();
-286     },
-287     
-288     /**
-289      * @saveCoords
-290      * @return {fabric.Group} thisArg
-291      * @chainable
-292      */
-293     saveCoords: function() {
-294       this._originalLeft = this.get('left');
-295       this._originalTop = this.get('top');
-296       return this;
-297     },
-298     
-299     /**
-300      * @method hasMoved
-301      * @return {Boolean} true if an object was moved (since fabric.Group#saveCoords was called)
-302      */
-303     hasMoved: function() {
-304       return this._originalLeft !== this.get('left') ||
-305              this._originalTop !== this.get('top');
-306     },
-307     
-308     /**
-309      * Sets coordinates of all group objects
-310      * @method setObjectsCoords
-311      * @return {fabric.Group} thisArg
-312      * @chainable
-313      */
-314     setObjectsCoords: function() {
-315       this.forEachObject(function(object) {
-316         object.setCoords();
-317       });
-318       return this;
-319     },
-320     
-321     /**
-322      * Activates (makes active) all group objects
-323      * @method activateAllObjects
-324      * @return {fabric.Group} thisArg
-325      * @chainable
-326      */
-327     activateAllObjects: function() {
-328       return this.setActive(true);
-329     },
-330     
-331     /**
-332      * Activates (makes active) all group objects
-333      * @method setActive
-334      * @param {Boolean} value `true` to activate object, `false` otherwise
-335      * @return {fabric.Group} thisArg
-336      * @chainable
-337      */
-338     setActive: function(value) {
-339       this.forEachObject(function(object) {
-340         object.setActive(value);
-341       });
-342       return this;
-343     },
-344     
-345     /**
-346      * @method forEachObject
-347      * @param {Function} callback 
-348      *                   Callback invoked with current object as first argument, 
-349      *                   index - as second and an array of all objects - as third.
-350      *                   Iteration happens in reverse order (for performance reasons).
-351      *                   Callback is invoked in a context of Global Object (e.g. `window`) 
-352      *                   when no `context` argument is given
-353      *
-354      * @param {Object} context Context (aka thisObject)
-355      *
-356      * @return {fabric.Group} thisArg
-357      * @chainable
-358      */
-359     forEachObject: function(callback, context) {
-360       var objects = this.getObjects(),
-361           i = objects.length;
-362       while (i--) {
-363         callback.call(context, objects[i], i, objects);
-364       }
-365       return this;
-366     },
-367     
-368     /**
-369      * @private
-370      * @method _setOpacityIfSame
-371      */
-372     _setOpacityIfSame: function() {
-373       var objects = this.getObjects(),
-374           firstValue = objects[0] ? objects[0].get('opacity') : 1;
-375           
-376       var isSameOpacity = objects.every(function(o) {
-377         return o.get('opacity') === firstValue;
-378       });
-379       
-380       if (isSameOpacity) {
-381         this.opacity = firstValue;
-382       }
-383     },
-384     
-385     /**
-386      * @private
-387      * @method _calcBounds
-388      */
-389     _calcBounds: function() {
-390       var aX = [], 
-391           aY = [], 
-392           minX, minY, maxX, maxY, o, width, height, 
-393           i = 0,
-394           len = this.objects.length;
-395 
-396       for (; i < len; ++i) {
-397         o = this.objects[i];
-398         o.setCoords();
-399         for (var prop in o.oCoords) {
-400           aX.push(o.oCoords[prop].x);
-401           aY.push(o.oCoords[prop].y);
-402         }
-403       };
-404       
-405       minX = min(aX);
-406       maxX = max(aX);
-407       minY = min(aY);
-408       maxY = max(aY);
-409       
-410       width = maxX - minX;
-411       height = maxY - minY;
-412       
-413       this.width = width;
-414       this.height = height;
-415       
-416       this.left = minX + width / 2;
-417       this.top = minY + height / 2;
-418     },
-419     
-420     /**
-421      * @method containsPoint
-422      * @param {Object} point point with `x` and `y` properties
-423      * @return {Boolean} true if point is contained within group
-424      */
-425     containsPoint: function(point) {
-426       
-427       var halfWidth = this.get('width') / 2,
-428           halfHeight = this.get('height') / 2,
-429           centerX = this.get('left'),
-430           centerY = this.get('top');
-431           
-432       return  centerX - halfWidth < point.x && 
-433               centerX + halfWidth > point.x &&
-434               centerY - halfHeight < point.y &&
-435               centerY + halfHeight > point.y;
-436     },
-437     
-438     toGrayscale: function() {
-439       var i = this.objects.length;
-440       while (i--) {
-441         this.objects[i].toGrayscale();
-442       }
-443     }
-444   });
-445   
-446   /**
-447    * @static
-448    * @method fabric.Group.fromObject
-449    * @param object {Object} object to create a group from
-450    * @param options {Object} options object
-451    * @return {fabric.Group} an instance of fabric.Group
-452    */
-453   fabric.Group.fromObject = function(object) {
-454     return new fabric.Group(object.objects, object);
-455   }
-456 })();
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_image.class.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_image.class.js.html deleted file mode 100644 index 3f8a3088..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_image.class.js.html +++ /dev/null @@ -1,412 +0,0 @@ -
  1 //= require "object.class"
-  2 
-  3 (function() {
-  4   
-  5   var global = this,
-  6       extend = fabric.util.object.extend;
-  7   
-  8   if (!global.fabric) {
-  9     global.fabric = { };
- 10   }
- 11   
- 12   if (global.fabric.Image) {
- 13     fabric.warn('fabric.Image is already defined.');
- 14     return;
- 15   };
- 16   
- 17   if (!fabric.Object) {
- 18     fabric.warn('fabric.Object is required for fabric.Image initialization');
- 19     return;
- 20   }
- 21   
- 22   /** 
- 23    * @class Image
- 24    * @extends fabric.Object
- 25    */
- 26   fabric.Image = fabric.util.createClass(fabric.Object, /** @scope fabric.Image.prototype */ {
- 27     
- 28     /**
- 29      * @property
- 30      * @type Number
- 31      */
- 32     maxwidth: null,
- 33     
- 34     /**
- 35      * @property
- 36      * @type Number
- 37      */
- 38     maxheight: null,
- 39     
- 40     /**
- 41      * @property
- 42      * @type Boolean
- 43      */
- 44     active: false,
- 45     
- 46     /**
- 47      * @property
- 48      * @type Boolean
- 49      */
- 50     bordervisibility: false,
- 51     
- 52     /**
- 53      * @property
- 54      * @type Boolean
- 55      */
- 56     cornervisibility: false,
- 57     
- 58     /**
- 59      * @property
- 60      * @type String
- 61      */
- 62     type: 'image',
- 63     
- 64     __isGrayscaled: false,
- 65     
- 66     /**
- 67      * Constructor
- 68      * @param {HTMLImageElement | String} element Image element
- 69      * @param {Object} options optional
- 70      */
- 71     initialize: function(element, options) {
- 72       this.callSuper('initialize', options);
- 73       this._initElement(element);
- 74       this._initConfig(options || { });
- 75     },
- 76     
- 77     /**
- 78      * Returns image element which this instance if based on
- 79      * @method getElement
- 80      * @return {HTMLImageElement} image element
- 81      */
- 82     getElement: function() {
- 83       return this._element;
- 84     },
- 85     
- 86     /**
- 87      * Sets image element for this instance to a specified one
- 88      * @method setElement
- 89      * @param {HTMLImageElement} element
- 90      * @return {fabric.Image} thisArg
- 91      * @chainable
- 92      */
- 93     setElement: function(element) {
- 94       this._element = element;
- 95       return this;
- 96     },
- 97     
- 98     /**
- 99      * Resizes an image depending on whether maxwidth and maxheight are set up;
-100      * Width and height have to mantain the same proportion in the final image as it was in the initial one.
-101      * @method getNormalizedSize
-102      * @param {Object} oImg
-103      * @param {Number} maxwidth maximum width of the image (in px)
-104      * @param {Number} maxheight maximum height of the image (in px)
-105      */ 
-106     getNormalizedSize: function(oImg, maxwidth, maxheight) {
-107       if (maxheight && maxwidth && (oImg.width > oImg.height && (oImg.width / oImg.height) < (maxwidth / maxheight))) {
-108         // height is the constraining dimension.
-109         normalizedWidth = ~~((oImg.width * maxheight) / oImg.height);
-110         normalizedHeight = maxheight;
-111       }
-112       else if (maxheight && ((oImg.height == oImg.width) || (oImg.height > oImg.width) || (oImg.height > maxheight))) {
-113         // height is the constraining dimension.
-114         normalizedWidth = ~~((oImg.width * maxheight) / oImg.height);
-115         normalizedHeight = maxheight;
-116       }
-117       else if (maxwidth && (maxwidth < oImg.width)) {
-118         // width is the constraining dimension.
-119         normalizedHeight = ~~((oImg.height * maxwidth) / oImg.width);
-120         normalizedWidth = maxwidth;
-121       }
-122       else {
-123         normalizedWidth = oImg.width;
-124         normalizedHeight = oImg.height;
-125       }
-126       
-127       return { 
-128         width: normalizedWidth, 
-129         height: normalizedHeight 
-130       };
-131     },
-132     
-133     /**
-134      * Returns original size of an image
-135      * @method getOriginalSize
-136      * @return {Object} object with "width" and "height" properties
-137      */
-138     getOriginalSize: function() {
-139       var element = this.getElement();
-140       return { 
-141         width: element.width, 
-142         height: element.height
-143       };
-144     },
-145     
-146     /**
-147      * Sets border visibility
-148      * @method setBorderVisibility
-149      * @param {Boolean} visible When true, border is set to be visible
-150      */
-151     setBorderVisibility: function(visible) {
-152       this._resetWidthHeight();
-153       this._adjustWidthHeightToBorders(showBorder);
-154       this.setCoords();
-155     },
-156     
-157     /**
-158      * Sets corner visibility
-159      * @method setCornersVisibility
-160      * @param {Boolean} visible When true, corners are set to be visible
-161      */
-162     setCornersVisibility: function(visible) {
-163       this.cornervisibility = !!visible;
-164     },
-165     
-166     /**
-167      * Renders image on a specified context
-168      * @method render
-169      * @param {CanvasRenderingContext2D} ctx Context to render on
-170      */
-171     render: function(ctx, noTransform) {
-172       ctx.save();
-173       if (!noTransform) {
-174         this.transform(ctx);
-175       }
-176       this._render(ctx);
-177       if (this.active && !noTransform) {
-178         this.drawBorders(ctx);
-179         this.hideCorners || this.drawCorners(ctx);
-180       }
-181       ctx.restore();
-182     },
-183     
-184     /**
-185      * Returns object representation of an instance
-186      * @method toObject
-187      * @return {Object} Object representation of an instance
-188      */
-189     toObject: function() {
-190       return extend(this.callSuper('toObject'), {
-191         src: this.getSrc()
-192       });
-193     },
-194     
-195     /**
-196      * Returns source of an image
-197      * @method getSrc
-198      * @return {String} Source of an image
-199      */
-200     getSrc: function() {
-201       return this.getElement().src;
-202     },
-203     
-204     /**
-205      * Returns string representation of an instance
-206      * @method toString
-207      * @return {String} String representation of an instance
-208      */
-209     toString: function() {        
-210       return '#<fabric.Image: { src: "' + this.getSrc() + '" }>';
-211     },
-212     
-213     /**
-214      * Returns a clone of an instance
-215      * @mthod clone
-216      * @param {Function} callback Callback is invoked with a clone as a first argument
-217      */
-218     clone: function(callback) {
-219       this.constructor.fromObject(this.toObject(), callback);
-220     },
-221     
-222     /**
-223      * Makes image grayscale
-224      * @mthod toGrayscale
-225      * @param {Function} callback
-226      */
-227     toGrayscale: function(callback) {
-228       
-229       if (this.__isGrayscaled) {
-230         return;
-231       }
-232       
-233       var imgEl = this.getElement(),
-234           canvasEl = document.createElement('canvas'),
-235           replacement = document.createElement('img'),
-236           _this = this;
-237 
-238       canvasEl.width = imgEl.width;
-239       canvasEl.height = imgEl.height;
-240 
-241       canvasEl.getContext('2d').drawImage(imgEl, 0, 0);
-242       fabric.Element.toGrayscale(canvasEl);
-243       
-244       /** @ignore */
-245       replacement.onload = function() {
-246         _this.setElement(replacement);
-247         callback && callback();
-248         replacement.onload = canvasEl = imgEl = imageData = null;
-249       };
-250       replacement.width = imgEl.width;
-251       replacement.height = imgEl.height;
-252       
-253       replacement.src = canvasEl.toDataURL('image/png');
-254       
-255       this.__isGrayscaled = true;
-256       
-257       return this;
-258     },
-259     
-260     /**
-261      * @private
-262      */
-263     _render: function(ctx) {
-264       var originalImgSize = this.getOriginalSize();
-265       ctx.drawImage(
-266         this.getElement(),
-267         - originalImgSize.width / 2,
-268         - originalImgSize.height / 2,
-269         originalImgSize.width,
-270         originalImgSize.height
-271       );
-272     },
-273     
-274     /**
-275      * @private
-276      */
-277     _adjustWidthHeightToBorders: function(showBorder) {
-278       if (showBorder) {
-279         this.currentBorder = this.borderwidth;
-280         this.width += (2 * this.currentBorder);
-281         this.height += (2 * this.currentBorder);
-282       }
-283       else {
-284         this.currentBorder = 0;
-285       }
-286     },
-287     
-288     /**
-289      * @private
-290      */
-291     _resetWidthHeight: function() {
-292       var element = this.getElement();
-293       
-294       this.set('width', element.width);
-295       this.set('height', element.height);
-296     },
-297     
-298     /**
-299      * The Image class's initialization method. This method is automatically 
-300      * called by the constructor.
-301      * @method _initElement
-302      * @param {HTMLImageElement|String} el The element representing the image
-303      */
-304     _initElement: function(element) {
-305       this.setElement(fabric.util.getById(element));
-306       fabric.util.addClass(this.getElement(), fabric.Image.CSS_CANVAS);
-307     },
-308     
-309     /**
-310      * @method _initConfig
-311      * @param {Object} options Options object
-312      */
-313     _initConfig: function(options) {
-314       this.setOptions(options);
-315       this._setBorder();
-316       this._setWidthHeight(options);
-317     },
-318     
-319     /**
-320      * @private
-321      */
-322     _setBorder: function() {
-323       if (this.bordervisibility) {
-324         this.currentBorder = this.borderwidth;
-325       }
-326       else {
-327         this.currentBorder = 0;
-328       }
-329     },
-330     
-331     /**
-332      * @private
-333      */
-334     _setWidthHeight: function(options) {
-335       var sidesBorderWidth = 2 * this.currentBorder;
-336       this.width = (this.getElement().width || 0) + sidesBorderWidth;
-337       this.height = (this.getElement().height || 0) + sidesBorderWidth;
-338     },
-339     
-340     /**
-341      * Returns complexity of an instance
-342      * @method complexity
-343      * @return {Number} complexity
-344      */
-345     complexity: function() {
-346       return 1;
-347     }
-348   });
-349   
-350   /**
-351    * Default CSS class name for canvas
-352    * @static
-353    * @type String
-354    */
-355   fabric.Image.CSS_CANVAS = "canvas-img";
-356   
-357   /**
-358    * Creates an instance of fabric.Image from its object representation
-359    * @static
-360    * @method fromObject
-361    * @param object {Object}
-362    * @param callback {Function} optional
-363    */
-364   fabric.Image.fromObject = function(object, callback) {
-365     var img = document.createElement('img'),
-366         src = object.src;
-367         
-368     if (object.width) {
-369       img.width = object.width;
-370     }
-371     if (object.height) {
-372       img.height = object.height;
-373     }
-374     
-375     /** @ignore */
-376     img.onload = function() {
-377       if (callback) {
-378         callback(new fabric.Image(img, object));
-379       }
-380       img = img.onload = null;
-381     };
-382     img.src = src;
-383   };
-384   
-385   /**
-386    * Creates an instance of fabric.Image from an URL string
-387    * @static
-388    * @method fromURL
-389    * @param {String} url URL to create an image from
-390    * @param {Function} [callback] Callback to invoke when image is created (newly created image is passed as a first argument)
-391    * @param {Object} [imgOptions] Options object
-392    */
-393   fabric.Image.fromURL = function(url, callback, imgOptions) {
-394     var img = document.createElement('img');
-395     
-396     /** @ignore */
-397     img.onload = function() {
-398       if (callback) {
-399         callback(new fabric.Image(img, imgOptions));
-400       }
-401       img = img.onload = null;
-402     };
-403     img.src = url;
-404   };
-405 })();
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_intersection.class.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_intersection.class.js.html deleted file mode 100644 index fb14e15e..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_intersection.class.js.html +++ /dev/null @@ -1,157 +0,0 @@ -
  1 //= require 'point.class'
-  2 
-  3 (function() {
-  4   
-  5   /* Adaptation of work of Kevin Lindsey (kevin@kevlindev.com) */
-  6   
-  7   var global = this,
-  8       fabric = global.fabric || (global.fabric = { });
-  9   
- 10   if (fabric.Intersection) {    
- 11     fabric.warn('fabric.Intersection is already defined');
- 12     return;
- 13   }
- 14   
- 15   /**
- 16    * @class Intersection
- 17    * @memberOf fabric
- 18    */
- 19   function Intersection(status) {
- 20     if (arguments.length > 0) {
- 21       this.init(status);
- 22     }
- 23   }
- 24   
- 25   fabric.Intersection = Intersection;
- 26   
- 27   fabric.Intersection.prototype = /** @scope fabric.Intersection.prototype */ {
- 28     
- 29     /**
- 30      * @method init
- 31      * @param {String} status
- 32      */
- 33     init: function (status) {
- 34       this.status = status;
- 35       this.points = [];
- 36     },
- 37     
- 38     /**
- 39      * @method appendPoint
- 40      * @param {String} status
- 41      */
- 42     appendPoint: function (point) {
- 43       this.points.push(point);
- 44     },
- 45     
- 46     /**
- 47      * @method appendPoints
- 48      * @param {String} status
- 49      */
- 50     appendPoints: function (points) {
- 51       this.points = this.points.concat(points);
- 52     }
- 53   };
- 54   
- 55   /**
- 56    * @static
- 57    * @method intersectLineLine
- 58    */
- 59   fabric.Intersection.intersectLineLine = function (a1, a2, b1, b2) {
- 60     var result,
- 61         ua_t = (b2.x - b1.x) * (a1.y - b1.y) - (b2.y - b1.y) * (a1.x - b1.x),
- 62         ub_t = (a2.x - a1.x) * (a1.y - b1.y) - (a2.y - a1.y) * (a1.x - b1.x),
- 63         u_b = (b2.y - b1.y) * (a2.x - a1.x) - (b2.x - b1.x) * (a2.y - a1.y);
- 64     if (u_b != 0) {
- 65       var ua = ua_t / u_b,
- 66           ub = ub_t / u_b;
- 67       if (0 <= ua && ua <= 1 && 0 <= ub && ub <= 1) {
- 68         result = new Intersection("Intersection");
- 69         result.points.push(new fabric.Point(a1.x + ua * (a2.x - a1.x), a1.y + ua * (a2.y - a1.y)));
- 70       }
- 71       else {
- 72         result = new Intersection("No Intersection");
- 73       }
- 74     }
- 75     else {
- 76       if (ua_t == 0 || ub_t == 0) {
- 77         result = new Intersection("Coincident");
- 78       }
- 79       else {
- 80         result = new Intersection("Parallel");
- 81       }
- 82     }
- 83     return result;
- 84   };
- 85   
- 86   /**
- 87    * @method intersectLinePolygon
- 88    */
- 89   fabric.Intersection.intersectLinePolygon = function(a1,a2,points){
- 90     var result = new Intersection("No Intersection"),
- 91         length = points.length;
- 92         
- 93     for (var i = 0; i < length; i++) {
- 94       var b1 = points[i],
- 95           b2 = points[(i+1) % length],
- 96           inter = Intersection.intersectLineLine(a1, a2, b1, b2);
- 97           
- 98       result.appendPoints(inter.points);
- 99     }
-100     if (result.points.length > 0) {
-101       result.status = "Intersection";
-102     }
-103     return result;
-104   };
-105   
-106   /**
-107    * @method intersectPolygonPolygon
-108    */
-109   fabric.Intersection.intersectPolygonPolygon = function (points1, points2) {
-110     var result = new Intersection("No Intersection"),
-111         length = points1.length;
-112         
-113     for (var i = 0; i < length; i++) {
-114       var a1 = points1[i],
-115           a2 = points1[(i+1) % length],
-116           inter = Intersection.intersectLinePolygon(a1, a2, points2);
-117           
-118       result.appendPoints(inter.points);
-119     }
-120     if (result.points.length > 0) {
-121       result.status = "Intersection";
-122     }
-123     return result;
-124   };
-125   
-126   /**
-127    * @method intersectPolygonRectangle
-128    */
-129   fabric.Intersection.intersectPolygonRectangle = function (points, r1, r2) {
-130     var min = r1.min(r2),
-131         max = r1.max(r2),
-132         topRight = new fabric.Point(max.x, min.y),
-133         bottomLeft = new fabric.Point(min.x, max.y),
-134         inter1 = Intersection.intersectLinePolygon(min, topRight, points),
-135         inter2 = Intersection.intersectLinePolygon(topRight, max, points),
-136         inter3 = Intersection.intersectLinePolygon(max, bottomLeft, points),
-137         inter4 = Intersection.intersectLinePolygon(bottomLeft, min, points),
-138         result = new Intersection("No Intersection");
-139         
-140     result.appendPoints(inter1.points);
-141     result.appendPoints(inter2.points);
-142     result.appendPoints(inter3.points);
-143     result.appendPoints(inter4.points);
-144     if (result.points.length > 0) {
-145       result.status="Intersection";
-146     }
-147     return result;
-148   };
-149   
-150 })();
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_line.class.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_line.class.js.html deleted file mode 100644 index b38de76d..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_line.class.js.html +++ /dev/null @@ -1,134 +0,0 @@ -
  1 //= require "object.class"
-  2 
-  3 (function() {
-  4   
-  5   var fabric = this.fabric || (this.fabric = { }),
-  6       extend = fabric.util.object.extend;
-  7       
-  8   if (fabric.Line) {
-  9     fabric.warn('fabric.Line is already defined');
- 10     return;
- 11   }
- 12   
- 13   /** 
- 14    * @class Line
- 15    * @extends fabric.Object
- 16    */
- 17   fabric.Line = fabric.util.createClass(fabric.Object, /** @scope fabric.Line.prototype */ {
- 18     
- 19     /**
- 20      * @property
- 21      * @type String
- 22      */
- 23     type: 'line',
- 24     
- 25     /**
- 26      * Constructor
- 27      * @method initialize
- 28      * @param {Array} points Array of points
- 29      * @param {Object} [options] Options object
- 30      * @return {fabric.Line} thisArg
- 31      */
- 32     initialize: function(points, options) {
- 33       if (!points) {
- 34         points = [0, 0, 0, 0];
- 35       }
- 36       
- 37       this.callSuper('initialize', options);
- 38       
- 39       this.set('x1', points[0]);
- 40       this.set('y1', points[1]);
- 41       this.set('x2', points[2]);
- 42       this.set('y2', points[3]);
- 43       
- 44       this.set('width', this.x2 - this.x1);
- 45       this.set('height', this.y2 - this.y1);
- 46       this.set('left', this.x1 + this.width / 2);
- 47       this.set('top', this.y1 + this.height / 2);
- 48     },
- 49     
- 50     /**
- 51      * @private
- 52      * @method _render
- 53      * @param {CanvasRenderingContext2D} ctx Context to render on
- 54      */
- 55     _render: function(ctx) {
- 56       ctx.beginPath();
- 57       
- 58       // move from center (of virtual box) to its left/top corner
- 59       ctx.moveTo(-this.width / 2, -this.height / 2);
- 60       ctx.lineTo(this.width / 2, this.height / 2);
- 61       
- 62       // TODO: test this
- 63       // make sure setting "fill" changes color of a line
- 64       // (by copying fillStyle to strokeStyle, since line is stroked, not filled)
- 65       var origStrokeStyle = ctx.strokeStyle;
- 66       ctx.strokeStyle = ctx.fillStyle;
- 67       ctx.stroke();
- 68       ctx.strokeStyle = origStrokeStyle;
- 69     },
- 70     
- 71     /**
- 72      * @method complexity
- 73      * @return {Number} complexity
- 74      */
- 75     complexity: function() {
- 76       return 1;
- 77     },
- 78     
- 79     /**
- 80      * Returns object representation of an instance
- 81      * @methd toObject
- 82      * @return {Object}
- 83      */
- 84     toObject: function() {
- 85       return extend(this.callSuper('toObject'), {
- 86         x1: this.get('x1'),
- 87         y1: this.get('y1'),
- 88         x2: this.get('x2'),
- 89         y2: this.get('y2')
- 90       });
- 91     }
- 92   });
- 93   
- 94   /**
- 95    * @see http://www.w3.org/TR/SVG/shapes.html#LineElement
- 96    */
- 97   fabric.Element.ATTRIBUTE_NAMES = 'x1 y1 x2 y2 stroke stroke-width transform'.split(' ');
- 98   
- 99   /**
-100    * @static
-101    * @method fabric.Line.fromElement
-102    * @param {SVGElement} element Element to parse
-103    * @param {Object} [options] Options object
-104    * @return {fabric.Line} instance of fabric.Line
-105    */
-106   fabric.Line.fromElement = function(element, options) {
-107     var parsedAttributes = fabric.parseAttributes(element, fabric.Element.ATTRIBUTE_NAMES);
-108     var points = [
-109       parsedAttributes.x1 || 0,
-110       parsedAttributes.y1 || 0,
-111       parsedAttributes.x2 || 0,
-112       parsedAttributes.y2 || 0
-113     ];
-114     return new fabric.Line(points, extend(parsedAttributes, options));
-115   };
-116   
-117   /**
-118    * @static
-119    * @method fabric.Line.fromObject
-120    * @param {Object} object Object to create an instance from
-121    * @return {fabric.Line} instance of fabric.Line
-122    */
-123   fabric.Line.fromObject = function(object) {
-124     var points = [object.x1, object.y1, object.x2, object.y2];
-125     return new fabric.Line(points, object);
-126   };
-127 })();
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_object.class.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_object.class.js.html deleted file mode 100644 index 91775f41..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_object.class.js.html +++ /dev/null @@ -1,1283 +0,0 @@ -
  1 (function(){
-  2   
-  3   var global = this,
-  4       fabric = global.fabric || (global.fabric = { }),
-  5       extend = fabric.util.object.extend,
-  6       clone = fabric.util.object.clone,
-  7       toFixed = fabric.util.toFixed,
-  8       capitalize = fabric.util.string.capitalize,
-  9       getPointer = fabric.util.getPointer,
- 10       slice = Array.prototype.slice
- 11       
- 12   if (fabric.Object) {
- 13     return;
- 14   }
- 15   
- 16   /** 
- 17    * @class Object
- 18    * @memberOf fabric
- 19    */
- 20   fabric.Object = fabric.util.createClass(/** @scope fabric.Object.prototype */ {
- 21     
- 22     /**
- 23      * @property
- 24      * @type String
- 25      */
- 26     type: 'object',
- 27     
- 28     /**
- 29      * @property
- 30      * @type Boolean
- 31      */
- 32     includeDefaultValues: true,
- 33     
- 34     /**
- 35      * @constant
- 36      * @type Number
- 37      */
- 38     NUM_FRACTION_DIGITS:        2,
- 39     
- 40     /**
- 41      * @constant
- 42      * @type Number
- 43      */
- 44     FX_DURATION:                500,
- 45     
- 46     /**
- 47      * @constant
- 48      * @type String
- 49      */
- 50     FX_TRANSITION:              'decel',
- 51     
- 52     /**
- 53      * @constant
- 54      * @type Number
- 55      */
- 56     MIN_SCALE_LIMIT:            0.1,
- 57     
- 58     /**
- 59      * @property
- 60      * @type Array
- 61      */
- 62     stateProperties:  ('top left width height scaleX scaleY flipX flipY ' +
- 63                       'theta angle opacity cornersize fill overlayFill stroke ' +
- 64                       'strokeWidth fillRule borderScaleFactor transformMatrix').split(' '),
- 65     
- 66     // TODO (kangax): rename to `defaultOptions`
- 67     
- 68     /**
- 69      * @property
- 70      * @type Object
- 71      */
- 72     options: {
- 73       top:                      0,
- 74       left:                     0,
- 75       width:                    100,
- 76       height:                   100,
- 77       scaleX:                   1,
- 78       scaleY:                   1,
- 79       flipX:                    false,
- 80       flipY:                    false,
- 81       theta:                    0,
- 82       opacity:                  1,
- 83       angle:                    0,
- 84       cornersize:               10,
- 85       padding:                  0,
- 86       borderColor:              'rgba(102,153,255,0.75)',
- 87       cornerColor:              'rgba(102,153,255,0.5)',
- 88       fill:                     'rgb(0,0,0)',
- 89       overlayFill:              null,
- 90       stroke:                   null,
- 91       strokeWidth:              1,
- 92       fillRule:                 'source-over',
- 93       borderOpacityWhenMoving:  0.4,
- 94       borderScaleFactor:        1,
- 95       transformMatrix:          null
- 96     },
- 97     
- 98     /**
- 99      * @method callSuper
-100      * @param {String} methodName
-101      */
-102     callSuper: function(methodName) {
-103       var fn = this.constructor.superclass.prototype[methodName];
-104       return (arguments.length > 1) 
-105         ? fn.apply(this, slice.call(arguments, 1))
-106         : fn.call(this);
-107     },
-108     
-109     /**
-110      * Constructor
-111      * @method initialize
-112      * @param {Object} [options] Options object
-113      */
-114     initialize: function(options) {
-115       // overwrite default options with specified ones
-116       this.setOptions(options);
-117       // "import" state properties into an instance
-118       this._importProperties();
-119       // create "local" members
-120       this.originalState = { };
-121       // set initial coords
-122       this.setCoords();
-123       // setup state properties
-124       this.saveState();
-125     },
-126     
-127     /**
-128      * @method setOptions
-129      * @param {Object} [options]
-130      */
-131     setOptions: function(options) {
-132       // this.constructor.superclass.prototype.options -> this.options -> options
-133       this.options = extend(this._getOptions(), options);
-134     },
-135     
-136     /**
-137      * @private
-138      * @method _getOptions
-139      */
-140     _getOptions: function() {
-141       return extend(clone(this._getSuperOptions()), this.options);
-142     },
-143     
-144     /**
-145      * @private
-146      * @method _getSuperOptions
-147      */
-148     _getSuperOptions: function() {
-149       var c = this.constructor;
-150       if (c) {
-151         var s = c.superclass;
-152         if (s) {
-153           var p = s.prototype;
-154           if (p && typeof p._getOptions == 'function') {
-155             return p._getOptions();
-156           }
-157         }
-158       }
-159       return { };
-160     },
-161     
-162     /**
-163      * @private
-164      * @method _importProperties
-165      */
-166     _importProperties: function() {
-167       this.stateProperties.forEach(function(prop) {
-168         (prop === 'angle') 
-169           ? this.setAngle(this.options[prop])
-170           : (this[prop] = this.options[prop]);
-171       }, this);
-172     },
-173     
-174     /**
-175      * @method transform
-176      * @param {CanvasRenderingContext2D} ctx Context
-177      */
-178     transform: function(ctx) {
-179       ctx.globalAlpha = this.opacity;
-180       ctx.translate(this.left, this.top);
-181       ctx.rotate(this.theta);
-182       ctx.scale(
-183         this.scaleX * (this.flipX ? -1 : 1), 
-184         this.scaleY * (this.flipY ? -1 : 1)
-185       );
-186     },
-187     
-188     /**
-189      * Returns an object representation of an instance
-190      * @method toObject
-191      * @return {Object}
-192      */
-193     toObject: function() {
-194       var object = {
-195         type: this.type,
-196         left: toFixed(this.left, this.NUM_FRACTION_DIGITS),
-197         top: toFixed(this.top, this.NUM_FRACTION_DIGITS),
-198         width: toFixed(this.width, this.NUM_FRACTION_DIGITS),
-199         height: toFixed(this.height, this.NUM_FRACTION_DIGITS),
-200         fill: this.fill,
-201         overlayFill: this.overlayFill,
-202         stroke: this.stroke,
-203         strokeWidth: this.strokeWidth,
-204         scaleX: toFixed(this.scaleX, this.NUM_FRACTION_DIGITS),
-205         scaleY: toFixed(this.scaleY, this.NUM_FRACTION_DIGITS),
-206         angle: toFixed(this.getAngle(), this.NUM_FRACTION_DIGITS),
-207         flipX: this.flipX,
-208         flipY: this.flipY,
-209         opacity: toFixed(this.opacity, this.NUM_FRACTION_DIGITS)
-210       };
-211       
-212       if (!this.includeDefaultValues) {
-213         object = this._removeDefaultValues(object);
-214       }
-215       return object;
-216     },
-217     
-218     /**
-219      * @method toDatalessObject
-220      */
-221     toDatalessObject: function() {
-222       // will be overwritten by subclasses
-223       return this.toObject();
-224     },
-225     
-226     /**
-227      * @private
-228      * @method _removeDefaultValues
-229      */
-230     _removeDefaultValues: function(object) {
-231       var defaultOptions = fabric.Object.prototype.options;
-232       this.stateProperties.forEach(function(prop) {
-233         if (object[prop] === defaultOptions[prop]) {
-234           delete object[prop];
-235         }
-236       });
-237       return object;
-238     },
-239     
-240     /**
-241      * Returns true if an object is in its active state
-242      * @return {Boolean} true if an object is in its active state
-243      */
-244     isActive: function() {
-245       return !!this.active;
-246     },
-247     
-248     /**
-249      * Sets state of an object - `true` makes it active, `false` - inactive
-250      * @param {Boolean} active
-251      * @return {fabric.Object} thisArg
-252      * @chainable
-253      */
-254     setActive: function(active) {
-255       this.active = !!active;
-256       return this;
-257     },
-258     
-259     /**
-260      * Returns a string representation of an instance
-261      * @return {String}
-262      */
-263     toString: function() {
-264       return "#<fabric." + capitalize(this.type) + ">";
-265     },
-266     
-267     /**
-268      * Basic setter
-269      * @param {Any} property
-270      * @param {Any} value
-271      * @return {fabric.Object} thisArg
-272      * @chainable
-273      */
-274     set: function(property, value) {
-275       var shouldConstrainValue = (property === 'scaleX' || property === 'scaleY') && value < this.MIN_SCALE_LIMIT;
-276       if (shouldConstrainValue) {
-277         value = this.MIN_SCALE_LIMIT;
-278       }
-279       if (property === 'angle') {
-280         this.setAngle(value);
-281       }
-282       else {
-283         this[property] = value;
-284       }
-285       return this;
-286     },
-287     
-288     /**
-289      * Toggles specified property from `true` to `false` or from `false` to `true`
-290      * @method toggle
-291      * @param {String} property property to toggle
-292      * @return {fabric.Object} thisArg
-293      * @chainable
-294      */
-295     toggle: function(property) {
-296       var value = this.get(property);
-297       if (typeof value === 'boolean') {
-298         this.set(property, !value);
-299       }
-300       return this;
-301     },
-302     
-303     /**
-304      * @method setSourcePath
-305      * @param {String} value
-306      * @return {fabric.Object} thisArg
-307      * @chainable
-308      */
-309     setSourcePath: function(value) {
-310       this.sourcePath = value;
-311       return this;
-312     },
-313     
-314     /**
-315      * Basic getter
-316      * @method get
-317      * @param {Any} property
-318      * @return {Any} value of a property
-319      */
-320     get: function(property) {
-321       return (property === 'angle') 
-322         ? this.getAngle() 
-323         : this[property];
-324     },
-325     
-326     /**
-327      * @method render
-328      * @param {CanvasRenderingContext2D} ctx context to render on
-329      * @param {Boolean} noTransform
-330      */
-331     render: function(ctx, noTransform) {
-332       
-333       // do not render if width or height are zeros
-334       if (this.width === 0 || this.height === 0) return;
-335       
-336       ctx.save();
-337       
-338       var m = this.transformMatrix;
-339       if (m) {
-340         ctx.setTransform(m[0], m[1], m[2], m[3], m[4], m[5]);
-341       }
-342       
-343       if (!noTransform) {
-344         this.transform(ctx);
-345       }
-346       
-347       if (this.stroke) {
-348         ctx.lineWidth = this.strokeWidth;
-349         ctx.strokeStyle = this.stroke;
-350       }
-351       
-352       if (this.overlayFill) {
-353         ctx.fillStyle = this.overlayFill;
-354       }
-355       else if (this.fill) {
-356         ctx.fillStyle = this.fill;
-357       }
-358       
-359       this._render(ctx, noTransform);
-360       
-361       if (this.active && !noTransform) {
-362         this.drawBorders(ctx);
-363         this.hideCorners || this.drawCorners(ctx);
-364       }
-365       ctx.restore();
-366     },
-367     
-368     /**
-369      * Returns width of an object
-370      * @method getWidth
-371      * @return {Number} width value
-372      */
-373     getWidth: function() {
-374       return this.width * this.scaleX;
-375     },
-376     
-377     /**
-378      * Returns height of an object
-379      * @method getHeight
-380      * @return {Number} height value
-381      */
-382     getHeight: function() {
-383       return this.height * this.scaleY;
-384     },
-385     
-386     /**
-387      * Scales an object (equally by x and y)
-388      * @method scale
-389      * @param value {Number} scale factor
-390      * @return {fabric.Object} thisArg
-391      * @chainable
-392      */
-393     scale: function(value) {
-394       this.scaleX = value;
-395       this.scaleY = value;
-396       return this;
-397     },
-398     
-399     /**
-400      * Scales an object to a given width (scaling by x/y equally)
-401      * @method scaleToWidth
-402      * @param value {Number} new width value
-403      * @return {fabric.Object} thisArg
-404      * @chainable
-405      */
-406     scaleToWidth: function(value) {
-407       return this.scale(value / this.width);
-408     },
-409     
-410     /**
-411      * Scales an object to a given height (scaling by x/y equally)
-412      * @method scaleToHeight
-413      * @param value {Number} new height value
-414      * @return {fabric.Object} thisArg
-415      * @chainable
-416      */
-417     scaleToHeight: function(value) {
-418       return this.scale(value / this.height);
-419     },
-420     
-421     /**
-422      * Sets object opacity 
-423      * @method setOpacity
-424      * @param value {Number} value 0-1
-425      * @return {fabric.Object} thisArg
-426      * @chainable
-427      */
-428     setOpacity: function(value) {
-429       this.set('opacity', value);
-430       return this;
-431     },
-432     
-433     /**
-434      * Returns object's angle value
-435      * @method getAngle
-436      * @return {Number} angle value
-437      */
-438     getAngle: function() {
-439       return this.theta * 180 / Math.PI;
-440     },
-441     
-442     /**
-443      * Sets object's angle
-444      * @method setAngle
-445      * @param value {Number} angle value
-446      * @return {Object} thisArg
-447      */
-448     setAngle: function(value) {
-449       this.theta = value / 180 * Math.PI;
-450       this.angle = value;
-451       return this;
-452     },
-453     
-454     /**
-455      * Sets corner position coordinates based on current angle, width and height.
-456      * @method setCoords
-457      * return {fabric.Object} thisArg
-458      * @chainable
-459      */
-460     setCoords: function() {
-461       
-462       this.currentWidth = this.width * this.scaleX;
-463       this.currentHeight = this.height * this.scaleY;
-464       
-465       this._hypotenuse = Math.sqrt(
-466         Math.pow(this.currentWidth / 2, 2) + 
-467         Math.pow(this.currentHeight / 2, 2));
-468         
-469       this._angle = Math.atan(this.currentHeight / this.currentWidth);
-470 
-471       // offset added for rotate and scale actions
-472       var offsetX = Math.cos(this._angle + this.theta) * this._hypotenuse,
-473           offsetY = Math.sin(this._angle + this.theta) * this._hypotenuse,
-474           theta = this.theta,
-475           sinTh = Math.sin(theta),
-476           cosTh = Math.cos(theta);
-477 
-478       var tl = {
-479         x: this.left - offsetX,
-480         y: this.top - offsetY
-481       };
-482       var tr = {
-483         x: tl.x + (this.currentWidth * cosTh),
-484         y: tl.y + (this.currentWidth * sinTh)
-485       };
-486       var br = {
-487         x: tr.x - (this.currentHeight * sinTh),
-488         y: tr.y + (this.currentHeight * cosTh)
-489       };
-490       var bl = {
-491         x: tl.x - (this.currentHeight * sinTh),
-492         y: tl.y + (this.currentHeight * cosTh)
-493       };
-494       var ml = {
-495         x: tl.x - (this.currentHeight/2 * sinTh),
-496         y: tl.y + (this.currentHeight/2 * cosTh)
-497       };
-498       var mt = {
-499         x: tl.x + (this.currentWidth/2 * cosTh),
-500         y: tl.y + (this.currentWidth/2 * sinTh)
-501       };
-502       var mr = {
-503         x: tr.x - (this.currentHeight/2 * sinTh),
-504         y: tr.y + (this.currentHeight/2 * cosTh)
-505       }
-506       var mb = {
-507         x: bl.x + (this.currentWidth/2 * cosTh),
-508         y: bl.y + (this.currentWidth/2 * sinTh)
-509       }
-510       
-511       // clockwise
-512       this.oCoords = { tl: tl, tr: tr, br: br, bl: bl, ml: ml, mt: mt, mr: mr, mb: mb };
-513       
-514       // set coordinates of the draggable boxes in the corners used to scale/rotate the image
-515       this._setCornerCoords();
-516       
-517       return this;
-518     },
-519     
-520     /**
-521      * Draws borders of an object's bounding box. 
-522      * Requires public properties: width, height
-523      * Requires public options: padding, borderColor
-524      * @method drawBorders
-525      * @param {CanvasRenderingContext2D} ctx Context to draw on
-526      * @return {fabric.Object} thisArg
-527      * @chainable
-528      */
-529     drawBorders: function(ctx) {
-530       var o = this.options,
-531           padding = o.padding,
-532           padding2 = padding * 2;
-533       
-534       ctx.save();
-535       
-536       ctx.globalAlpha = this.isMoving ? o.borderOpacityWhenMoving : 1;
-537       ctx.strokeStyle = o.borderColor;
-538       
-539       var scaleX = 1 / (this.scaleX < this.MIN_SCALE_LIMIT ? this.MIN_SCALE_LIMIT : this.scaleX),
-540           scaleY = 1 / (this.scaleY < this.MIN_SCALE_LIMIT ? this.MIN_SCALE_LIMIT : this.scaleY);
-541       
-542       // could be set by a group, that this object is contained within
-543       ctx.lineWidth = 1 / this.borderScaleFactor;
-544       
-545       ctx.scale(scaleX, scaleY);
-546       
-547       var w = this.getWidth(),
-548           h = this.getHeight();
-549       
-550       ctx.strokeRect(
-551         ~~(-(w / 2) - padding) + 0.5, // offset needed to make lines look sharper
-552         ~~(-(h / 2) - padding) + 0.5,
-553         ~~(w + padding2),
-554         ~~(h + padding2)
-555       );
-556       
-557       ctx.restore();
-558       return this;
-559     },
-560     
-561     /**
-562      * Draws corners of an object's bounding box.
-563      * Requires public properties: width, height, scaleX, scaleY 
-564      * Requires public options: cornersize, padding
-565      * @method drawCorners
-566      * @param {CanvasRenderingContext2D} ctx Context to draw on
-567      * @return {fabric.Object} thisArg
-568      * @chainable
-569      */
-570     drawCorners: function(ctx) {
-571       var size = this.options.cornersize,
-572           size2 = size / 2,
-573           padding = this.options.padding,
-574           left = -(this.width / 2),
-575           top = -(this.height / 2),
-576           _left, 
-577           _top,
-578           sizeX = size / this.scaleX,
-579           sizeY = size / this.scaleY,
-580           scaleOffsetY = (padding + size2) / this.scaleY,
-581           scaleOffsetX = (padding + size2) / this.scaleX,
-582           scaleOffsetSizeX = (padding + size2 - size) / this.scaleX,
-583           scaleOffsetSizeY = (padding + size2 - size) / this.scaleY;
-584           
-585       ctx.save();
-586       
-587       ctx.globalAlpha = this.isMoving ? this.options.borderOpacityWhenMoving : 1;
-588       ctx.fillStyle = this.options.cornerColor;
-589       
-590       // top-left
-591       _left = left - scaleOffsetX;
-592       _top = top - scaleOffsetY;
-593       ctx.fillRect(_left, _top, sizeX, sizeY);
-594       
-595       // top-right
-596       _left = left + this.width - scaleOffsetX;
-597       _top = top - scaleOffsetY;
-598       ctx.fillRect(_left, _top, sizeX, sizeY);
-599       
-600       // bottom-left
-601       _left = left - scaleOffsetX;
-602       _top = top + this.height + scaleOffsetSizeY;
-603       ctx.fillRect(_left, _top, sizeX, sizeY);
-604       
-605       // bottom-right
-606       _left = left + this.width + scaleOffsetSizeX;
-607       _top = top + this.height + scaleOffsetSizeY;
-608       ctx.fillRect(_left, _top, sizeX, sizeY);
-609       
-610       // middle-top
-611       _left = left + this.width/2 - scaleOffsetX;
-612       _top = top - scaleOffsetY;
-613       ctx.fillRect(_left, _top, sizeX, sizeY);
-614       
-615       // middle-bottom
-616       _left = left + this.width/2 - scaleOffsetX;
-617       _top = top + this.height + scaleOffsetSizeY;
-618       ctx.fillRect(_left, _top, sizeX, sizeY);
-619       
-620       // middle-right
-621       _left = left + this.width + scaleOffsetSizeX;
-622       _top = top + this.height/2 - scaleOffsetY;
-623       ctx.fillRect(_left, _top, sizeX, sizeY);
-624       
-625       // middle-left
-626       _left = left - scaleOffsetX;
-627       _top = top + this.height/2 - scaleOffsetY;
-628       ctx.fillRect(_left, _top, sizeX, sizeY);
-629       
-630       ctx.restore();
-631       
-632       return this;
-633     },
-634     
-635     /**
-636      * Clones an instance
-637      * @method clone
-638      * @param {Object} options object
-639      * @return {fabric.Object} clone of an instance
-640      */
-641     clone: function(options) {
-642       if (this.constructor.fromObject) {
-643         return this.constructor.fromObject(this.toObject(), options);
-644       }
-645       return new fabric.Object(this.toObject());
-646     },
-647     
-648     /**
-649      * Creates an instance of fabric.Image out of an object
-650      * @method cloneAsImage
-651      * @param callback {Function} callback, invoked with an instance as a first argument
-652      * @return {fabric.Object} thisArg
-653      * @chainable
-654      */
-655     cloneAsImage: function(callback) {
-656       if (fabric.Image) {
-657         var i = new Image();
-658         
-659         /** @ignore */
-660         i.onload = function() {
-661           if (callback) {
-662             callback(new fabric.Image(i), orig);
-663           }
-664           i = i.onload = null;
-665         };
-666         
-667         var orig = {
-668           angle: this.get('angle'),
-669           flipX: this.get('flipX'),
-670           flipY: this.get('flipY')
-671         };
-672 
-673         // normalize angle
-674         this.set('angle', 0).set('flipX', false).set('flipY', false);
-675         i.src = this.toDataURL();
-676       }
-677       return this;
-678     },
-679     
-680     /**
-681      * Converts an object into a data-url-like string
-682      * @method toDataURL
-683      * @return {String} string of data
-684      */
-685     toDataURL: function() {
-686       var el = document.createElement('canvas');
-687       
-688       el.width = this.getWidth();
-689       el.height = this.getHeight();
-690       
-691       fabric.util.wrapElement(el, 'div');
-692 
-693       var canvas = new fabric.Element(el);
-694       canvas.backgroundColor = 'transparent';
-695       canvas.renderAll();
-696       
-697       var clone = this.clone();
-698       clone.left = el.width / 2;
-699       clone.top = el.height / 2;
-700       
-701       clone.setActive(false);
-702       
-703       canvas.add(clone);
-704       var data = canvas.toDataURL('png');
-705       
-706       canvas.dispose();
-707       canvas = clone = null;
-708       return data;
-709     },
-710     
-711     /**
-712      * @method hasStateChanged
-713      * @return {Boolean} true if instance' state has changed
-714      */
-715     hasStateChanged: function() {
-716       return this.stateProperties.some(function(prop) {
-717         return this[prop] !== this.originalState[prop];
-718       }, this);
-719     },
-720     
-721     /**
-722      * @method saveState
-723      * @return {fabric.Object} thisArg
-724      * @chainable
-725      */
-726     saveState: function() {
-727       this.stateProperties.forEach(function(prop) {
-728         this.originalState[prop] = this.get(prop);
-729       }, this);
-730       return this;
-731     },
-732     
-733     /**
-734      * Returns true if object intersects with an area formed by 2 points
-735      * @method intersectsWithRect
-736      * @param {Object} selectionTL
-737      * @param {Object} selectionBR
-738      * @return {Boolean}
-739      */
-740     intersectsWithRect: function(selectionTL, selectionBR) {
-741       var oCoords = this.oCoords,
-742           tl = new fabric.Point(oCoords.tl.x, oCoords.tl.y),
-743           tr = new fabric.Point(oCoords.tr.x, oCoords.tr.y),
-744           bl = new fabric.Point(oCoords.bl.x, oCoords.bl.y),
-745           br = new fabric.Point(oCoords.br.x, oCoords.br.y);
-746       
-747       var intersection = fabric.Intersection.intersectPolygonRectangle(
-748         [tl, tr, br, bl],
-749         selectionTL,
-750         selectionBR
-751       );
-752       return (intersection.status === 'Intersection');
-753     },
-754     
-755     /**
-756      * Returns true if object intersects with another object
-757      * @method intersectsWithObject
-758      * @param {Object} other Object to test
-759      * @return {Boolean}
-760      */
-761     intersectsWithObject: function(other) {
-762       // extracts coords
-763       function getCoords(oCoords) {
-764         return {
-765           tl: new fabric.Point(oCoords.tl.x, oCoords.tl.y),
-766           tr: new fabric.Point(oCoords.tr.x, oCoords.tr.y),
-767           bl: new fabric.Point(oCoords.bl.x, oCoords.bl.y),
-768           br: new fabric.Point(oCoords.br.x, oCoords.br.y)
-769         }
-770       }
-771       var thisCoords = getCoords(this.oCoords),
-772           otherCoords = getCoords(other.oCoords);
-773       var intersection = fabric.Intersection.intersectPolygonPolygon(
-774         [thisCoords.tl, thisCoords.tr, thisCoords.br, thisCoords.bl],
-775         [otherCoords.tl, otherCoords.tr, otherCoords.br, otherCoords.bl]
-776       );
-777       
-778       return (intersection.status === 'Intersection');
-779     },
-780     
-781     /**
-782      * Returns true if object is fully contained within area formed by 2 points
-783      * @method isContainedWithinRect
-784      * @param {Object} selectionTL
-785      * @param {Object} selectionBR
-786      * @return {Boolean}
-787      */
-788     isContainedWithinRect: function(selectionTL, selectionBR) {
-789       var oCoords = this.oCoords,
-790           tl = new fabric.Point(oCoords.tl.x, oCoords.tl.y),
-791           tr = new fabric.Point(oCoords.tr.x, oCoords.tr.y),
-792           bl = new fabric.Point(oCoords.bl.x, oCoords.bl.y),
-793           br = new fabric.Point(oCoords.br.x, oCoords.br.y);
-794       return tl.x > selectionTL.x
-795         && tr.x < selectionBR.x
-796         && tl.y > selectionTL.y
-797         && bl.y < selectionBR.y;
-798     },
-799     
-800     /**
-801      * @method isType
-802      * @param type {String} type to check against
-803      * @return {Boolean} true if specified type is identical to the type of instance
-804      */
-805     isType: function(type) {
-806       return this.type === type;
-807     },
-808     
-809     /**
-810      * Determines which one of the four corners has been clicked
-811      * @method _findTargetCorner
-812      * @private
-813      * @param e {Event} event object
-814      * @param offset {Object} canvas offset
-815      * @return {String|Boolean} corner code (tl, tr, bl, br, etc.), or false if nothing is found
-816      */
-817     _findTargetCorner: function(e, offset) {
-818       var pointer = getPointer(e),
-819           ex = pointer.x - offset.left,
-820           ey = pointer.y - offset.top,
-821           xpoints,
-822           lines;
-823       
-824       for (var i in this.oCoords) {
-825         lines = this._getImageLines(this.oCoords[i].corner, i);
-826         xpoints = this._findCrossPoints(ex, ey, lines);
-827         if (xpoints % 2 == 1 && xpoints != 0) {
-828           this.__corner = i;
-829           return i;
-830         }   
-831       }
-832       return false;
-833     },
-834     
-835     /**
-836      * Helper method to determine how many cross points are between the 4 image edges
-837      * and the horizontal line determined by the position of our mouse when clicked on canvas
-838      * @method _findCrossPoints
-839      * @private
-840      * @param ex {Number} x coordinate of the mouse
-841      * @param ey {Number} y coordinate of the mouse
-842      * @param oCoords {Object} Coordinates of the image being evaluated
-843      */   
-844     _findCrossPoints: function(ex, ey, oCoords) {
-845       var b1, b2, a1, a2, xi, yi,
-846           xcount = 0,
-847           iLine;
-848           
-849       for (var lineKey in oCoords) {
-850         iLine = oCoords[lineKey];
-851         // optimisation 1: line below dot. no cross
-852         if ((iLine.o.y < ey) && (iLine.d.y < ey)) {
-853           continue;
-854         }
-855         // optimisation 2: line above dot. no cross
-856         if ((iLine.o.y >= ey) && (iLine.d.y >= ey)) {
-857           continue;
-858         }
-859         // optimisation 3: vertical line case
-860         if ((iLine.o.x == iLine.d.x) && (iLine.o.x >= ex)) { 
-861           xi = iLine.o.x;
-862           yi = ey;
-863         }
-864         // calculate the intersection point
-865         else {
-866           b1 = 0;
-867           b2 = (iLine.d.y-iLine.o.y)/(iLine.d.x-iLine.o.x); 
-868           a1 = ey-b1*ex;
-869           a2 = iLine.o.y-b2*iLine.o.x;
-870 
-871           xi = - (a1-a2)/(b1-b2); 
-872           yi = a1+b1*xi; 
-873         }
-874         // dont count xi < ex cases
-875         if (xi >= ex) { 
-876           xcount += 1;
-877         }
-878         // optimisation 4: specific for square images
-879         if (xcount == 2) {
-880           break;
-881         }
-882       }
-883       return xcount;
-884     },
-885     
-886     /**
-887      * Method that returns an object with the image lines in it given the coordinates of the corners
-888      * @method _getImageLines
-889      * @private
-890      * @param oCoords {Object} coordinates of the image corners
-891      */
-892     _getImageLines: function(oCoords, i) {
-893       return {
-894         topline: { 
-895           o: oCoords.tl,
-896           d: oCoords.tr
-897         },
-898         rightline: { 
-899           o: oCoords.tr,
-900           d: oCoords.br 
-901         },
-902         bottomline: { 
-903           o: oCoords.br,
-904           d: oCoords.bl 
-905         },
-906         leftline: { 
-907           o: oCoords.bl,
-908           d: oCoords.tl 
-909         }
-910       }
-911     },
-912     
-913     /**
-914      * Sets the coordinates of the draggable boxes in the corners of
-915      * the image used to scale/rotate it.
-916      * @method _setCornerCoords
-917      * @private
-918      */ 
-919     _setCornerCoords: function() {
-920       var coords = this.oCoords,
-921           theta = this.theta,
-922           cosOffset = this.cornersize * /*this.scaleX * */ Math.cos(theta),
-923           sinOffset = this.cornersize * /*this.scaleY * */ Math.sin(theta),
-924           size2 = this.cornersize / 2,
-925           size2x = size2 - sinOffset,
-926           size2y = size2,
-927           corner;
-928       
-929       coords.tl.x -= size2x;
-930       coords.tl.y -= size2y;
-931       
-932       coords.tl.corner = {
-933         tl: {
-934           x: coords.tl.x,
-935           y: coords.tl.y
-936         },
-937         tr: {
-938           x: coords.tl.x + cosOffset,
-939           y: coords.tl.y + sinOffset
-940         },
-941         bl: {
-942           x: coords.tl.x - sinOffset,
-943           y: coords.tl.y + cosOffset
-944         }
-945       };
-946       coords.tl.corner.br = {
-947         x: coords.tl.corner.tr.x - sinOffset,
-948         y: coords.tl.corner.tr.y + cosOffset
-949       };
-950       
-951       coords.tl.x += size2x;
-952       coords.tl.y += size2y;
-953       
-954       coords.tr.x += size2;
-955       coords.tr.y -= size2;
-956       coords.tr.corner = {
-957         tl: {
-958           x: coords.tr.x - cosOffset,
-959           y: coords.tr.y - sinOffset
-960         },
-961         tr: {
-962           x: coords.tr.x,
-963           y: coords.tr.y
-964         },
-965         br: {
-966           x: coords.tr.x - sinOffset,
-967           y: coords.tr.y + cosOffset
-968         }
-969       };
-970       coords.tr.corner.bl = {
-971         x: coords.tr.corner.tl.x - sinOffset,
-972         y: coords.tr.corner.tl.y + cosOffset
-973       };
-974       coords.tr.x -= size2;
-975       coords.tr.y += size2;
-976       
-977       coords.bl.x -= size2;
-978       coords.bl.y += size2;
-979       coords.bl.corner = {
-980         tl: {
-981           x: coords.bl.x + sinOffset,
-982           y: coords.bl.y - cosOffset
-983         },
-984         bl: {
-985           x: coords.bl.x,
-986           y: coords.bl.y
-987         },
-988         br: {
-989           x: coords.bl.x + cosOffset,
-990           y: coords.bl.y + sinOffset
-991         }
-992       };
-993       coords.bl.corner.tr = {
-994         x: coords.bl.corner.br.x + sinOffset,
-995         y: coords.bl.corner.br.y - cosOffset
-996       };
-997       coords.bl.x += size2;
-998       coords.bl.y -= size2;
-999       
-1000       coords.br.x += size2;
-1001       coords.br.y += size2;
-1002       coords.br.corner = {
-1003         tr: {
-1004           x: coords.br.x + sinOffset,
-1005           y: coords.br.y - cosOffset
-1006         },
-1007         bl: {
-1008           x: coords.br.x - cosOffset,
-1009           y: coords.br.y - sinOffset
-1010         },
-1011         br: {
-1012           x: coords.br.x,
-1013           y: coords.br.y
-1014         }
-1015       };
-1016       coords.br.corner.tl = {
-1017         x: coords.br.corner.bl.x + sinOffset,
-1018         y: coords.br.corner.bl.y - cosOffset
-1019       };
-1020       coords.br.x -= size2;
-1021       coords.br.y -= size2;
-1022       
-1023       
-1024       coords.ml.x -= size2;
-1025       coords.ml.y -= size2;
-1026       coords.ml.corner = {
-1027         tl: {
-1028           x: coords.ml.x,
-1029           y: coords.ml.y
-1030         },
-1031         tr: {
-1032           x: coords.ml.x + cosOffset,
-1033           y: coords.ml.y + sinOffset
-1034         },
-1035         bl: {
-1036           x: coords.ml.x - sinOffset,
-1037           y: coords.ml.y + cosOffset
-1038         }
-1039       };
-1040       coords.ml.corner.br = {
-1041         x: coords.ml.corner.tr.x - sinOffset,
-1042         y: coords.ml.corner.tr.y + cosOffset
-1043       };
-1044       coords.ml.x += size2;
-1045       coords.ml.y += size2;
-1046       
-1047       coords.mt.x -= size2;
-1048       coords.mt.y -= size2;
-1049       coords.mt.corner = {
-1050         tl: {
-1051           x: coords.mt.x,
-1052           y: coords.mt.y
-1053         },
-1054         tr: {
-1055           x: coords.mt.x + cosOffset,
-1056           y: coords.mt.y + sinOffset
-1057         },
-1058         bl: {
-1059           x: coords.mt.x - sinOffset,
-1060           y: coords.mt.y + cosOffset
-1061         }
-1062       };
-1063       coords.mt.corner.br = {
-1064         x: coords.mt.corner.tr.x - sinOffset,
-1065         y: coords.mt.corner.tr.y + cosOffset
-1066       };
-1067       coords.mt.x += size2;
-1068       coords.mt.y += size2;
-1069       
-1070       coords.mr.x -= size2;
-1071       coords.mr.y -= size2;
-1072       coords.mr.corner = {
-1073         tl: {
-1074           x: coords.mr.x,
-1075           y: coords.mr.y
-1076         },
-1077         tr: {
-1078           x: coords.mr.x + cosOffset,
-1079           y: coords.mr.y + sinOffset
-1080         },
-1081         bl: {
-1082           x: coords.mr.x - sinOffset,
-1083           y: coords.mr.y + cosOffset
-1084         }
-1085       };
-1086       coords.mr.corner.br = {
-1087         x: coords.mr.corner.tr.x - sinOffset,
-1088         y: coords.mr.corner.tr.y + cosOffset
-1089       };
-1090       coords.mr.x += size2;
-1091       coords.mr.y += size2;
-1092       
-1093       coords.mb.x -= size2;
-1094       coords.mb.y -= size2;
-1095       coords.mb.corner = {
-1096         tl: {
-1097           x: coords.mb.x,
-1098           y: coords.mb.y
-1099         },
-1100         tr: {
-1101           x: coords.mb.x + cosOffset,
-1102           y: coords.mb.y + sinOffset
-1103         },
-1104         bl: {
-1105           x: coords.mb.x - sinOffset,
-1106           y: coords.mb.y + cosOffset
-1107         }
-1108       };
-1109       coords.mb.corner.br = {
-1110         x: coords.mb.corner.tr.x - sinOffset,
-1111         y: coords.mb.corner.tr.y + cosOffset
-1112       };
-1113       
-1114       coords.mb.x += size2;
-1115       coords.mb.y += size2;
-1116       
-1117       corner = coords.mb.corner;
-1118       
-1119       corner.tl.x -= size2;
-1120       corner.tl.y -= size2;
-1121       corner.tr.x -= size2;
-1122       corner.tr.y -= size2;
-1123       corner.br.x -= size2;
-1124       corner.br.y -= size2;
-1125       corner.bl.x -= size2;
-1126       corner.bl.y -= size2;
-1127     },
-1128     
-1129     /**
-1130      * Makes object's color grayscale
-1131      * @method toGrayscale
-1132      * @return {fabric.Object} thisArg
-1133      */
-1134     toGrayscale: function() {
-1135       var fillValue = this.get('fill');
-1136       if (fillValue) {
-1137         this.set('overlayFill', new fabric.Color(fillValue).toGrayscale().toRgb());
-1138       }
-1139       return this;
-1140     },
-1141     
-1142     /**
-1143      * @method complexity
-1144      * @return {Number}
-1145      */
-1146     complexity: function() {
-1147       return 0;
-1148     },
-1149     
-1150     /**
-1151      * @method getCenter
-1152      * @return {Object} object with `x`, `y` properties corresponding to path center coordinates
-1153      */
-1154     getCenter: function() {
-1155       return {
-1156         x: this.get('left') + this.width / 2,
-1157         y: this.get('top') + this.height / 2
-1158       };
-1159     },
-1160     
-1161     /**
-1162      * @method straighten
-1163      * @return {fabric.Object} thisArg
-1164      * @chainable
-1165      */
-1166     straighten: function() {
-1167       var angle = this._getAngleValueForStraighten();
-1168       this.setAngle(angle);
-1169       return this;
-1170     },
-1171     
-1172     /**
-1173      * @method fxStraighten
-1174      * @param {Object} callbacks
-1175      *                  - onComplete: invoked on completion
-1176      *                  - onChange: invoked on every step of animation
-1177      *
-1178      * @return {fabric.Object} thisArg
-1179      * @chainable
-1180      */
-1181     fxStraighten: function(callbacks) {
-1182       callbacks = callbacks || { };
-1183       
-1184       var empty = function() { },
-1185           onComplete = callbacks.onComplete || empty,
-1186           onChange = callbacks.onChange || empty,
-1187           _this = this;
-1188       
-1189       fabric.util.animate({
-1190         startValue: this.get('angle'),
-1191         endValue: this._getAngleValueForStraighten(),
-1192         duration: this.FX_DURATION,
-1193         onChange: function(value) {
-1194           _this.setAngle(value);
-1195           onChange();
-1196         },
-1197         onComplete: function() {
-1198           _this.setCoords();
-1199           onComplete();
-1200         },
-1201         onStart: function() {
-1202           _this.setActive(false);
-1203         }
-1204       });
-1205       
-1206       return this;
-1207     },
-1208     
-1209     /**
-1210      * @method fxRemove
-1211      * @param {Object} callbacks
-1212      * @return {fabric.Object} thisArg
-1213      * @chainable
-1214      */
-1215     fxRemove: function(callbacks) {
-1216       callbacks || (callbacks = { });
-1217       
-1218       var empty = function() { },
-1219           onComplete = callbacks.onComplete || empty,
-1220           onChange = callbacks.onChange || empty,
-1221           _this = this;
-1222       
-1223       fabric.util.animate({
-1224         startValue: this.get('opacity'),
-1225         endValue: 0,
-1226         duration: this.FX_DURATION,
-1227         onChange: function(value) {
-1228           _this.set('opacity', value);
-1229           onChange();
-1230         },
-1231         onComplete: onComplete,
-1232         onStart: function() {
-1233           _this.setActive(false);
-1234         }
-1235       });
-1236       
-1237       return this;
-1238     },
-1239     
-1240     /**
-1241      * @method _getAngleValueForStraighten
-1242      * @return {Number} angle value
-1243      * @private
-1244      */
-1245     _getAngleValueForStraighten: function() {
-1246       var angle = this.get('angle');
-1247       
-1248       // TODO (kangax): can this be simplified?
-1249       
-1250       if      (angle > -225 && angle <= -135) { return -180;  }
-1251       else if (angle > -135 && angle <= -45)  { return  -90;  }
-1252       else if (angle > -45  && angle <= 45)   { return    0;  }
-1253       else if (angle > 45   && angle <= 135)  { return   90;  }
-1254       else if (angle > 135  && angle <= 225 ) { return  180;  }
-1255       else if (angle > 225  && angle <= 315)  { return  270;  }
-1256       else if (angle > 315)                   { return  360;  }
-1257       
-1258       return 0;
-1259     },
-1260     
-1261     /**
-1262      * Returns a JSON representation of an instance
-1263      * @method toJSON
-1264      * @return {String} json
-1265      */
-1266     toJSON: function() {
-1267       // delegate, not alias
-1268       return this.toObject();
-1269     }
-1270   });
-1271   
-1272   /**
-1273    * @alias rotate -> setAngle
-1274    */
-1275   fabric.Object.prototype.rotate = fabric.Object.prototype.setAngle;
-1276 })();
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_parser.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_parser.js.html deleted file mode 100644 index b11a79b8..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_parser.js.html +++ /dev/null @@ -1,403 +0,0 @@ -
  1 (function(){
-  2   
-  3   /** @name fabric */
-  4   
-  5   var fabric = this.fabric || (this.fabric = { }),
-  6       extend = fabric.util.object.extend,
-  7       capitalize = fabric.util.string.capitalize,
-  8       clone = fabric.util.object.clone;
-  9   
- 10   var attributesMap = {
- 11     'cx':             'left',
- 12     'x':              'left',
- 13     'cy':             'top',
- 14     'y':              'top',
- 15     'r':              'radius',
- 16     'fill-opacity':   'opacity',
- 17     'fill-rule':      'fillRule',
- 18     'stroke-width':   'strokeWidth',
- 19     'transform':      'transformMatrix'
- 20   };
- 21   
- 22   /**
- 23    * Returns an object of attributes' name/value, given element and an array of attribute names;
- 24    * Parses parent "g" nodes recursively upwards.
- 25    *
- 26    * @static
- 27    * @memberOf fabric
- 28    * @method parseAttributes
- 29    * @param {DOMElement} element Element to parse
- 30    * @param {Array} attributes Array of attributes to parse
- 31    * @return {Object} object containing parsed attributes' names/values
- 32    */
- 33   function parseAttributes(element, attributes) {
- 34     
- 35     if (!element) {
- 36       return;
- 37     }
- 38     
- 39     var value, 
- 40         parsed, 
- 41         parentAttributes = { };
- 42 
- 43     // if there's a parent container (`g` node), parse its attributes recursively upwards
- 44     if (element.parentNode && /^g$/i.test(element.parentNode.nodeName)) {
- 45       parentAttributes = fabric.parseAttributes(element.parentNode, attributes);
- 46     }
- 47     
- 48     var ownAttributes = attributes.reduce(function(memo, attr) {
- 49       value = element.getAttribute(attr);
- 50       parsed = parseFloat(value);
- 51       if (value) {        
- 52         // "normalize" attribute values
- 53         if ((attr === 'fill' || attr === 'stroke') && value === 'none') {
- 54           value = '';
- 55         }
- 56         if (attr === 'fill-rule') {
- 57           value = (value === 'evenodd') ? 'destination-over' : value;
- 58         }
- 59         if (attr === 'transform') {
- 60           value = fabric.parseTransformAttribute(value);
- 61         }
- 62         // transform attribute names
- 63         if (attr in attributesMap) {
- 64           attr = attributesMap[attr];
- 65         }
- 66         memo[attr] = isNaN(parsed) ? value : parsed;
- 67       }
- 68       return memo;
- 69     }, { });
- 70     
- 71     // add values parsed from style
- 72     // TODO (kangax): check the presedence of values from the style attribute
- 73     ownAttributes = extend(fabric.parseStyleAttribute(element), ownAttributes);
- 74     return extend(parentAttributes, ownAttributes);
- 75   };
- 76   
- 77   /**
- 78    * @static
- 79    * @function
- 80    * @memberOf fabric
- 81    * @method parseTransformAttribute
- 82    * @param attributeValue {String} string containing attribute value
- 83    * @return {Array} array of 6 elements representing transformation matrix
- 84    */
- 85   fabric.parseTransformAttribute = (function() {
- 86     function rotateMatrix(matrix, args) {
- 87       var angle = args[0];
- 88       
- 89       matrix[0] = Math.cos(angle);
- 90       matrix[1] = Math.sin(angle);
- 91       matrix[2] = -Math.sin(angle);
- 92       matrix[3] = Math.cos(angle);
- 93     }
- 94     
- 95     function scaleMatrix(matrix, args) {
- 96       var multiplierX = args[0],
- 97           multiplierY = (args.length === 2) ? args[1] : args[0];
- 98 
- 99       matrix[0] = multiplierX;
-100       matrix[3] = multiplierY;
-101     }
-102     
-103     function skewXMatrix(matrix, args) {
-104       matrix[2] = args[0];
-105     }
-106     
-107     function skewYMatrix(matrix, args) {
-108       matrix[1] = args[0];
-109     }
-110     
-111     function translateMatrix(matrix, args) {
-112       matrix[4] = args[0];
-113       if (args.length === 2) {
-114         matrix[5] = args[1];
-115       }
-116     }
-117     
-118     // identity matrix
-119     var iMatrix = [
-120           1, // a
-121           0, // b
-122           0, // c
-123           1, // d
-124           0, // e
-125           0  // f
-126         ],
-127     
-128         // == begin transform regexp
-129         number = '(?:[-+]?\\d+(?:\\.\\d+)?(?:e[-+]?\\d+)?)',
-130         comma_wsp = '(?:\\s+,?\\s*|,\\s*)',
-131         
-132         skewX = '(?:(skewX)\\s*\\(\\s*(' + number + ')\\s*\\))',
-133         skewY = '(?:(skewY)\\s*\\(\\s*(' + number + ')\\s*\\))',
-134         rotate = '(?:(rotate)\\s*\\(\\s*(' + number + ')(?:' + comma_wsp + '(' + number + ')' + comma_wsp + '(' + number + '))?\\s*\\))',
-135         scale = '(?:(scale)\\s*\\(\\s*(' + number + ')(?:' + comma_wsp + '(' + number + '))?\\s*\\))',
-136         translate = '(?:(translate)\\s*\\(\\s*(' + number + ')(?:' + comma_wsp + '(' + number + '))?\\s*\\))',
-137         
-138         matrix = '(?:(matrix)\\s*\\(\\s*' + 
-139                   '(' + number + ')' + comma_wsp + 
-140                   '(' + number + ')' + comma_wsp + 
-141                   '(' + number + ')' + comma_wsp +
-142                   '(' + number + ')' + comma_wsp +
-143                   '(' + number + ')' + comma_wsp +
-144                   '(' + number + ')' + 
-145                   '\\s*\\))',
-146         
-147         transform = '(?:' +
-148                     matrix + '|' +
-149                     translate + '|' +
-150                     scale + '|' +
-151                     rotate + '|' +
-152                     skewX + '|' +
-153                     skewY + 
-154                     ')',
-155         
-156         transforms = '(?:' + transform + '(?:' + comma_wsp + transform + ')*' + ')',
-157         
-158         transform_list = '^\\s*(?:' + transforms + '?)\\s*$',
-159     
-160         // http://www.w3.org/TR/SVG/coords.html#TransformAttribute
-161         reTransformList = new RegExp(transform_list),
-162         // == end transform regexp
-163         
-164         reTransform = new RegExp(transform);
-165     
-166     return function(attributeValue) {
-167       
-168       // start with identity matrix
-169       var matrix = iMatrix.concat();
-170       
-171       // return if no argument was given or 
-172       // an argument does not match transform attribute regexp
-173       if (!attributeValue || (attributeValue && !reTransformList.test(attributeValue))) {
-174         return matrix;
-175       }
-176       
-177       attributeValue.replace(reTransform, function(match) {
-178           
-179         var m = new RegExp(transform).exec(match).filter(function (match) {
-180               return (match !== '' && match != null);
-181             }),
-182             operation = m[1],
-183             args = m.slice(2).map(parseFloat);
-184         
-185         switch(operation) {
-186           case 'translate':
-187             translateMatrix(matrix, args);
-188             break;
-189           case 'rotate':
-190             rotateMatrix(matrix, args);
-191             break;
-192           case 'scale':
-193             scaleMatrix(matrix, args);
-194             break;
-195           case 'skewX':
-196             skewXMatrix(matrix, args);
-197             break;
-198           case 'skewY':
-199             skewYMatrix(matrix, args);
-200             break;
-201           case 'matrix':
-202             matrix = args;
-203             break;
-204         }
-205       })
-206       return matrix;
-207     }
-208   })();
-209   
-210   /**
-211    * @static
-212    * @memberOf fabric
-213    * @method parsePointsAttribute
-214    * @param points {String} points attribute string
-215    * @return {Array} array of points
-216    */
-217   function parsePointsAttribute(points) {
-218         
-219     // points attribute is required and must not be empty
-220     if (!points) return null;
-221     
-222     points = points.trim();
-223     var asPairs = points.indexOf(',') > -1;
-224     
-225     points = points.split(/\s+/);
-226     var parsedPoints = [ ];
-227     
-228     // points could look like "10,20 30,40" or "10 20 30 40"
-229     if (asPairs) {  
-230      for (var i = 0, len = points.length; i < len; i++) {
-231        var pair = points[i].split(',');
-232        parsedPoints.push({ x: parseFloat(pair[0]), y: parseFloat(pair[1]) });
-233      } 
-234     }
-235     else {
-236       for (var i = 0, len = points.length; i < len; i+=2) {
-237         parsedPoints.push({ x: parseFloat(points[i]), y: parseFloat(points[i+1]) });
-238       }
-239     }
-240     
-241     // odd number of points is an error
-242     if (parsedPoints.length % 2 !== 0) {
-243       // return null;
-244     }
-245     
-246     return parsedPoints;
-247   };
-248 
-249   /**
-250    * @static
-251    * @memberOf fabric
-252    * @method parseStyleAttribute
-253    * @param {SVGElement} element Element to parse
-254    * @return {Object} Objects with values parsed from style attribute of an element
-255    */
-256   function parseStyleAttribute(element) {
-257     var oStyle = { },
-258         style = element.getAttribute('style');
-259     if (style) {
-260       if (typeof style == 'string') {
-261         style = style.split(';');
-262         style.pop();
-263         oStyle = style.reduce(function(memo, current) {
-264           var attr = current.split(':'),
-265               key = attr[0].trim(),
-266               value = attr[1].trim();
-267           memo[key] = value;
-268           return memo;
-269         }, { });
-270       }
-271       else {
-272         for (var prop in style) {
-273           if (typeof style[prop] !== 'undefined') {
-274             oStyle[prop] = style[prop];
-275           }
-276         }
-277       }
-278     }
-279     return oStyle;
-280   };
-281 
-282   /**
-283    * @static
-284    * @memberOf fabric
-285    * @method parseElements
-286    * @param {Array} elements Array of elements to parse
-287    * @param {Object} options Options object
-288    * @return {Array} Array of corresponding instances (transformed from SVG elements)
-289    */
-290    function parseElements(elements, options) {
-291     // transform svg elements to fabric.Path elements
-292     var _elements = elements.map(function(el) {
-293       var klass = fabric[capitalize(el.tagName)];
-294       if (klass && klass.fromElement) {
-295         try {
-296           return klass.fromElement(el, options);
-297         }
-298         catch(e) {
-299           fabric.log(e.message || e);
-300         }
-301       }
-302     });
-303     _elements = _elements.filter(function(el) {
-304       return el != null;
-305     });
-306     return _elements;
-307   };
-308   
-309   /**
-310    * @static
-311    * @function
-312    * @memberOf fabric
-313    * @method parseSVGDocument
-314    * @param {SVGDocument} doc SVG document to parse
-315    * @param {Function} callback Callback to call when parsing is finished; It's being passed an array of elements (parsed from a document).
-316    */
-317   fabric.parseSVGDocument = (function() {
-318 
-319     var reAllowedSVGTagNames = /^(path|circle|polygon|polyline|ellipse|rect|line)$/;
-320 
-321     // http://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute
-322     // \d doesn't quite cut it (as we need to match an actual float number)
-323 
-324     // matches, e.g.: +14.56e-12, etc.
-325     var reNum = '(?:[-+]?\\d+(?:\\.\\d+)?(?:e[-+]?\\d+)?)';
-326 
-327     var reViewBoxAttrValue = new RegExp(
-328       '^' +
-329       '\\s*(' + reNum + '+)\\s*,?' +
-330       '\\s*(' + reNum + '+)\\s*,?' +
-331       '\\s*(' + reNum + '+)\\s*,?' +
-332       '\\s*(' + reNum + '+)\\s*' +
-333       '$'
-334     );
-335     
-336     function hasParentWithNodeName(element, parentNodeName) {
-337       while (element && (element = element.parentNode)) {
-338         if (element.nodeName === parentNodeName) {
-339           return true;
-340         }
-341       }
-342       return false;
-343     }
-344 
-345     return function(doc, callback) {
-346       if (!doc) return;
-347       var descendants = fabric.util.toArray(doc.getElementsByTagName('*'));
-348       
-349       var elements = descendants.filter(function(el) {
-350         return reAllowedSVGTagNames.test(el.tagName) && 
-351           !hasParentWithNodeName(el, 'pattern');
-352       });
-353 
-354       if (!elements || (elements && !elements.length)) return;
-355 
-356       var viewBoxAttr = doc.getAttribute('viewBox'),
-357           widthAttr = doc.getAttribute('width'),
-358           heightAttr = doc.getAttribute('height'),
-359           width = null,
-360           height = null,
-361           minX,
-362           minY;
-363       
-364       if (viewBoxAttr && (viewBoxAttr = viewBoxAttr.match(reViewBoxAttrValue))) {
-365         minX = parseInt(viewBoxAttr[1], 10);
-366         minY = parseInt(viewBoxAttr[2], 10);
-367         width = parseInt(viewBoxAttr[3], 10);
-368         height = parseInt(viewBoxAttr[4], 10);
-369       }
-370 
-371       // values of width/height attributes overwrite those extracted from viewbox attribute
-372       width = widthAttr ? parseFloat(widthAttr) : width;
-373       height = heightAttr ? parseFloat(heightAttr) : height;
-374 
-375       var options = { 
-376         width: width, 
-377         height: height
-378       };
-379 
-380       var elements = fabric.parseElements(elements, clone(options));
-381       if (!elements || (elements && !elements.length)) return;
-382 
-383       if (callback) {
-384         callback(elements, options);
-385       }
-386     };
-387   })();
-388   
-389   extend(fabric, {
-390     parseAttributes:        parseAttributes,
-391     parseElements:          parseElements,
-392     parseStyleAttribute:    parseStyleAttribute,
-393     parsePointsAttribute:   parsePointsAttribute
-394   });
-395   
-396 })();
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_path.class.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_path.class.js.html deleted file mode 100644 index 4c86c20d..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_path.class.js.html +++ /dev/null @@ -1,503 +0,0 @@ -
  1 //= require "object.class"
-  2 
-  3 (function(){
-  4   
-  5   var fabric = this.fabric || (this.fabric = { }),
-  6       min = fabric.util.array.min,
-  7       max = fabric.util.array.max,
-  8       extend = fabric.util.object.extend;
-  9   
- 10   if (fabric.Path) {
- 11     fabric.warn('fabric.Path is already defined');
- 12     return;
- 13   }
- 14   if (!fabric.Object) {
- 15     fabric.warn('fabric.Path requires fabric.Object');
- 16     return;
- 17   }
- 18   
- 19   /**
- 20    * @private
- 21    */
- 22   function getX(item) {
- 23     if (item[0] === 'H') {
- 24       return item[1];
- 25     }
- 26     return item[item.length - 2];
- 27   }
- 28   
- 29   /**
- 30    * @private
- 31    */
- 32   function getY(item) {
- 33     if (item[0] === 'V') {
- 34       return item[1];
- 35     }
- 36     return item[item.length - 1];
- 37   }
- 38   
- 39   /** 
- 40    * @class Path
- 41    * @extends fabric.Object
- 42    */
- 43   fabric.Path = fabric.util.createClass(fabric.Object, /** @scope fabric.Path.prototype */ {
- 44     
- 45     /**
- 46      * @property
- 47      * @type String
- 48      */
- 49     type: 'path',
- 50     
- 51     /**
- 52      * Constructor
- 53      * @method initialize
- 54      * @param {Array|String} path Path data (sequence of coordinates and corresponding "command" tokens)
- 55      * @param {Object} [options] Options object
- 56      */
- 57     initialize: function(path, options) {
- 58       options = options || { };
- 59       
- 60       this.setOptions(options);
- 61       this._importProperties();
- 62       
- 63       this.originalState = { };
- 64       
- 65       if (!path) {
- 66         throw Error('`path` argument is required');
- 67       }
- 68       
- 69       var fromArray = Object.prototype.toString.call(path) === '[object Array]';
- 70       
- 71       this.path = fromArray
- 72         ? path
- 73         : path.match && path.match(/[a-zA-Z][^a-zA-Z]*/g);
- 74         
- 75       if (!this.path) return;
- 76       
- 77       // TODO (kangax): rewrite this idiocracy
- 78       if (!fromArray) {
- 79         this._initializeFromArray(options);
- 80       };
- 81       
- 82       this.setCoords();
- 83       
- 84       if (options.sourcePath) {
- 85         this.setSourcePath(options.sourcePath);
- 86       }
- 87     },
- 88     
- 89     _initializeFromArray: function(options) {
- 90       var isWidthSet = 'width' in options,
- 91           isHeightSet = 'height' in options;
- 92           
- 93       this.path = this._parsePath();
- 94       
- 95       if (!isWidthSet || !isHeightSet) {
- 96         extend(this, this._parseDimensions());
- 97         if (isWidthSet) {
- 98           this.width = this.options.width;
- 99         }
-100         if (isHeightSet) {
-101           this.height = this.options.height;
-102         }
-103       }
-104     },
-105     
-106     _render: function(ctx) {
-107       var current, // current instruction 
-108           x = 0, // current x 
-109           y = 0, // current y
-110           controlX = 0, // current control point x
-111           controlY = 0, // current control point y
-112           tempX, 
-113           tempY,
-114           l = -(this.width / 2),
-115           t = -(this.height / 2);
-116           
-117       for (var i = 0, len = this.path.length; i < len; ++i) {
-118         
-119         current = this.path[i];
-120         
-121         switch (current[0]) { // first letter
-122           
-123           case 'l': // lineto, relative
-124             x += current[1];
-125             y += current[2];
-126             ctx.lineTo(x + l, y + t);
-127             break;
-128             
-129           case 'L': // lineto, absolute
-130             x = current[1];
-131             y = current[2];
-132             ctx.lineTo(x + l, y + t);
-133             break;
-134             
-135           case 'h': // horizontal lineto, relative
-136             x += current[1];
-137             ctx.lineTo(x + l, y + t);
-138             break;
-139             
-140           case 'H': // horizontal lineto, absolute
-141             x = current[1];
-142             ctx.lineTo(x + l, y + t);
-143             break;
-144             
-145           case 'v': // vertical lineto, relative
-146             y += current[1];
-147             ctx.lineTo(x + l, y + t);
-148             break;
-149             
-150           case 'V': // verical lineto, absolute
-151             y = current[1];
-152             ctx.lineTo(x + l, y + t);
-153             break;
-154             
-155           case 'm': // moveTo, relative
-156             x += current[1];
-157             y += current[2];
-158             ctx.moveTo(x + l, y + t);
-159             break;
-160           
-161           case 'M': // moveTo, absolute
-162             x = current[1];
-163             y = current[2];
-164             ctx.moveTo(x + l, y + t);
-165             break;
-166             
-167           case 'c': // bezierCurveTo, relative
-168             tempX = x + current[5];
-169             tempY = y + current[6];
-170             controlX = x + current[3];
-171             controlY = y + current[4];
-172             ctx.bezierCurveTo(
-173               x + current[1] + l, // x1
-174               y + current[2] + t, // y1
-175               controlX + l, // x2
-176               controlY + t, // y2
-177               tempX + l,
-178               tempY + t
-179             );
-180             x = tempX;
-181             y = tempY;
-182             break;
-183             
-184           case 'C': // bezierCurveTo, absolute
-185             x = current[5];
-186             y = current[6];
-187             controlX = current[3];
-188             controlY = current[4];
-189             ctx.bezierCurveTo(
-190               current[1] + l, 
-191               current[2] + t, 
-192               controlX + l, 
-193               controlY + t, 
-194               x + l, 
-195               y + t
-196             );
-197             break;
-198           
-199           case 's': // shorthand cubic bezierCurveTo, relative
-200             // transform to absolute x,y
-201             tempX = x + current[3];
-202             tempY = y + current[4];
-203             // calculate reflection of previous control points            
-204             controlX = 2 * x - controlX;
-205             controlY = 2 * y - controlY;
-206             ctx.bezierCurveTo(
-207               controlX + l,
-208               controlY + t,
-209               x + current[1] + l,
-210               y + current[2] + t,
-211               tempX + l,
-212               tempY + t
-213             );
-214             x = tempX;
-215             y = tempY;
-216             break;
-217             
-218           case 'S': // shorthand cubic bezierCurveTo, absolute
-219             tempX = current[3];
-220             tempY = current[4];
-221             // calculate reflection of previous control points            
-222             controlX = 2*x - controlX;
-223             controlY = 2*y - controlY;
-224             ctx.bezierCurveTo(
-225               controlX + l,
-226               controlY + t,
-227               current[1] + l,
-228               current[2] + t,
-229               tempX + l,
-230               tempY + t
-231             );
-232             x = tempX;
-233             y = tempY;
-234             break;
-235             
-236           case 'q': // quadraticCurveTo, relative
-237             x += current[3];
-238             y += current[4];
-239             ctx.quadraticCurveTo(
-240               current[1] + l, 
-241               current[2] + t, 
-242               x + l, 
-243               y + t
-244             );
-245             break;
-246             
-247           case 'Q': // quadraticCurveTo, absolute
-248             x = current[3];
-249             y = current[4];
-250             controlX = current[1];
-251             controlY = current[2];
-252             ctx.quadraticCurveTo(
-253               controlX + l,
-254               controlY + t,
-255               x + l,
-256               y + t
-257             );
-258             break;
-259           
-260           case 'T':
-261             tempX = x;
-262             tempY = y;
-263             x = current[1];
-264             y = current[2];
-265             // calculate reflection of previous control points
-266             controlX = -controlX + 2 * tempX;
-267             controlY = -controlY + 2 * tempY;
-268             ctx.quadraticCurveTo(
-269               controlX + l,
-270               controlY + t,
-271               x + l, 
-272               y + t
-273             );
-274             break;
-275             
-276           case 'a':
-277             // TODO (kangax): implement arc (relative)
-278             break;
-279           
-280           case 'A':
-281             // TODO (kangax): implement arc (absolute)
-282             break;
-283           
-284           case 'z':
-285           case 'Z':
-286             ctx.closePath();
-287             break;
-288         }
-289       }
-290     },
-291     
-292     render: function(ctx, noTransform) {
-293       ctx.save();
-294       var m = this.transformMatrix;
-295       if (m) {
-296         ctx.transform(m[0], m[1], m[2], m[3], m[4], m[5]);
-297       }
-298       if (!noTransform) {
-299         this.transform(ctx);
-300       }
-301       // ctx.globalCompositeOperation = this.fillRule;
-302 
-303       if (this.overlayFill) {
-304         ctx.fillStyle = this.overlayFill;
-305       }
-306       else if (this.fill) {
-307         ctx.fillStyle = this.fill;
-308       }
-309       
-310       if (this.stroke) {
-311         ctx.strokeStyle = this.stroke;
-312       }
-313       ctx.beginPath();
-314       
-315       this._render(ctx);
-316       
-317       if (this.fill) {
-318         ctx.fill();
-319       }
-320       if (this.stroke) {
-321         ctx.strokeStyle = this.stroke;
-322         ctx.lineWidth = this.strokeWidth;
-323         ctx.lineCap = ctx.lineJoin = 'round';
-324         ctx.stroke();
-325       }
-326       if (!noTransform && this.active) {
-327         this.drawBorders(ctx);
-328         this.hideCorners || this.drawCorners(ctx);
-329       }
-330       ctx.restore();
-331     },
-332     
-333     /**
-334      * Returns string representation of an instance
-335      * @method toString
-336      * @return {String} string representation of an instance
-337      */
-338     toString: function() {
-339       return '#<fabric.Path ('+ this.complexity() +'): ' + 
-340         JSON.stringify({ top: this.top, left: this.left }) +'>';
-341     },
-342     
-343     /**
-344      * @method toObject
-345      * @return {Object}
-346      */
-347     toObject: function() {
-348       var o = extend(this.callSuper('toObject'), {
-349         path: this.path
-350       });
-351       if (this.sourcePath) {
-352         o.sourcePath = this.sourcePath;
-353       }
-354       if (this.transformMatrix) {
-355         o.transformMatrix = this.transformMatrix;
-356       }
-357       return o;
-358     },
-359     
-360     /**
-361      * @method toDatalessObject
-362      * @return {Object}
-363      */
-364     toDatalessObject: function() {
-365       var o = this.toObject();
-366       if (this.sourcePath) {
-367         o.path = this.sourcePath;
-368       }
-369       delete o.sourcePath;
-370       return o;
-371     },
-372     
-373     /**
-374      * Returns number representation of an instance complexity
-375      * @method complexity
-376      * @return {Number} complexity
-377      */
-378     complexity: function() {
-379       return this.path.length;
-380     },
-381     
-382     set: function(prop, value) {
-383       return this.callSuper('set', prop, value);
-384     },
-385     
-386     _parsePath: function() {
-387       
-388       var result = [],
-389           currentPath, 
-390           chunks;
-391       
-392       // use plain loop for perf.
-393       for (var i = 0, len = this.path.length; i < len; i++) {
-394         currentPath = this.path[i];
-395         chunks = currentPath.slice(1).trim().replace(/(\d)-/g, '$1###-').split(/\s|,|###/);
-396         result.push([currentPath.charAt(0)].concat(chunks.map(parseFloat)));
-397       }
-398       return result;
-399     },
-400     
-401     /**
-402      * @method _parseDimensions
-403      */
-404     _parseDimensions: function() {
-405       var aX = [], 
-406           aY = [], 
-407           previousX, 
-408           previousY, 
-409           isLowerCase = false, 
-410           x, 
-411           y;
-412       
-413       this.path.forEach(function(item, i) {
-414         if (item[0] !== 'H') {
-415           previousX = (i === 0) ? getX(item) : getX(this.path[i-1]);
-416         }
-417         if (item[0] !== 'V') {
-418           previousY = (i === 0) ? getY(item) : getY(this.path[i-1]);
-419         }
-420         
-421         // lowercased letter denotes relative position; 
-422         // transform to absolute
-423         if (item[0] === item[0].toLowerCase()) {
-424           isLowerCase = true;
-425         }
-426         
-427         // last 2 items in an array of coordinates are the actualy x/y (except H/V);
-428         // collect them
-429         
-430         // TODO (kangax): support relative h/v commands
-431             
-432         x = isLowerCase
-433           ? previousX + getX(item)
-434           : item[0] === 'V' 
-435             ? previousX 
-436             : getX(item);
-437             
-438         y = isLowerCase
-439           ? previousY + getY(item)
-440           : item[0] === 'H' 
-441             ? previousY 
-442             : getY(item);
-443         
-444         var val = parseInt(x, 10);
-445         if (!isNaN(val)) aX.push(val);
-446         
-447         val = parseInt(y, 10);
-448         if (!isNaN(val)) aY.push(val);
-449         
-450       }, this);
-451       
-452       var minX = min(aX), 
-453           minY = min(aY), 
-454           deltaX = deltaY = 0;
-455       
-456       var o = {
-457         top: minY - deltaY,
-458         left: minX - deltaX,
-459         bottom: max(aY) - deltaY,
-460         right: max(aX) - deltaX
-461       };
-462       
-463       o.width = o.right - o.left;
-464       o.height = o.bottom - o.top;
-465       
-466       return o;
-467     }
-468   });
-469   
-470   /**
-471    * Creates an instance of fabric.Path from an object
-472    * @static
-473    * @method fabric.Path.fromObject
-474    * @return {fabric.Path} Instance of fabric.Path
-475    */
-476   fabric.Path.fromObject = function(object) {
-477     return new fabric.Path(object.path, object);
-478   };
-479   
-480   var ATTRIBUTE_NAMES = fabric.Path.ATTRIBUTE_NAMES = 'd fill fill-opacity fill-rule stroke stroke-width transform'.split(' ');
-481   
-482   /**
-483    * Creates an instance of fabric.Path from an SVG <PATH> element
-484    * @static
-485    * @method fabric.Path.fromElement
-486    * @param {SVGElement} element to parse
-487    * @param {Object} options object
-488    * @return {fabric.Path} Instance of fabric.Path
-489    */
-490   fabric.Path.fromElement = function(element, options) {
-491     var parsedAttributes = fabric.parseAttributes(element, ATTRIBUTE_NAMES),
-492         path = parsedAttributes.d;
-493     delete parsedAttributes.d;
-494     return new fabric.Path(path, extend(parsedAttributes, options));
-495   };
-496 })();
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_path_group.class.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_path_group.class.js.html deleted file mode 100644 index ba75e791..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_path_group.class.js.html +++ /dev/null @@ -1,236 +0,0 @@ -
  1 //= require "path.class"
-  2 
-  3 (function(){
-  4   
-  5   var fabric = this.fabric || (this.fabric = { }),
-  6       extend = fabric.util.object.extend,
-  7       invoke = fabric.util.array.invoke,
-  8       parentSet = fabric.Object.prototype.set,
-  9       parentToObject = fabric.Object.prototype.toObject,
- 10       camelize = fabric.util.string.camelize,
- 11       capitalize = fabric.util.string.capitalize;
- 12   
- 13   if (fabric.PathGroup) {
- 14     fabric.warn('fabric.PathGroup is already defined');
- 15     return;
- 16   }
- 17   
- 18   /** 
- 19    * @class PathGroup
- 20    * @extends fabric.Path
- 21    */
- 22   fabric.PathGroup = fabric.util.createClass(fabric.Path, /** @scope fabric.PathGroup.prototype */ {
- 23     
- 24     /**
- 25      * @property
- 26      * @type String
- 27      */
- 28     type: 'path-group',
- 29     
- 30     /**
- 31      * @property
- 32      * @type Boolean
- 33      */
- 34     forceFillOverwrite: false,
- 35     
- 36     /**
- 37      * Constructor
- 38      * @method initialize
- 39      * @param {Array} paths
- 40      * @param {Object} [options] Options object
- 41      * @return {fabric.PathGroup} thisArg
- 42      */
- 43     initialize: function(paths, options) {
- 44       
- 45       options = options || { };
- 46       
- 47       this.originalState = { };
- 48       this.paths = paths;
- 49       
- 50       this.setOptions(options);
- 51       this.initProperties();
- 52       
- 53       this.setCoords();
- 54       
- 55       if (options.sourcePath) {
- 56         this.setSourcePath(options.sourcePath);
- 57       }
- 58     },
- 59     
- 60     initProperties: function() {
- 61       this.stateProperties.forEach(function(prop) {
- 62         if (prop === 'fill') {
- 63           this.set(prop, this.options[prop]);
- 64         }
- 65         else if (prop === 'angle') {
- 66           this.setAngle(this.options[prop]);
- 67         }
- 68         else {
- 69           this[prop] = this.options[prop];
- 70         }
- 71       }, this);
- 72     },
- 73     
- 74     render: function(ctx) {
- 75       if (this.stub) {
- 76         // fast-path, rendering image stub
- 77         ctx.save();
- 78         
- 79         this.transform(ctx);
- 80         this.stub.render(ctx, false /* no transform */);
- 81         if (this.active) {
- 82           this.drawBorders(ctx);
- 83           this.drawCorners(ctx);
- 84         }
- 85         ctx.restore();
- 86       }
- 87       else {
- 88         ctx.save();
- 89         
- 90         var m = this.transformMatrix;
- 91         if (m) {
- 92           ctx.transform(m[0], m[1], m[2], m[3], m[4], m[5]);
- 93         }
- 94         
- 95         this.transform(ctx);
- 96         for (var i = 0, l = this.paths.length; i < l; ++i) {
- 97           this.paths[i].render(ctx, true);
- 98         }
- 99         if (this.active) {
-100           this.drawBorders(ctx);
-101           this.hideCorners || this.drawCorners(ctx);
-102         }
-103         ctx.restore();
-104       }
-105     },
-106     
-107     /**
-108      * @method set
-109      * @param {String} prop
-110      * @param {Any} value
-111      * @return {fabric.PathGroup} thisArg
-112      */
-113     set: function(prop, value) {
-114       if ((prop === 'fill' || prop === 'overlayFill') && this.isSameColor()) {
-115         this[prop] = value;
-116         var i = this.paths.length;
-117         while (i--) {
-118           this.paths[i].set(prop, value);
-119         }
-120       }
-121       else {
-122         // skipping parent "class" - fabric.Path
-123         parentSet.call(this, prop, value);
-124       }
-125       return this;
-126     },
-127     
-128     /**
-129      * @method toObject
-130      * @return {Object} object representation of an instance
-131      */
-132     toObject: function() {
-133       return extend(parentToObject.call(this), {
-134         paths: invoke(this.getObjects(), 'clone'),
-135         sourcePath: this.sourcePath
-136       });
-137     },
-138     
-139     /**
-140      * @method toDatalessObject
-141      * @return {Object} dataless object representation of an instance
-142      */
-143     toDatalessObject: function() {
-144       var o = this.toObject();
-145       if (this.sourcePath) {
-146         o.paths = this.sourcePath;
-147       }
-148       return o;
-149     },
-150     
-151      /**
-152       * Returns a string representation of an object
-153       * @method toString
-154       * @return {String} string representation of an object
-155       */
-156     toString: function() {
-157       return '#<fabric.PathGroup (' + this.complexity() + 
-158         '): { top: ' + this.top + ', left: ' + this.left + ' }>';
-159     },
-160     
-161     /**
-162      * @method isSameColor
-163      * @return {Boolean} true if all paths are of the same color (`fill`)
-164      */
-165     isSameColor: function() {
-166       var firstPathFill = this.getObjects()[0].get('fill');
-167       return this.getObjects().every(function(path) {
-168         return path.get('fill') === firstPathFill;
-169       });
-170     },
-171     
-172     /**
-173       * Returns number representation of object's complexity
-174       * @method complexity
-175       * @return {Number} complexity
-176       */
-177     complexity: function() {
-178       return this.paths.reduce(function(total, path) {
-179         return total + ((path && path.complexity) ? path.complexity() : 0);
-180       }, 0);
-181     },
-182     
-183     /**
-184       * Makes path group grayscale
-185       * @method toGrayscale
-186       * @return {fabric.PathGroup} thisArg
-187       */
-188     toGrayscale: function() {
-189       var i = this.paths.length;
-190       while (i--) {
-191         this.paths[i].toGrayscale();
-192       }
-193       return this;
-194     },
-195     
-196     /**
-197      * @method getObjects
-198      * @return {Array} array of path objects included in this path group
-199      */
-200     getObjects: function() {
-201       return this.paths;
-202     }
-203   });
-204   
-205   /**
-206    * @private
-207    * @method instantiatePaths
-208    */
-209   function instantiatePaths(paths) {
-210     for (var i = 0, len = paths.length; i < len; i++) {
-211       if (!(paths[i] instanceof fabric.Object)) {
-212         var klassName = camelize(capitalize(paths[i].type));
-213         paths[i] = fabric[klassName].fromObject(paths[i]);
-214       }
-215     }
-216     return paths;
-217   }
-218   
-219   /**
-220    * @static
-221    * @method fabric.PathGroup.fromObject
-222    * @param {Object} object
-223    * @return {fabric.PathGroup}
-224    */
-225   fabric.PathGroup.fromObject = function(object) {
-226     var paths = instantiatePaths(object.paths);
-227     return new fabric.PathGroup(paths, object);
-228   };
-229 })();
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_point.class.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_point.class.js.html deleted file mode 100644 index f62c3f39..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_point.class.js.html +++ /dev/null @@ -1,201 +0,0 @@ -
  1 (function() {
-  2   
-  3   /* Adaptation of work of Kevin Lindsey (kevin@kevlindev.com) */
-  4   
-  5   var fabric = this.fabric || (this.fabric = { });
-  6 
-  7   if (fabric.Point) {    
-  8     fabric.warn('fabric.Point is already defined');
-  9     return;
- 10   }
- 11 
- 12   fabric.Point = Point;
- 13   
- 14   /**
- 15    * @name Point
- 16    * @memberOf fabric
- 17    * @constructor
- 18    * @param {Number} x
- 19    * @param {Number} y
- 20    * @return {fabric.Point} thisArg
- 21    */
- 22   function Point(x, y) {
- 23     if (arguments.length > 0) {
- 24       this.init(x, y);
- 25     }
- 26   }
- 27   
- 28   Point.prototype = /** @scope fabric.Point.prototype */ {
- 29     
- 30     constructor: Point,
- 31     
- 32     /**
- 33      * @method init
- 34      * @param {Number} x
- 35      * @param {Number} y
- 36      */
- 37     init: function (x, y) {
- 38       this.x = x;
- 39       this.y = y;
- 40     },
- 41     
- 42     /**
- 43      * @method add
- 44      * @param {fabric.Point} that
- 45      * @return {fabric.Point} new Point instance with added values
- 46      */
- 47     add: function (that) {
- 48       return new Point(this.x + that.x, this.y + that.y);
- 49     },
- 50     
- 51     /**
- 52      * @method addEquals
- 53      * @param {fabric.Point} that
- 54      * @return {fabric.Point} thisArg
- 55      */
- 56     addEquals: function (that) {
- 57       this.x += that.x;
- 58       this.y += that.y;
- 59       return this;
- 60     },
- 61     
- 62     /**
- 63      * @method scalarAdd
- 64      * @param {Number} scalar
- 65      * @return {fabric.Point} new Point with added value
- 66      */
- 67     scalarAdd: function (scalar) {
- 68       return new Point(this.x + scalar, this.y + scalar);
- 69     },
- 70     
- 71     /**
- 72      * @method scalarAddEquals
- 73      * @param {Number} scalar
- 74      * @param {fabric.Point} thisArg
- 75      */
- 76     scalarAddEquals: function (scalar) {
- 77       this.x += scalar;
- 78       this.y += scalar;
- 79       return this;
- 80     },
- 81     
- 82     /**
- 83      * @method subtract
- 84      * @param {fabric.Point} that
- 85      * @return {fabric.Point} new Point object with subtracted values
- 86      */
- 87     subtract: function (that) {
- 88       return new Point(this.x - that.x, this.y - that.y);
- 89     },
- 90     
- 91     /**
- 92      * @method subtractEquals
- 93      * @param {fabric.Point} that
- 94      * @return {fabric.Point} thisArg
- 95      */
- 96     subtractEquals: function (that) {
- 97       this.x -= that.x;
- 98       this.y -= that.y;
- 99       return this;
-100     },
-101     
-102     scalarSubtract: function (scalar) {
-103       return new Point(this.x - scalar, this.y - scalar);
-104     },
-105     
-106     scalarSubtractEquals: function (scalar) {
-107       this.x -= scalar;
-108       this.y -= scalar;
-109       return this;
-110     },
-111     
-112     multiply: function (scalar) {
-113       return new Point(this.x * scalar, this.y * scalar);
-114     },
-115     
-116     multiplyEquals: function (scalar) {
-117       this.x *= scalar;
-118       this.y *= scalar;
-119       return this;
-120     },
-121     
-122     divide: function (scalar) {
-123       return new Point(this.x / scalar, this.y / scalar);
-124     },
-125     
-126     divideEquals: function (scalar) {
-127       this.x /= scalar;
-128       this.y /= scalar;
-129       return this;
-130     },
-131     
-132     eq: function (that) {
-133       return (this.x == that.x && this.y == that.y);
-134     },
-135     
-136     lt: function (that) {
-137       return (this.x < that.x && this.y < that.y);
-138     },
-139     
-140     lte: function (that) {
-141       return (this.x <= that.x && this.y <= that.y);
-142     },
-143     
-144     gt: function (that) {
-145       return (this.x > that.x && this.y > that.y);
-146     },
-147     
-148     gte: function (that) {
-149       return (this.x >= that.x && this.y >= that.y);
-150     },
-151     
-152     lerp: function (that, t) {
-153       return new Point(this.x + (that.x - this.x) * t, this.y + (that.y - this.y) * t);
-154     },
-155     
-156     distanceFrom: function (that) {
-157       var dx = this.x - that.x,
-158           dy = this.y - that.y;
-159       return Math.sqrt(dx * dx + dy * dy);
-160     },
-161     
-162     min: function (that) {
-163       return new Point(Math.min(this.x, that.x), Math.min(this.y, that.y));
-164     },
-165     
-166     max: function (that) {
-167       return new Point(Math.max(this.x, that.x), Math.max(this.y, that.y));
-168     },
-169     
-170     toString: function () {
-171       return this.x + "," + this.y;
-172     },
-173     
-174     setXY: function (x, y) {
-175       this.x = x;
-176       this.y = y;
-177     },
-178     
-179     setFromPoint: function (that) {
-180       this.x = that.x;
-181       this.y = that.y;
-182     },
-183     
-184     swap: function (that) {
-185       var x = this.x,
-186           y = this.y;
-187       this.x = that.x;
-188       this.y = that.y;
-189       that.x = x;
-190       that.y = y;
-191     }
-192   };
-193   
-194 })();
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_polygon.class.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_polygon.class.js.html deleted file mode 100644 index 5a971550..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_polygon.class.js.html +++ /dev/null @@ -1,154 +0,0 @@ -
  1 //= require "object.class"
-  2 
-  3 (function() {
-  4   
-  5   var fabric = this.fabric || (this.fabric = { }),
-  6       extend = fabric.util.object.extend,
-  7       min = fabric.util.array.min,
-  8       max = fabric.util.array.max;
-  9   
- 10   if (fabric.Polygon) {
- 11     fabric.warn('fabric.Polygon is already defined');
- 12     return;
- 13   }
- 14   
- 15   function byX(p) { return p.x; }
- 16   function byY(p) { return p.y; }
- 17   
- 18   /** 
- 19    * @class Polygon
- 20    * @extends fabric.Object
- 21    */
- 22   fabric.Polygon = fabric.util.createClass(fabric.Object, /** @scope fabric.Polygon.prototype */ {
- 23     
- 24     /**
- 25      * @property
- 26      * @type String
- 27      */
- 28     type: 'polygon',
- 29     
- 30     /**
- 31      * Constructor
- 32      * @method initialize
- 33      * @param {Array} points Array of points
- 34      * @param {Object} options Options object
- 35      * @return {fabric.Polygon} thisArg
- 36      */
- 37     initialize: function(points, options) {
- 38       options = options || { };
- 39       this.points = points;
- 40       this.callSuper('initialize', options);
- 41       this._calcDimensions();
- 42     },
- 43     
- 44     /**
- 45      * @private
- 46      * @method _calcDimensions
- 47      */
- 48     _calcDimensions: function() {
- 49       
- 50       var points = this.points,
- 51           minX = min(points, 'x'),
- 52           minY = min(points, 'y'),
- 53           maxX = max(points, 'x'),
- 54           maxY = max(points, 'y');
- 55       
- 56       this.width = maxX - minX;
- 57       this.height = maxY - minY;
- 58       this.minX = minX;
- 59       this.minY = minY;
- 60     },
- 61     
- 62     /**
- 63      * Returns object representation of an instance
- 64      * @method toObject
- 65      * @return {Object} object representation of an instance
- 66      */
- 67     toObject: function() {
- 68       return extend(this.callSuper('toObject'), {
- 69         points: this.points.concat()
- 70       });
- 71     },
- 72     
- 73     /**
- 74      * @private
- 75      * @method _render
- 76      * @param ctx {CanvasRenderingContext2D} context to render on
- 77      */
- 78     _render: function(ctx) {
- 79       var point;
- 80       ctx.beginPath();
- 81       for (var i = 0, len = this.points.length; i < len; i++) {
- 82         point = this.points[i];
- 83         ctx.lineTo(point.x, point.y);
- 84       }
- 85       if (this.fill) {
- 86         ctx.fill();
- 87       }
- 88       if (this.stroke) {
- 89         ctx.closePath();
- 90         ctx.stroke();
- 91       }
- 92     },
- 93     
- 94     /**
- 95      * Returns complexity of an instance
- 96      * @method complexity
- 97      * @return {Number} complexity of this instance
- 98      */
- 99     complexity: function() {
-100       return this.points.length;
-101     }
-102   });
-103   
-104   /**
-105    * List of attribute names to account for when parsing SVG element (used by `fabric.Polygon.fromElement`)
-106    * @static
-107    * @see: http://www.w3.org/TR/SVG/shapes.html#PolygonElement
-108    */
-109   fabric.Polygon.ATTRIBUTE_NAMES = 'fill fill-opacity stroke stroke-width transform'.split(' ');
-110   
-111   /**
-112    * Returns fabric.Polygon instance from an SVG element
-113    * @static
-114    * @method fabric.Polygon.fromElement
-115    * @param {SVGElement} element Element to parse
-116    * @param {Object} options Options object
-117    * @return {fabric.Polygon}
-118    */
-119   fabric.Polygon.fromElement = function(element, options) {
-120     if (!element) {
-121       return null;
-122     }
-123     options || (options = { });
-124     
-125     var points = fabric.parsePointsAttribute(element.getAttribute('points')),
-126         parsedAttributes = fabric.parseAttributes(element, fabric.Polygon.ATTRIBUTE_NAMES);
-127     
-128     for (var i = 0, len = points.length; i < len; i++) {
-129       // normalize coordinates, according to containing box (dimensions of which are passed via `options`)
-130       points[i].x -= (options.width / 2) || 0;
-131       points[i].y -= (options.height / 2) || 0;
-132     }
-133         
-134     return new fabric.Polygon(points, extend(parsedAttributes, options));
-135   };
-136   
-137   /**
-138    * Returns fabric.Polygon instance from an object representation
-139    * @static
-140    * @method fabric.Polygon.fromObject
-141    * @param {Object} object Object to create an instance from
-142    * @return {fabric.Polygon}
-143    */
-144   fabric.Polygon.fromObject = function(object) {
-145     return new fabric.Polygon(object.points, object);
-146   }
-147 })();
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_polyline.class.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_polyline.class.js.html deleted file mode 100644 index 2963467e..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_polyline.class.js.html +++ /dev/null @@ -1,137 +0,0 @@ -
  1 //= require "object.class"
-  2 
-  3 (function() {
-  4   
-  5   var fabric = this.fabric || (this.fabric = { });
-  6   
-  7   if (fabric.Polyline) {
-  8     fabric.warn('fabric.Polyline is already defined');
-  9     return;
- 10   }
- 11   
- 12   /** 
- 13    * @class Polyline
- 14    * @extends fabric.Object
- 15    */
- 16   fabric.Polyline = fabric.util.createClass(fabric.Object, /** @scope fabric.Polyline.prototype */ {
- 17     
- 18     /**
- 19      * @property
- 20      * @type String
- 21      */
- 22     type: 'polyline',
- 23     
- 24     /**
- 25      * Constructor
- 26      * @method initialize
- 27      * @param {Array} points array of points
- 28      * @param {Object} [options] Options object
- 29      * @return {Object} thisArg
- 30      */
- 31     initialize: function(points, options) {
- 32       options = options || { };
- 33       this.set('points', points);
- 34       this.callSuper('initialize', options);
- 35       this._calcDimensions();
- 36     },
- 37     
- 38     /**
- 39      * @private
- 40      * @method _calcDimensions
- 41      */
- 42     _calcDimensions: function() {
- 43       return fabric.Polygon.prototype._calcDimensions.call(this);
- 44     },
- 45     
- 46     /**
- 47      * Returns object representation of an instance
- 48      * @method toObject
- 49      * @return {Object} Object representation of an instance
- 50      */
- 51     toObject: function() {
- 52       return fabric.Polygon.prototype.toObject.call(this);
- 53     },
- 54     
- 55     /**
- 56      * @private
- 57      * @method _render
- 58      * @param {CanvasRenderingContext2D} ctx Context to render on
- 59      */
- 60     _render: function(ctx) {
- 61       var point;
- 62       ctx.beginPath();
- 63       for (var i = 0, len = this.points.length; i < len; i++) {
- 64         point = this.points[i];
- 65         ctx.lineTo(point.x, point.y);
- 66       }
- 67       if (this.fill) {
- 68         ctx.fill();
- 69       }
- 70       if (this.stroke) {
- 71         ctx.stroke();
- 72       }
- 73     },
- 74     
- 75     /**
- 76      * Returns complexity of an instance
- 77      * @method complexity
- 78      * @return {Number} complexity
- 79      */
- 80     complexity: function() {
- 81       return this.get('points').length;
- 82     }
- 83   });
- 84   
- 85   /**
- 86    * List of attribute names to account for when parsing SVG element (used by `fabric.Polyline.fromElement`)
- 87    * @static
- 88    * @see: http://www.w3.org/TR/SVG/shapes.html#PolylineElement
- 89    */
- 90   var ATTRIBUTE_NAMES = 'fill fill-opacity stroke stroke-width transform'.split(' ');
- 91   
- 92   /**
- 93    * Returns fabric.Polyline instance from an SVG element
- 94    * @static
- 95    * @method fabric.Polyline.fromElement
- 96    * @param {SVGElement} element Element to parse
- 97    * @param {Object} [options] Options object
- 98    * @return {Object} instance of fabric.Polyline
- 99    */
-100   fabric.Polyline.fromElement = function(element, options) {
-101     if (!element) {
-102       return null;
-103     }
-104     options || (options = { });
-105     
-106     var points = fabric.parsePointsAttribute(element.getAttribute('points')),
-107         parsedAttributes = fabric.parseAttributes(element, ATTRIBUTE_NAMES);
-108     
-109     for (var i = 0, len = points.length; i < len; i++) {
-110       // normalize coordinates, according to containing box (dimensions of which are passed via `options`)
-111       points[i].x -= (options.width / 2) || 0;
-112       points[i].y -= (options.height / 2) || 0;
-113     }
-114             
-115     return new fabric.Polyline(points, fabric.util.object.extend(parsedAttributes, options));
-116   };
-117   
-118   /**
-119    * Returns fabric.Polyline instance from an object representation
-120    * @static
-121    * @method fabric.Polyline.fromObject
-122    * @param {Object} [object] Object to create an instance from
-123    * @return {fabric.Polyline}
-124    */
-125   fabric.Polyline.fromObject = function(object) {
-126     var points = object.points;
-127     return new fabric.Polyline(points, object);
-128   };
-129   
-130 })();
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_rect.class.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_rect.class.js.html deleted file mode 100644 index b5fe56d4..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_rect.class.js.html +++ /dev/null @@ -1,159 +0,0 @@ -
  1 //= require "object.class"
-  2 
-  3 (function() {
-  4   
-  5   var fabric = this.fabric || (this.fabric = { });
-  6   
-  7   if (fabric.Rect) {
-  8     console.warn('fabric.Rect is already defined');
-  9     return;
- 10   }
- 11   
- 12   /** 
- 13    * @class Rect
- 14    * @extends fabric.Object
- 15    */
- 16   fabric.Rect = fabric.util.createClass(fabric.Object, /** @scope fabric.Rect.prototype */ {
- 17     
- 18     /**
- 19      * @property
- 20      * @type String
- 21      */
- 22     type: 'rect',
- 23     
- 24     /**
- 25      * @property
- 26      * @type Object
- 27      */
- 28     options: {
- 29       rx: 0,
- 30       ry: 0
- 31     },
- 32     
- 33     /**
- 34      * Constructor
- 35      * @method initialize
- 36      * @param options {Object} options object
- 37      * @return {Object} thisArg
- 38      */
- 39     initialize: function(options) {
- 40       this.callSuper('initialize', options);
- 41       this._initRxRy();
- 42     },
- 43     
- 44     /**
- 45      * @private
- 46      * @method _initRxRy
- 47      */
- 48     _initRxRy: function() {
- 49       if (this.options.rx && !this.options.ry) {
- 50         this.options.ry = this.options.rx;
- 51       }
- 52       else if (this.options.ry && !this.options.rx) {
- 53         this.options.rx = this.options.ry;
- 54       }
- 55     },
- 56     
- 57     /**
- 58      * @private
- 59      * @method _render
- 60      * @param ctx {CanvasRenderingContext2D} context to render on
- 61      */
- 62     _render: function(ctx) {   
- 63       var rx = this.options.rx || 0,
- 64           ry = this.options.ry || 0,
- 65           x = -this.width / 2,
- 66           y = -this.height / 2,
- 67           w = this.width,
- 68           h = this.height;
- 69       
- 70       ctx.beginPath();
- 71       ctx.moveTo(x+rx, y);
- 72       ctx.lineTo(x+w-rx, y);
- 73       ctx.bezierCurveTo(x+w, y, x+w, y+ry, x+w, y+ry);
- 74       ctx.lineTo(x+w, y+h-ry);
- 75       ctx.bezierCurveTo(x+w,y+h,x+w-rx,y+h,x+w-rx,y+h);
- 76       ctx.lineTo(x+rx,y+h);
- 77       ctx.bezierCurveTo(x,y+h,x,y+h-ry,x,y+h-ry);
- 78       ctx.lineTo(x,y+ry);
- 79       ctx.bezierCurveTo(x,y,x+rx,y,x+rx,y);
- 80       ctx.closePath();
- 81       
- 82       if (this.fill) {
- 83         ctx.fill();
- 84       }
- 85       if (this.stroke) {
- 86         ctx.stroke();
- 87       }
- 88     },
- 89     
- 90     // since our coordinate system differs from that of SVG
- 91     _normalizeLeftTopProperties: function(parsedAttributes) {
- 92       if (parsedAttributes.left) {
- 93         this.set('left', parsedAttributes.left + this.getWidth() / 2);
- 94       }
- 95       if (parsedAttributes.top) {
- 96         this.set('top', parsedAttributes.top + this.getHeight() / 2);
- 97       }
- 98       return this;
- 99     },
-100     
-101     /**
-102      * @method complexity
-103      * @return {Number} complexity
-104      */
-105     complexity: function() {
-106       return 1;
-107     }
-108   });
-109   
-110   // TODO (kangax): implement rounded rectangles (both parsing and rendering)
-111   fabric.Rect.ATTRIBUTE_NAMES = 'x y width height rx ry fill fill-opacity stroke stroke-width transform'.split(' ');
-112   
-113   /**
-114    * @private
-115    */
-116   function _setDefaultLeftTopValues(attributes) {
-117     attributes.left = attributes.left || 0;
-118     attributes.top  = attributes.top  || 0;
-119     return attributes;
-120   }
-121   
-122   /**
-123    * @static
-124    * @method fabric.Rect.fromElement
-125    * @param element {SVGElement} element to parse
-126    * @param options {Object} options object
-127    * @return {fabric.Rect} instance of fabric.Rect
-128    */
-129   fabric.Rect.fromElement = function(element, options) {
-130     if (!element) {
-131       return null;
-132     }
-133     
-134     var parsedAttributes = fabric.parseAttributes(element, fabric.Rect.ATTRIBUTE_NAMES);
-135     parsedAttributes = _setDefaultLeftTopValues(parsedAttributes);
-136     
-137     var rect = new fabric.Rect(fabric.util.object.extend(options || { }, parsedAttributes));
-138     rect._normalizeLeftTopProperties(parsedAttributes);
-139     
-140     return rect;
-141   };
-142   
-143   /**
-144    * @static
-145    * @method fabric.Rect.fromObject
-146    * @param object {Object} object to create an instance from
-147    * @return {Object} instance of fabric.Rect
-148    */
-149   fabric.Rect.fromObject = function(object) {
-150     return new fabric.Rect(object);
-151   };
-152 })();
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_scout.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_scout.js.html deleted file mode 100644 index c2b74e51..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_scout.js.html +++ /dev/null @@ -1,51 +0,0 @@ -
  1 var scout = (function () {
-  2   var tests = { };
-  3   return {
-  4     addTest: function (moduleName, test) {
-  5       tests[moduleName] = test;
-  6     },
-  7     fetch: function () {
-  8       var modulesToFetch = [ ];
-  9       for (var moduleName in tests) {
- 10         if (tests[moduleName]()) {
- 11           modulesToFetch.push(moduleName);
- 12         }
- 13       }
- 14       return modulesToFetch.join(',');
- 15     }
- 16   };
- 17 })();
- 18 
- 19 scout.addTest('json2', function () {
- 20   return typeof JSON === 'undefined';
- 21 });
- 22 scout.addTest('indexOf', function () {
- 23   return typeof Array.prototype.indexOf === 'undefined';
- 24 });
- 25 scout.addTest('forEach', function () {
- 26   return typeof Array.prototype.forEach === 'undefined';
- 27 });
- 28 scout.addTest('map', function () {
- 29   return typeof Array.prototype.map === 'undefined';
- 30 });
- 31 scout.addTest('every', function () {
- 32   return typeof Array.prototype.every === 'undefined';
- 33 });
- 34 scout.addTest('some', function () {
- 35   return typeof Array.prototype.some === 'undefined';
- 36 });
- 37 scout.addTest('filter', function () {
- 38   return typeof Array.prototype.filter === 'undefined';
- 39 });
- 40 scout.addTest('reduce', function () {
- 41   return typeof Array.prototype.reduce === 'undefined';
- 42 });
- 43 
- 44 scout.fetch();
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_text.class.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_text.class.js.html deleted file mode 100644 index 9657072e..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_text.class.js.html +++ /dev/null @@ -1,251 +0,0 @@ -
  1 //= require "object.class"
-  2 
-  3 (function() {
-  4   
-  5   var fabric = this.fabric || (this.fabric = { }),
-  6       extend = fabric.util.object.extend,
-  7       clone = fabric.util.object.clone;
-  8 
-  9   if (fabric.Text) {    
- 10     fabric.warn('fabric.Text is already defined');
- 11     return;
- 12   }
- 13   if (!fabric.Object) {
- 14     fabric.warn('fabric.Text requires fabric.Object');
- 15     return;
- 16   }
- 17   
- 18   /** 
- 19    * @class Text
- 20    * @extends fabric.Object
- 21    */
- 22   fabric.Text = fabric.util.createClass(fabric.Object, /** @scope fabric.Text.prototype */ {
- 23     
- 24     /**
- 25      * @property
- 26      * @type Object
- 27      */
- 28     options: {
- 29       top:         10,
- 30       left:        10,
- 31       fontsize:    20,
- 32       fontweight:  100,
- 33       fontfamily:  'Modernist_One_400',
- 34       path:        null
- 35     },
- 36     
- 37     /**
- 38      * @property
- 39      * @type String
- 40      */
- 41     type: 'text',
- 42     
- 43     /**
- 44      * Constructor
- 45      * @method initialize
- 46      * @param {String} text
- 47      * @param {Object} [options]
- 48      * @return {fabric.Text} thisArg
- 49      */
- 50     initialize: function(text, options) {
- 51       this.originalState = { };
- 52       this.initStateProperties();
- 53       this.text = text;
- 54       this.setOptions(options);
- 55       extend(this, this.options);
- 56       this.theta = this.angle * (Math.PI/180);
- 57       this.width = this.getWidth();
- 58       this.setCoords();
- 59     },
- 60     
- 61     /**
- 62      * @method initStateProperties
- 63      */
- 64     initStateProperties: function() {
- 65       var o;
- 66       if ((o = this.constructor) && 
- 67           (o = o.superclass) &&
- 68           (o = o.prototype) &&
- 69           (o = o.stateProperties) &&
- 70           o.clone) {
- 71         this.stateProperties = o.clone();
- 72         this.stateProperties.push('fontfamily', 'fontweight', 'path');
- 73       }
- 74     },
- 75     
- 76     /**
- 77      * Returns string representation of an instance
- 78      * @method toString
- 79      * @return {String} String representation of text object
- 80      */
- 81     toString: function() {
- 82       return '#<fabric.Text ('+ this.complexity() +'): ' + 
- 83         JSON.stringify({ text: this.text, fontfamily: this.fontfamily }) + '>';
- 84     },
- 85     
- 86     /**
- 87      * @private
- 88      * @method _render
- 89      * @param {CanvasRenderingContext2D} ctx Context to render on
- 90      */
- 91     _render: function(context) {
- 92       var o = Cufon.textOptions || (Cufon.textOptions = { });
- 93       
- 94       // export options to be used by cufon.js
- 95       o.left = this.left;
- 96       o.top = this.top;
- 97       o.context = context;
- 98       o.color = this.fill;
- 99       
-100       var el = this._initDummyElement();
-101       
-102       // set "cursor" to top/left corner
-103       this.transform(context);
-104       
-105       // draw text
-106       Cufon.replaceElement(el, {
-107         separate: 'none', 
-108         fontFamily: this.fontfamily
-109       });
-110       
-111       // update width, height
-112       this.width = o.width;
-113       this.height = o.height;
-114     },
-115     
-116     /**
-117      * @private
-118      * @method _initDummyElement
-119      */
-120     _initDummyElement: function() {
-121       var el = document.createElement('div');
-122       el.innerHTML = this.text;
-123       
-124       // need to specify these manually, since Jaxer doesn't support retrieving computed style
-125       el.style.fontSize = '40px';
-126       el.style.fontWeight = '400';
-127       el.style.fontStyle = 'normal';
-128       el.style.letterSpacing = 'normal';
-129       el.style.color = '#000000';
-130       el.style.fontWeight = '600';
-131       el.style.fontFamily = 'Verdana';
-132       
-133       return el;
-134     },
-135     
-136     /**
-137      * @method render
-138      * @param ctx {CanvasRenderingContext2D} context to render on
-139      */
-140     render: function(context) {
-141       context.save();
-142       this._render(context);
-143       if (this.active) {
-144         this.drawBorders(context);
-145         this.drawCorners(context);
-146       }
-147       context.restore();
-148     },
-149   	
-150   	/**
-151   	 * @method toObject
-152   	 * @return {Object} Object representation of text object
-153   	 */
-154   	toObject: function() {
-155   	  return extend(this.callSuper('toObject'), {
-156   	    text:         this.text,
-157   	    fontsize:     this.fontsize,
-158   	    fontweight:   this.fontweight,
-159   	    fontfamily:   this.fontfamily,
-160   	    path:         this.path
-161   	  });
-162   	},
-163   	
-164   	/**
-165   	 * @method setColor
-166   	 * @param {String} value
-167   	 * @return {fabric.Text} thisArg
-168   	 * @chainable
-169   	 */
-170   	setColor: function(value) {
-171   	  this.set('fill', value);
-172   	  return this;
-173   	},
-174   	
-175   	/**
-176   	 * @method setFontsize
-177   	 * @param {Number} value
-178   	 * @return {fabric.Text} thisArg
-179   	 * @chainable
-180   	 */
-181   	setFontsize: function(value) {
-182   	  this.set('fontsize', value);
-183   	  this.setCoords();
-184   	  return this;
-185   	},
-186   	
-187   	/**
-188   	 * @method getText
-189   	 * @return {String}
-190   	 */
-191   	getText: function() {
-192   	  return this.text;
-193   	},
-194   	
-195   	/**
-196   	 * Sets text of an instance, and updates its coordinates
-197   	 * @method setText
-198   	 * @param {String} value
-199   	 * @return {fabric.Text} thisArg
-200   	 * @chainable
-201   	 */
-202   	setText: function(value) {
-203   	  this.set('text', value);
-204   	  this.setCoords();
-205   	  return this;
-206   	},
-207   	
-208   	/**
-209   	 * Sets specified property to a specified value
-210   	 * @method set
-211   	 * @param {String} name
-212   	 * @param {Any} value
-213   	 * @return {fabric.Text} thisArg
-214   	 * @chainable
-215   	 */
-216   	set: function(name, value) {
-217   	  this[name] = value;
-218   	  if (name === 'fontfamily') {
-219   	    this.path = this.path.replace(/(.*?)([^\/]*)(\.font\.js)/, '$1' + value + '$3');
-220   	  }
-221   	  return this;
-222   	}
-223   });
-224 	
-225 	/**
-226 	 * Returns fabric.Text instance from an object representation
-227    * @static
-228    * @method fromObject
-229    * @param {Object} object to create an instance from
-230    * @return {fabric.Text} an instance
-231    */
-232 	fabric.Text.fromObject = function(object) {
-233 	  return new fabric.Text(object.text, clone(object));
-234 	};
-235 	
-236 	/**
-237    * @static
-238    * @method fabric.Text.fromElement
-239    * @return {fabric.Text} an instance
-240    */
-241 	fabric.Text.fromElement = function(element) {
-242 	  // TODO (kangax): implement this
-243 	};
-244 })();
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_triangle.class.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_triangle.class.js.html deleted file mode 100644 index b7b8b37e..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_triangle.class.js.html +++ /dev/null @@ -1,87 +0,0 @@ -
  1 (function() {
-  2   
-  3   var fabric = this.fabric || (this.fabric = { });
-  4   
-  5   if (fabric.Triangle) {
-  6     fabric.warn('fabric.Triangle is already defined');
-  7     return;
-  8   }
-  9   
- 10   /** 
- 11    * @class Triangle
- 12    * @extends fabric.Object
- 13    */
- 14   fabric.Triangle = fabric.util.createClass(fabric.Object, /** @scope fabric.Triangle.prototype */ {
- 15     
- 16     /**
- 17      * @property
- 18      * @type String
- 19      */
- 20     type: 'triangle',
- 21     
- 22     /**
- 23      * Constructor
- 24      * @method initialize
- 25      * @param options {Object} options object
- 26      * @return {Object} thisArg
- 27      */
- 28     initialize: function(options) {
- 29       options = options || { };
- 30       
- 31       this.callSuper('initialize', options);
- 32       
- 33       this.set('width', options.width || 100)
- 34           .set('height', options.height || 100);
- 35     },
- 36     
- 37     /**
- 38      * @private
- 39      * @method _render
- 40      * @param ctx {CanvasRenderingContext2D} Context to render on
- 41      */
- 42     _render: function(ctx) {      
- 43       var widthBy2 = this.width / 2,
- 44           heightBy2 = this.height / 2;
- 45       
- 46       ctx.beginPath();
- 47       ctx.moveTo(-widthBy2, heightBy2);
- 48       ctx.lineTo(0, -heightBy2);
- 49       ctx.lineTo(widthBy2, heightBy2);
- 50       ctx.closePath();
- 51       
- 52       if (this.fill) {
- 53         ctx.fill();
- 54       }
- 55       if (this.stroke) {
- 56         ctx.stroke();
- 57       }
- 58     },
- 59     
- 60     /**
- 61      * Returns complexity of an instance
- 62      * @method complexity
- 63      * @return {Number} complexity of this instance
- 64      */
- 65     complexity: function() {
- 66       return 1;
- 67     }
- 68   });
- 69   
- 70   /**
- 71    * Returns fabric.Triangle instance from an object representation
- 72    * @static
- 73    * @method Canvas.Trangle.fromObject
- 74    * @param object {Object} object to create an instance from
- 75    * @return {Object} instance of Canvas.Triangle
- 76    */
- 77   fabric.Triangle.fromObject = function(object) {
- 78     return new fabric.Triangle(object);
- 79   };
- 80 })();
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util.js.html deleted file mode 100644 index 25ac4efd..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util.js.html +++ /dev/null @@ -1,32 +0,0 @@ -
  1 (function (global) {
-  2   
-  3   var fabric = this.fabric || (this.fabric = { }),
-  4       slice = Array.prototype.slice,
-  5       apply = Function.prototype.apply;
-  6   
-  7   /** @namespace */
-  8   fabric.util = { };
-  9   
- 10   //= require "util/misc"
- 11   
- 12   //= require "util/lang_array"
- 13   //= require "util/lang_object"
- 14   //= require "util/lang_string"
- 15   //= require "util/lang_function"
- 16   
- 17   //= require "util/lang_class"
- 18   
- 19   //= require "util/dom_event"
- 20   //= require "util/dom_style"
- 21   //= require "util/dom_misc"
- 22   
- 23   //= require "util/dom_request"
- 24   
- 25 })(this);
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_dom_event.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_dom_event.js.html deleted file mode 100644 index d2877e60..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_dom_event.js.html +++ /dev/null @@ -1,245 +0,0 @@ -
  1 (function (global) {
-  2   
-  3   /* EVENT HANDLING */
-  4   
-  5   function areHostMethods(object) {
-  6     var methodNames = Array.prototype.slice.call(arguments, 1), 
-  7         t, i, len = methodNames.length;
-  8     for (i = 0; i < len; i++) {
-  9       t = typeof object[methodNames[i]];
- 10       if (!(/^(?:function|object|unknown)$/).test(t)) return false;
- 11     }
- 12     return true;
- 13   }
- 14   var getUniqueId = (function () {
- 15     if (typeof document.documentElement.uniqueID !== 'undefined') {
- 16       return function (element) {
- 17         return element.uniqueID;
- 18       };
- 19     }
- 20     var uid = 0;
- 21     return function (element) {
- 22       return element.__uniqueID || (element.__uniqueID = 'uniqueID__' + uid++);
- 23     };
- 24   })();
- 25 
- 26   var getElement, setElement;
- 27 
- 28   (function () {
- 29     var elements = { };
- 30     getElement = function (uid) {
- 31       return elements[uid];
- 32     };
- 33     setElement = function (uid, element) {
- 34       elements[uid] = element;
- 35     };
- 36   })();
- 37 
- 38   function createListener(uid, handler) {
- 39     return {
- 40       handler: handler,
- 41       wrappedHandler: createWrappedHandler(uid, handler)
- 42     };
- 43   }
- 44 
- 45   function createWrappedHandler(uid, handler) {
- 46     return function (e) {
- 47       handler.call(getElement(uid), e || window.event);
- 48     };
- 49   }
- 50 
- 51   function createDispatcher(uid, eventName) {
- 52     return function (e) {
- 53       if (handlers[uid] && handlers[uid][eventName]) {
- 54         var handlersForEvent = handlers[uid][eventName];
- 55         for (var i = 0, len = handlersForEvent.length; i < len; i++) {
- 56           handlersForEvent[i].call(this, e || window.event);
- 57         }
- 58       }
- 59     };
- 60   }
- 61 
- 62   var shouldUseAddListenerRemoveListener = (
- 63         areHostMethods(document.documentElement, 'addEventListener', 'removeEventListener') &&
- 64         areHostMethods(window, 'addEventListener', 'removeEventListener')),
- 65 
- 66       shouldUseAttachEventDetachEvent = (
- 67         areHostMethods(document.documentElement, 'attachEvent', 'detachEvent') &&
- 68         areHostMethods(window, 'attachEvent', 'detachEvent')),
- 69 
- 70       // IE branch
- 71       listeners = { },
- 72 
- 73       // DOM L0 branch
- 74       handlers = { },
- 75       
- 76       addListener, removeListener;
- 77 
- 78   if (shouldUseAddListenerRemoveListener) {
- 79     /** @ignore */
- 80     addListener = function (element, eventName, handler) {
- 81       element.addEventListener(eventName, handler, false);
- 82     };
- 83     /** @ignore */
- 84     removeListener = function (element, eventName, handler) {
- 85       element.removeEventListener(eventName, handler, false);
- 86     };
- 87   }
- 88 
- 89   else if (shouldUseAttachEventDetachEvent) {
- 90     /** @ignore */
- 91     addListener = function (element, eventName, handler) { 
- 92       var uid = getUniqueId(element);
- 93       setElement(uid, element);
- 94       if (!listeners[uid]) {
- 95         listeners[uid] = { };
- 96       }
- 97       if (!listeners[uid][eventName]) {
- 98         listeners[uid][eventName] = [ ];
- 99 
-100       }
-101       var listener = createListener(uid, handler);
-102       listeners[uid][eventName].push(listener);
-103       element.attachEvent('on' + eventName, listener.wrappedHandler);
-104     };
-105     /** @ignore */
-106     removeListener = function (element, eventName, handler) {
-107       var uid = getUniqueId(element), listener;
-108       if (listeners[uid] && listeners[uid][eventName]) {
-109         for (var i = 0, len = listeners[uid][eventName].length; i < len; i++) {
-110           listener = listeners[uid][eventName][i];
-111           if (listener && listener.handler === handler) {
-112             element.detachEvent('on' + eventName, listener.wrappedHandler);
-113             listeners[uid][eventName][i] = null;
-114           }
-115         }
-116       }        
-117     };
-118   }
-119   else {
-120     /** @ignore */
-121     addListener = function (element, eventName, handler) {
-122       var uid = getUniqueId(element);
-123       if (!handlers[uid]) {
-124         handlers[uid] = { };
-125       }
-126       if (!handlers[uid][eventName]) {
-127         handlers[uid][eventName] = [ ];
-128         var existingHandler = element['on' + eventName];
-129         if (existingHandler) {
-130           handlers[uid][eventName].push(existingHandler);
-131         }
-132         element['on' + eventName] = createDispatcher(uid, eventName);
-133       }
-134       handlers[uid][eventName].push(handler);
-135     };
-136     /** @ignore */
-137     removeListener = function (element, eventName, handler) {
-138       var uid = getUniqueId(element);
-139       if (handlers[uid] && handlers[uid][eventName]) {
-140         var handlersForEvent = handlers[uid][eventName];
-141         for (var i = 0, len = handlersForEvent.length; i < len; i++) {
-142           if (handlersForEvent[i] === handler) {
-143             handlersForEvent.splice(i, 1);
-144           }
-145         }
-146       }
-147     };
-148   }
-149   
-150   /**
-151    * Adds an event listener to an element
-152    * @mthod addListener
-153    * @memberOf fabric.util
-154    * @function
-155    * @param {HTMLElement} element
-156    * @param {String} eventName
-157    * @param {Function} handler
-158    */
-159   fabric.util.addListener = addListener;
-160   
-161   /**
-162    * Removes an event listener from an element
-163    * @mthod removeListener
-164    * @memberOf fabric.util
-165    * @function
-166    * @param {HTMLElement} element
-167    * @param {String} eventName
-168    * @param {Function} handler
-169    */
-170   fabric.util.removeListener = removeListener;
-171   
-172   var customEventListeners = { };
-173   
-174   /**
-175    * @mthod observeEvent
-176    * @memberOf fabric.util
-177    * @param {String} eventName
-178    * @param {Function} handler
-179    */
-180   function observeEvent(eventName, handler) {
-181     if (!customEventListeners[eventName]) {
-182       customEventListeners[eventName] = [ ];
-183     }
-184     customEventListeners[eventName].push(handler);
-185   }
-186   
-187   /**
-188    * Fires event with an optional memo object
-189    * @mthod fireEvent
-190    * @memberOf fabric.util
-191    * @param {String} eventName
-192    * @param {Object} [memo]
-193    */
-194   function fireEvent(eventName, memo) {
-195     var listenersForEvent = customEventListeners[eventName];
-196     if (!listenersForEvent) return;
-197     for (var i = 0, len = listenersForEvent.length; i < len; i++) {
-198       // avoiding try/catch for perf. reasons
-199       listenersForEvent[i]({ memo: memo });
-200     }
-201   }
-202   
-203   /**
-204    * Cross-browser wrapper for getting event's coordinates
-205    * @method getPointer
-206    * @memberOf fabric.util
-207    * @param {Event} event
-208    */
-209   function getPointer(event) {
-210     // TODO (kangax): this method needs fixing
-211     return { x: pointerX(event), y: pointerY(event) };
-212   }
-213 
-214   function pointerX(event) {
-215     var docElement = document.documentElement,
-216         body = document.body || { scrollLeft: 0 };
-217     
-218     // looks like in IE (<9) clientX at certain point (apparently when mouseup fires on VML element) 
-219     // is represented as COM object, with all the consequences, like "unknown" type and error on [[Get]]
-220     // need to investigate later
-221     return event.pageX || ((typeof event.clientX != 'unknown' ? event.clientX : 0) +
-222       (docElement.scrollLeft || body.scrollLeft) -
-223       (docElement.clientLeft || 0));
-224   }
-225 
-226   function pointerY(event) {
-227     var docElement = document.documentElement,
-228         body = document.body || { scrollTop: 0 };
-229 
-230     return  event.pageY || ((typeof event.clientY != 'unknown' ? event.clientY : 0) +
-231        (docElement.scrollTop || body.scrollTop) -
-232        (docElement.clientTop || 0));
-233   }
-234   
-235   fabric.util.getPointer = getPointer;
-236   fabric.util.observeEvent = observeEvent;
-237   fabric.util.fireEvent = fireEvent;
-238 })(this);
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_dom_misc.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_dom_misc.js.html deleted file mode 100644 index ca7ffdeb..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_dom_misc.js.html +++ /dev/null @@ -1,166 +0,0 @@ -
  1 function getById(id) {
-  2   return typeof id === 'string' ? document.getElementById(id) : id;
-  3 }
-  4 
-  5 function toArray(arrayLike) {
-  6   var arr = [ ], i = arrayLike.length;
-  7   while (i--) {
-  8     arr[i] = arrayLike[i];
-  9   }
- 10   return arr;
- 11 }
- 12 
- 13 function makeElement(tagName, attributes) {
- 14   var el = document.createElement(tagName);
- 15   for (var prop in attributes) {
- 16     if (prop === 'class') {
- 17       el.className = attributes[prop];
- 18     }
- 19     else if (prop === 'for') {
- 20       el.htmlFor = attributes[prop];
- 21     }
- 22     else {
- 23       el.setAttribute(prop, attributes[prop]);
- 24     }
- 25   }
- 26   return el;
- 27 }
- 28 
- 29 function addClass(element, className) {
- 30   if ((' ' + element.className + ' ').indexOf(' ' + className + ' ') === -1) {
- 31     element.className += (element.className ? ' ' : '') + className;
- 32   }  
- 33 }
- 34 
- 35 function wrapElement(element, wrapper, attributes) {
- 36   if (typeof wrapper === 'string') {
- 37     wrapper = makeElement(wrapper, attributes);
- 38   }
- 39   if (element.parentNode) {
- 40     element.parentNode.replaceChild(wrapper, element);
- 41   }
- 42   wrapper.appendChild(element);
- 43   return wrapper;
- 44 }
- 45 
- 46 // TODO (kangax): need to fix this method
- 47 function getElementOffset(element) {
- 48   var valueT = 0, valueL = 0;
- 49   do {
- 50     valueT += element.offsetTop  || 0;
- 51     valueL += element.offsetLeft || 0;
- 52     element = element.offsetParent;
- 53   } 
- 54   while (element);
- 55   return ({ left: valueL, top: valueT });
- 56 }
- 57 
- 58 (function () {
- 59   var style = document.documentElement.style;
- 60 
- 61   var selectProp = 'userSelect' in style
- 62     ? 'userSelect'
- 63     : 'MozUserSelect' in style 
- 64       ? 'MozUserSelect' 
- 65       : 'WebkitUserSelect' in style 
- 66         ? 'WebkitUserSelect' 
- 67         : 'KhtmlUserSelect' in style 
- 68           ? 'KhtmlUserSelect' 
- 69           : '';
- 70 
- 71   function makeElementUnselectable(element) {
- 72     if (typeof element.onselectstart !== 'undefined') {
- 73       element.onselectstart = fabric.util.falseFunction;
- 74     }
- 75     if (selectProp) {
- 76       element.style[selectProp] = 'none';
- 77     }
- 78     else if (typeof element.unselectable == 'string') {
- 79       element.unselectable = 'on';
- 80     }
- 81     return element;
- 82   }
- 83   
- 84   fabric.util.makeElementUnselectable = makeElementUnselectable;
- 85 })();
- 86 
- 87 (function(){
- 88   
- 89   function getScript(url, callback) {
- 90   	var headEl = document.getElementsByTagName("head")[0],
- 91   	    scriptEl = document.createElement('script'), 
- 92   	    loading = true;
- 93 
- 94   	scriptEl.type = 'text/javascript';
- 95   	scriptEl.setAttribute('runat', 'server');
- 96   	
- 97   	/** @ignore */
- 98   	scriptEl.onload = /** @ignore */ scriptEl.onreadystatechange = function(e) {
- 99   	  if (loading) {
-100   	    if (typeof this.readyState == 'string' && 
-101   	        this.readyState !== 'loaded' && 
-102   	        this.readyState !== 'complete') return;
-103     	  loading = false;
-104     		callback(e || window.event);
-105     		scriptEl = scriptEl.onload = scriptEl.onreadystatechange = null;
-106     	}
-107   	};
-108   	scriptEl.src = url;
-109   	headEl.appendChild(scriptEl);
-110   	// causes issue in Opera
-111   	// headEl.removeChild(scriptEl);
-112   }
-113   
-114   function getScriptJaxer(url, callback) {
-115     Jaxer.load(url);
-116     callback();
-117   }
-118   
-119   fabric.util.getScript = getScript;
-120   
-121   var Jaxer = this.Jaxer;
-122   if (Jaxer && Jaxer.load) {
-123     fabric.util.getScript = getScriptJaxer;
-124   }
-125 })();
-126 
-127 function animate(options) {
-128   options || (options = { });
-129   var start = +new Date(), 
-130       duration = options.duration || 500,
-131       finish = start + duration, time, pos,
-132       onChange = options.onChange || function() { },
-133       easing = options.easing || function(pos) { return (-Math.cos(pos * Math.PI) / 2) + 0.5; },
-134       startValue = 'startValue' in options ? options.startValue : 0,
-135       endValue = 'endValue' in options ? options.endValue : 100,
-136       isReversed = startValue > endValue
-137   
-138   options.onStart && options.onStart();
-139 
-140   var interval = setInterval(function() {
-141     time = +new Date();
-142     pos = time > finish ? 1 : (time - start) / duration;
-143     onChange(isReversed 
-144       ? (startValue - (startValue - endValue) * easing(pos)) 
-145       : (startValue + (endValue - startValue) * easing(pos)));
-146     if (time > finish) {
-147       clearInterval(interval);
-148       options.onComplete && options.onComplete();
-149     }
-150   }, 10);
-151 }
-152 
-153 fabric.util.getById = getById;
-154 fabric.util.toArray = toArray;
-155 fabric.util.makeElement = makeElement;
-156 fabric.util.addClass = addClass;
-157 fabric.util.wrapElement = wrapElement;
-158 fabric.util.getElementOffset = getElementOffset;
-159 fabric.util.animate = animate;
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_dom_request.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_dom_request.js.html deleted file mode 100644 index daa36638..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_dom_request.js.html +++ /dev/null @@ -1,69 +0,0 @@ -
  1 (function(){
-  2   
-  3   function addParamToUrl(url, param) {
-  4     return url + (/\?/.test(url) ? '&' : '?') + param;
-  5   }
-  6   
-  7   var makeXHR = (function() {
-  8     var factories = [
-  9       function() { return new ActiveXObject("Microsoft.XMLHTTP"); },
- 10       function() { return new ActiveXObject("Msxml2.XMLHTTP"); },
- 11       function() { return new ActiveXObject("Msxml2.XMLHTTP.3.0"); },
- 12       function() { return new XMLHttpRequest(); }
- 13     ];
- 14     for (var i = factories.length; i--; ) {
- 15       try {
- 16         var req = factories[i]();
- 17         if (req) {
- 18           return factories[i];
- 19         }
- 20       }
- 21       catch (err) { }
- 22     }
- 23   })();
- 24 
- 25   function emptyFn() { };
- 26 
- 27   function request(url, options) {
- 28 
- 29     options || (options = { });
- 30 
- 31     var method = options.method ? options.method.toUpperCase() : 'GET',
- 32         onComplete = options.onComplete || function() { },
- 33         request = makeXHR(),
- 34         body;
- 35         
- 36     /** @ignore */
- 37     request.onreadystatechange = function() {
- 38       if (request.readyState === 4) {
- 39         onComplete(request);
- 40         request.onreadystatechange = emptyFn;
- 41       }
- 42     };
- 43     
- 44     if (method === 'GET') {
- 45       body = null;
- 46       if (typeof options.parameters == 'string') {
- 47         url = addParamToUrl(url, options.parameters);
- 48       }
- 49     }
- 50 
- 51     request.open(method, url, true);
- 52     
- 53     if (method === 'POST' || method === 'PUT') {
- 54       request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
- 55     }
- 56 
- 57     request.send(body);
- 58     return request;
- 59   };
- 60   
- 61   fabric.util.request = request;
- 62 })();
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_dom_style.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_dom_style.js.html deleted file mode 100644 index 4822db0b..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_dom_style.js.html +++ /dev/null @@ -1,67 +0,0 @@ -
  1 (function () {
-  2   
-  3   function setStyle(element, styles) {
-  4     var elementStyle = element.style, match;
-  5     if (typeof styles === 'string') {
-  6       element.style.cssText += ';' + styles;
-  7       return styles.indexOf('opacity') > -1 
-  8         ? setOpacity(element, styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) 
-  9         : element;
- 10     }
- 11     for (var property in styles) {
- 12       if (property === 'opacity') {
- 13         setOpacity(element, styles[property]);
- 14       }
- 15       else {
- 16         var normalizedProperty = (property === 'float' || property === 'cssFloat') 
- 17           ? (typeof elementStyle.styleFloat === 'undefined' ? 'cssFloat' : 'styleFloat') 
- 18           : property;
- 19         elementStyle[normalizedProperty] = styles[property];
- 20       }
- 21     }
- 22     return element;
- 23   }
- 24 
- 25   var parseEl = document.createElement('div'),
- 26       supportsOpacity = typeof parseEl.style.opacity === 'string', 
- 27       supportsFilters = typeof parseEl.style.filter === 'string',
- 28       view = document.defaultView,
- 29       supportsGCS = view && typeof view.getComputedStyle !== 'undefined',
- 30       reOpacity = /alpha\s*\(\s*opacity\s*=\s*([^\)]+)\)/,
- 31       setOpacity = function (element) { return element; };
- 32 
- 33   if (supportsOpacity) {
- 34     /** @ignore */
- 35     setOpacity = function(element, value) {
- 36       element.style.opacity = value;
- 37       return element;
- 38     };
- 39   }
- 40   else if (supportsFilters) {
- 41     /** @ignore */
- 42     setOpacity = function(element, value) {
- 43       var es = element.style;
- 44       if (element.currentStyle && !element.currentStyle.hasLayout) {
- 45         es.zoom = 1;
- 46       }
- 47       if (reOpacity.test(es.filter)) {
- 48         value = value >= 0.9999 ? '' : ('alpha(opacity=' + (value * 100) + ')');
- 49         es.filter = es.filter.replace(reOpacity, value);
- 50       }
- 51       else {
- 52         es.filter += ' alpha(opacity=' + (value * 100) + ')';
- 53       }
- 54       return element;
- 55     };
- 56   }
- 57 
- 58   fabric.util.setStyle = setStyle;
- 59   
- 60 })();
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_lang_array.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_lang_array.js.html deleted file mode 100644 index 6c421dbf..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_lang_array.js.html +++ /dev/null @@ -1,190 +0,0 @@ -
  1 if (!Array.prototype.indexOf) {
-  2   Array.prototype.indexOf = function(value, from) {
-  3     var len = this.length >>> 0;
-  4     from = Number(from) || 0;
-  5     from = Math[from < 0 ? 'ceil' : 'floor'](from);
-  6     if (from < 0) {
-  7       from += len;
-  8     }
-  9     for (; from < len; from++) {
- 10       if (from in this && this[from] === value) {
- 11         return from;
- 12       }
- 13     }
- 14     return -1;
- 15   };
- 16 }
- 17 
- 18 if (!Array.prototype.forEach) {
- 19   Array.prototype.forEach = function(fn, context) {
- 20     for (var i = 0, len = this.length >>> 0; i < len; i++) {
- 21       if (i in this) {
- 22         fn.call(context, this[i], i, this);
- 23       }  
- 24     }
- 25   };
- 26 }
- 27 
- 28 if (!Array.prototype.map) {
- 29   Array.prototype.map = function(fn, context) {
- 30     var result = [ ];
- 31     for (var i = 0, len = this.length >>> 0; i < len; i++) {
- 32       if (i in this) {
- 33         result[i] = fn.call(context, this[i], i, this);
- 34       }
- 35     }
- 36     return result;
- 37   };
- 38 }
- 39 
- 40 if (!Array.prototype.every) {
- 41   Array.prototype.every = function(fn, context) {
- 42     for (var i = 0, len = this.length >>> 0; i < len; i++) {
- 43       if (i in this && !fn.call(context, this[i], i, this)) {
- 44         return false;
- 45       }
- 46     }
- 47     return true;
- 48   };
- 49 }
- 50 
- 51 if (!Array.prototype.some) {
- 52   Array.prototype.some = function(fn, context) {
- 53     for (var i = 0, len = this.length >>> 0; i < len; i++) {
- 54       if (i in this && fn.call(context, this[i], i, this)) {
- 55         return true;
- 56       }
- 57     }
- 58     return false;
- 59   };
- 60 }
- 61 
- 62 if (!Array.prototype.filter) {
- 63   Array.prototype.filter = function(fn, context) {
- 64     var result = [ ], val;
- 65     for (var i = 0, len = this.length >>> 0; i < len; i++) {
- 66       if (i in this) {
- 67         val = this[i]; // in case fn mutates this
- 68         if (fn.call(context, val, i, this)) {
- 69           result.push(val);
- 70         }
- 71       }
- 72     }
- 73     return result;
- 74   };
- 75 }
- 76 
- 77 if (!Array.prototype.reduce) {
- 78   Array.prototype.reduce = function(fn /*, initial*/) {
- 79     var len = this.length >>> 0,
- 80         i = 0,
- 81         rv;
- 82         
- 83     if (arguments.length > 1) {
- 84       rv = arguments[1];
- 85     }
- 86     else {
- 87       do {
- 88         if (i in this) {
- 89           rv = this[i++];
- 90           break;
- 91         }
- 92         // if array contains no values, no initial value to return
- 93         if (++i >= len) {
- 94           throw new TypeError();
- 95         }
- 96       }
- 97       while (true);
- 98     }
- 99     for (; i < len; i++) {
-100       if (i in this) {
-101         rv = fn.call(null, rv, this[i], i, this);
-102       }
-103     }
-104     return rv;
-105   };
-106 }
-107 
-108 /**
-109  * Invokes method on all items in a given array
-110  * @method invoke
-111  * @memberOf fabric.util.array
-112  * @param {Array} array Array to iterate over
-113  * @param {String} method Name of a method to invoke
-114  */
-115 function invoke(array, method) {
-116   var args = slice.call(arguments, 2), result = [ ];
-117   for (var i = 0, len = array.length; i < len; i++) {
-118     result[i] = args.length ? array[i][method].apply(array[i], args) : array[i][method].call(array[i]);
-119   }
-120   return result;
-121 }
-122 
-123 /**
-124  * Finds maximum value in array (not necessarily "first" one)
-125  * @method max
-126  * @memberOf fabric.util.array
-127  * @param {Array} array Array to iterate over
-128  * @param {String} byProperty
-129  */
-130 function max(array, byProperty) {
-131   var i = array.length - 1, 
-132       result = byProperty ? array[i][byProperty] : array[i];
-133   if (byProperty) {
-134     while (i--) {
-135       if (array[i][byProperty] >= result) {
-136         result = array[i][byProperty];
-137       }
-138     }
-139   }
-140   else {
-141     while (i--) {
-142       if (array[i] >= result) {
-143         result = array[i];
-144       }
-145     }
-146   }
-147   return result;
-148 }
-149 
-150 /**
-151  * Finds minimum value in array (not necessarily "first" one)
-152  * @method min
-153  * @memberOf fabric.util.array
-154  * @param {Array} array Array to iterate over
-155  * @param {String} byProperty
-156  */
-157 function min(array, byProperty) {
-158   var i = array.length - 1, 
-159       result = byProperty ? array[i][byProperty] : array[i];
-160       
-161   if (byProperty) {
-162     while (i--) {
-163       if (array[i][byProperty] < result) {
-164         result = array[i][byProperty];
-165       }
-166     }
-167   }
-168   else {
-169     while (i--) {
-170       if (array[i] < result) {
-171         result = array[i];
-172       }
-173     }
-174   }
-175   return result;
-176 }
-177 
-178 /** @namespace */
-179 fabric.util.array = {
-180   invoke: invoke,
-181   min: min,
-182   max: max
-183 };
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_lang_class.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_lang_class.js.html deleted file mode 100644 index 38221524..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_lang_class.js.html +++ /dev/null @@ -1,78 +0,0 @@ -
  1 (function() {
-  2   
-  3   var IS_DONTENUM_BUGGY = (function(){
-  4     for (var p in { toString: 1 }) {
-  5       if (p === 'toString') return false;
-  6     }
-  7     return true;
-  8   })();
-  9   
- 10   var addMethods;
- 11   if (IS_DONTENUM_BUGGY) {
- 12     /** @ignore */
- 13     addMethods = function(klass, source) {
- 14       if (source.toString !== Object.prototype.toString) {
- 15         klass.prototype.toString = source.toString;
- 16       }
- 17       if (source.valueOf !== Object.prototype.valueOf) {
- 18         klass.prototype.valueOf = source.valueOf;
- 19       }
- 20       for (var property in source) {
- 21         klass.prototype[property] = source[property];
- 22       }
- 23     };
- 24   }
- 25   else {
- 26     /** @ignore */
- 27     addMethods = function(klass, source) {
- 28       for (var property in source) {
- 29         klass.prototype[property] = source[property];
- 30       }
- 31     };
- 32   }
- 33 
- 34   function subclass() { };
- 35   
- 36   /**
- 37    * Helper for creation of "classes"
- 38    * @method createClass
- 39    * @memberOf fabric.util
- 40    */
- 41   function createClass() {
- 42     var parent = null, 
- 43         properties = slice.call(arguments, 0);
- 44     
- 45     if (typeof properties[0] === 'function') {
- 46       parent = properties.shift();
- 47     }
- 48     function klass() {
- 49       this.initialize.apply(this, arguments);
- 50     }
- 51     
- 52     klass.superclass = parent;
- 53     klass.subclasses = [ ];
- 54 
- 55     if (parent) {
- 56       subclass.prototype = parent.prototype;
- 57       klass.prototype = new subclass;
- 58       parent.subclasses.push(klass);
- 59     }
- 60     for (var i = 0, length = properties.length; i < length; i++) {
- 61       addMethods(klass, properties[i]);
- 62     }
- 63     if (!klass.prototype.initialize) {
- 64       klass.prototype.initialize = emptyFunction;
- 65     }
- 66     klass.prototype.constructor = klass;
- 67     return klass;
- 68   }
- 69   
- 70   fabric.util.createClass = createClass;
- 71 })();
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_lang_function.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_lang_function.js.html deleted file mode 100644 index b7120a67..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_lang_function.js.html +++ /dev/null @@ -1,17 +0,0 @@ -
  1 if (!Function.prototype.bind) {
-  2   Function.prototype.bind = function(thisArg) {
-  3     var fn = this, args = slice.call(arguments, 1);
-  4     return args.length
-  5       ? function() { return apply.call(fn, thisArg, args.concat(slice.call(arguments))); }
-  6       : function() { return apply.call(fn, thisArg, arguments) };
-  7   };
-  8 }
-  9 
- 10 
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_lang_object.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_lang_object.js.html deleted file mode 100644 index 0d40cfb2..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_lang_object.js.html +++ /dev/null @@ -1,37 +0,0 @@ -
  1 /**
-  2  * Copies all enumerable properties of one object to another
-  3  * @memberOf fabric.util.object
-  4  * @method extend
-  5  * @param {Object} destination Where to copy to
-  6  * @param {Object} source Where to copy from
-  7  */
-  8 function extend(destination, source) {  
-  9   // JScript DontEnum bug is not taken care of
- 10   for (var property in source) {
- 11     destination[property] = source[property];
- 12   }
- 13   return destination;
- 14 }
- 15 
- 16 /**
- 17  * Creates an empty object and copies all enumerable properties of another object to it
- 18  * @method clone
- 19  * @memberOf fabric.util.object
- 20  * @param {Object} object Object to clone
- 21  */
- 22 function clone(object) {
- 23   return extend({ }, object);
- 24 }
- 25 
- 26 /** @namespace fabric.util.object */
- 27 fabric.util.object = {
- 28   extend: extend,
- 29   clone: clone
- 30 };
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_lang_string.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_lang_string.js.html deleted file mode 100644 index 3beb32f3..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_lang_string.js.html +++ /dev/null @@ -1,47 +0,0 @@ -
  1 if (!String.prototype.trim) {
-  2   /**
-  3    * Trims a string (removing whitespace from the beginning and the end)
-  4    * @method trim
-  5    */
-  6   String.prototype.trim = function () {
-  7     // this trim is not fully ES3 or ES5 compliant, but it should cover most cases for now
-  8     return this.replace(/^[\s\xA0]+/, '').replace(/[\s\xA0]+$/, '');
-  9   };
- 10 }
- 11 
- 12 /**
- 13  * Camelizes a string
- 14  * @memberOf fabric.util.string
- 15  * @method camelize
- 16  * @param {String} string String to camelize
- 17  * @return {String} Camelized version of a string
- 18  */
- 19 function camelize(string) {
- 20   return string.replace(/-+(.)?/g, function(match, character) {
- 21     return character ? character.toUpperCase() : '';
- 22   });
- 23 }
- 24 
- 25 /**
- 26  * Capitalizes a string
- 27  * @memberOf fabric.util.string
- 28  * @method capitalize
- 29  * @param {String} string String to capitalize
- 30  * @return {String} Capitalized version of a string
- 31  */
- 32 function capitalize(string) {
- 33   return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase();
- 34 }
- 35 
- 36 /** @namespace */
- 37 fabric.util.string = {
- 38   camelize: camelize,
- 39   capitalize: capitalize
- 40 };
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_misc.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_misc.js.html deleted file mode 100644 index 7bf3e0f0..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/_Users_juriy_dev_github_fabric.js_src_util_misc.js.html +++ /dev/null @@ -1,84 +0,0 @@ -
  1 (function() {
-  2   
-  3   /**
-  4    * Removes value from an array.
-  5    * Presence of value (and its position in an array) is determined via `Array.prototype.indexOf`
-  6    * @static
-  7    * @memberOf fabric.util
-  8    * @method removeFromArray
-  9    * @param {Array} array
- 10    * @param {Any} value
- 11    * @return {Array} original array
- 12    */
- 13   function removeFromArray(array, value) {
- 14     var idx = array.indexOf(value);
- 15     if (idx !== -1) {
- 16       array.splice(idx, 1);
- 17     }
- 18     return array;
- 19   };
- 20   
- 21   /**
- 22    * Returns random number between 2 specified ones.
- 23    * @static
- 24    * @method getRandomInt
- 25    * @memberOf fabric.util
- 26    * @param {Number} min lower limit
- 27    * @param {Number} max upper limit
- 28    * @return {Number} random value (between min and max)
- 29    */
- 30   function getRandomInt(min, max) {
- 31     return Math.floor(Math.random() * (max - min + 1)) + min;
- 32   }
- 33   
- 34   var PiBy180 = Math.PI / 180;
- 35   
- 36   /**
- 37    * Transforms degrees to radians.
- 38    * @static
- 39    * @method degreesToRadians
- 40    * @memberOf fabric.util
- 41    * @param {Number} degrees value in degrees
- 42    * @return {Number} value in radians
- 43    */
- 44   function degreesToRadians(degrees) {
- 45     return degrees * PiBy180;
- 46   }
- 47   
- 48   /**
- 49    * A wrapper around Number#toFixed, which contrary to native method returns number, not string.
- 50    * @static
- 51    * @method toFixed
- 52    * @memberOf fabric.util
- 53    * @param {Number | String} number number to operate on
- 54    * @param {Number} fractionDigits number of fraction digits to "leave"
- 55    * @return {Number}
- 56    */
- 57    function toFixed(number, fractionDigits) {
- 58      return parseFloat(Number(number).toFixed(fractionDigits));
- 59    }
- 60    
- 61    /**
- 62     * Function which always returns `false`.
- 63     * @static
- 64     * @method falseFunction
- 65     * @memberOf fabric.util
- 66     * @return {Boolean}
- 67     */
- 68    function falseFunction() {
- 69      return false;
- 70    }
- 71   
- 72    fabric.util.removeFromArray = removeFromArray;
- 73    fabric.util.degreesToRadians = degreesToRadians;
- 74    fabric.util.toFixed = toFixed;
- 75    fabric.util.getRandomInt = getRandomInt;
- 76    fabric.util.falseFunction = falseFunction;
- 77 })();
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/test.js.html b/lib/jsdoc-toolkit/out/jsdoc/symbols/src/test.js.html deleted file mode 100644 index e54460ac..00000000 --- a/lib/jsdoc-toolkit/out/jsdoc/symbols/src/test.js.html +++ /dev/null @@ -1,11 +0,0 @@ -
  1 
-  2 function Point(x, y) {
-  3   
-  4 }
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/templates/codeview/allclasses.tmpl b/lib/jsdoc-toolkit/templates/codeview/allclasses.tmpl deleted file mode 100755 index 6974a8f3..00000000 --- a/lib/jsdoc-toolkit/templates/codeview/allclasses.tmpl +++ /dev/null @@ -1,15 +0,0 @@ - - -

Classes

- -
    - -
  • {! - var classLink = new Link().toClass(thisClass.alias) + ""; - output += wordwrapNamespace(classLink); - !}
  • -
    -
diff --git a/lib/jsdoc-toolkit/templates/codeview/allfiles.tmpl b/lib/jsdoc-toolkit/templates/codeview/allfiles.tmpl deleted file mode 100755 index 57bfcbac..00000000 --- a/lib/jsdoc-toolkit/templates/codeview/allfiles.tmpl +++ /dev/null @@ -1,76 +0,0 @@ - - - - - {! Link.base = ""; /* all generated links will be relative to this */ !} - JsDoc Reference - File Index - - - - - - - - - - - - - - - {+include("static/header.html")+} - -
- - -
- ©{+JSDOC.opt.D.copyright+}
- Generated by JsDoc Toolkit {+JSDOC.VERSION+} on {+new Date()+}
- HTML template: Codeview 1.1.1 -
-
-
- -
-
-

File Index

- -
    - -
  • -

    {+new Link().toSrc(item.alias).withText(item.name)+}

    - - {+resolveLinks(item.desc)+} - -
    - -
    Author:
    -
    {+item.author+}
    -
    - - -
    Version:
    -
    {+item.version+}
    -
    - - {! var locations = item.comment.getTag('location').map(function($){return $.toString().replace(/(^\$ ?| ?\$$)/g, '').replace(/^HeadURL: https:/g, 'http:');}) !} - -
    Location:
    - -
    {+location+}
    -
    -
    -
    -
  • -
    -
-
-
- - - - \ No newline at end of file diff --git a/lib/jsdoc-toolkit/templates/codeview/class.tmpl b/lib/jsdoc-toolkit/templates/codeview/class.tmpl deleted file mode 100755 index c3b29251..00000000 --- a/lib/jsdoc-toolkit/templates/codeview/class.tmpl +++ /dev/null @@ -1,713 +0,0 @@ - - - - - - {! Link.base = "../"; /* all generated links will be relative to this */ !} - JsDoc Reference - {+data.alias+} - - - - - - - - - - - - - - {+include("static/header.html")+} - -
- - -
- ©{+JSDOC.opt.D.copyright+}
- Generated by JsDoc Toolkit {+JSDOC.VERSION+} on {+new Date()+}
- HTML template: Codeview 1.1.1 -
-
-
- -
-
-

- {! - var classType = ""; - - if (data.isBuiltin()) { - classType += "Built-In "; - } - - if (data.isNamespace) { - if (data.is('FUNCTION')) { - classType += "Function "; - } - classType += "Namespace "; - } else { - classType += "Class "; - } - !} - {+classType+}{! - var dataAlias = data.alias + ""; - dataAlias = dataAlias.replace(/\./g, " ."); - output += dataAlias; - !} -

- -

- {+resolveLinks(data.classDesc)+} -

- - - -
    - -
  • Version {+ data.version +}
  • -
    - - {# isn't defined in any file #} -
  • Defined in: {+new Link().toSrc(data.srcFile)+}
  • -
    - -
  • Extends - {+ - data.augments - .sort() - .map( - function($) { return new Link().toSymbol($); } - ) - .join(", ") - +}
  • -
    -
-
- - -
- - - - - - - - - - - - - - -
{+classType+}Summary
Constructor AttributesConstructor Name and Description
{! - if (data.isPrivate) output += "<private> "; - if (data.isInner) output += "<inner> "; - !}  -
- {+ new Link().toSymbol(data.alias).inner('constructor')+}{+ makeSignature(data.params) +} -
-
{+resolveLinks(summarize(data.desc))+}
-
-
-
- - - {! var ownProperties = data.properties.filter(function($){return $.memberOf == data.alias && !$.isNamespace}).sort(makeSortby("name")); !} - -
- - - - - - - - - - - - - - - - - - -
Field Summary
Field AttributesField Name and Description
{! - if (member.isPrivate) output += "<private> "; - if (member.isInner) output += "<inner> "; - if (member.isStatic) output += "<static> "; - if (member.isConstant) output += "<constant> "; - !}  -
- {+member.memberOf+}.{+new Link().toSymbol(member.alias).withText(member.name)+} -
-
{+resolveLinks(summarize(member.desc))+}
-
-
-
- - -
- {! - var borrowedMembers = data.properties.filter(function($) {return $.memberOf != data.alias}); - - var contributers = []; - borrowedMembers.map(function($) {if (contributers.indexOf($.memberOf) < 0) contributers.push($.memberOf)}); - for (var i = 0, l = contributers.length; i < l; i++) { - output += - "
Fields borrowed from class "+new Link().toSymbol(contributers[i])+":
" - + - "
" + - borrowedMembers - .filter( - function($) { return $.memberOf == contributers[i] } - ) - .sort(makeSortby("name")) - .map( - function($) { return new Link().toSymbol($.alias).withText($.name) } - ) - .join(", ") - + - "
"; - } - !} -
-
-
- - - - {! var ownMethods = data.methods.filter(function($){return $.memberOf == data.alias && !$.isNamespace}).sort(makeSortby("name")); !} - -
- - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
{! - if (member.isPrivate) output += "<private> "; - if (member.isInner) output += "<inner> "; - if (member.isStatic) output += "<static> "; - !}  -
{+member.memberOf+}.{+new Link().toSymbol(member.alias).withText(member.name.replace(/\^\d+$/, ''))+}{+makeSignature(member.params)+} -
-
{+resolveLinks(summarize(member.desc))+}
-
-
-
- - -
- {! - var borrowedMembers = data.methods.filter(function($) {return $.memberOf != data.alias}); - var contributers = []; - borrowedMembers.map(function($) {if (contributers.indexOf($.memberOf) < 0) contributers.push($.memberOf)}); - for (var i = 0, l = contributers.length; i < l; i++) { - output += - "
Methods borrowed from class "+new Link().toSymbol(contributers[i])+":
" - + - "
" + - borrowedMembers - .filter( - function($) { return $.memberOf == contributers[i] } - ) - .sort(makeSortby("name")) - .map( - function($) { return new Link().toSymbol($.alias).withText($.name) } - ) - .join(", ") - + - "
"; - } - !} -
-
-
- - - - {! var ownEvents = data.events.filter(function($){return $.memberOf == data.alias && !$.isNamespace}).sort(makeSortby("name")); !} - -
- - - - - - - - - - - - - - - - - - -
Event Summary
Event AttributesEvent Name and Description
{! - if (member.isPrivate) output += "<private> "; - if (member.isInner) output += "<inner> "; - if (member.isStatic) output += "<static> "; - !}  -
{+member.memberOf+}.{+new Link().toSymbol(member.alias).withText(member.name)+}{+makeSignature(member.params)+} -
-
{+resolveLinks(summarize(member.desc))+}
-
-
-
- - -
- {! - var borrowedMembers = data.events.filter(function($) {return $.memberOf != data.alias}); - var contributers = []; - borrowedMembers.map(function($) {if (contributers.indexOf($.memberOf) < 0) contributers.push($.memberOf)}); - for (var i = 0, l = contributers.length; i < l; i++) { - output += - "
Events borrowed from class "+new Link().toSymbol(contributers[i])+":
" - + - "
" + - borrowedMembers - .filter( - function($) { return $.memberOf == contributers[i] } - ) - .sort(makeSortby("name")) - .map( - function($) { return new Link().toSymbol($.alias).withText($.name) } - ) - .join(", ") - + - "
"; - } - - !} -
-
-
- - - -
-
- - -
- {+classType+}Detail -
- -
{! - if (data.isPrivate) output += "<private> "; - if (data.isInner) output += "<inner> "; - !} - {+ data.alias +}{+ makeSignature(data.params) +} -
- -
- {+resolveLinks(data.desc)+} -
Author: {+data.author+}.
-
- - - -
{+example+}
-
-
- - -
-
Parameters:
- -
- {+((item.type)?""+("{"+(new Link().toSymbol(item.type)+"} ")) : "")+} {+item.name+} - Optional, Default: {+item.defaultValue+} -
-
{+resolveLinks(item.desc)+}
-
-
-
- - -
- -
- {+resolveLinks(data.deprecated)+} -
-
- - -
Since:
-
{+ data.since +}
-
- - -
Throws:
- -
- {+((item.type)?"{"+(new Link().toSymbol(item.type))+"} " : "")+} {+item.name+} -
-
{+resolveLinks(item.desc)+}
-
-
- - -
Returns:
- -
{+((item.type)?"{"+(new Link().toSymbol(item.type))+"} " : "")+}{+resolveLinks(item.desc)+}
-
-
- - -
Requires:
- -
{+ resolveLinks(item) +}
-
-
- - -
See:
- -
{+ new Link().toSymbol(item) +}
-
-
-
-
-
-
-
- - - -
-
- -
- Field Detail -
- - - - -
- - {! - if (member.isPrivate) output += "<private> "; - if (member.isInner) output += "<inner> "; - if (member.isStatic) output += "<static> "; - if (member.isConstant) output += "<constant> "; - !} - - - {{+new Link().toSymbol(member.type)+}} - - {+member.memberOf+}.{+member.name+} -
- -
- {+resolveLinks(member.desc)+} - -
- Defined in: {+new Link().toSrc(member.srcFile)+}. -
- -
Author: {+member.author+}.
-
- - - -
{+example+}
-
-
- - -
- - -
Deprecated:
-
- {+ resolveLinks(member.deprecated) +} -
-
- -
Since:
-
{+ member.since +}
-
- -
See:
- -
{+ new Link().toSymbol(item) +}
-
-
- -
Default Value:
-
- {+resolveLinks(member.defaultValue)+} -
-
-
-
- -
-
-
-
-
- - - -
-
-
- Method Detail -
- - - - -
- - {! - if (member.isPrivate) output += "<private> "; - if (member.isInner) output += "<inner> "; - if (member.isStatic) output += "<static> "; - !} - - - {{+new Link().toSymbol(member.type)+}} - - {+member.memberOf+}.{+member.name.replace(/\^\d+$/, '')+}{+makeSignature(member.params)+} -
- -
- {+resolveLinks(member.desc)+} - - -
- Defined in: {+new Link().toSrc(member.srcFile)+}. -
- -
Author: {+member.author+}.
-
- - - -
{+example+}
-
-
- - -
-
Parameters:
- -
- {+((item.type)?"{"+(new Link().toSymbol(item.type))+"} " : "")+}{+item.name+} - Optional, Default: {+item.defaultValue+} -
-
{+resolveLinks(item.desc)+}
-
-
-
- - -
- - -
Deprecated:
-
- {+ resolveLinks(member.deprecated) +} -
-
- - -
Since:
-
{+ member.since +}
-
- - -
Throws:
- -
- {+((item.type)?"{"+(new Link().toSymbol(item.type))+"} " : "")+} {+item.name+} -
-
{+resolveLinks(item.desc)+}
-
-
- - -
Returns:
- -
{+((item.type)?"{"+(new Link().toSymbol(item.type))+"} " : "")+}{+resolveLinks(item.desc)+}
-
-
- - -
Requires:
- -
{+ resolveLinks(item) +}
-
-
- - -
See:
- -
{+ new Link().toSymbol(item) +}
-
-
- -
-
- -
-
-
-
-
- - - -
-
-
- Event Detail -
- - - - -
- - {! - if (member.isPrivate) output += "<private> "; - if (member.isInner) output += "<inner> "; - if (member.isStatic) output += "<static> "; - !} - - - {{+new Link().toSymbol(member.type)+}} - - {+member.memberOf+}.{+member.name+}{+makeSignature(member.params)+} -
- -
- {+resolveLinks(member.desc)+} - - -
- Defined in: {+new Link().toSrc(member.srcFile)+}. -
- -
Author: {+member.author+}.
-
- - - -
{+example+}
-
-
- - -
-
Parameters:
- -
- {+((item.type)?"{"+(new Link().toSymbol(item.type))+"} " : "")+}{+item.name+} - Optional, Default: {+item.defaultValue+} -
-
{+ resolveLinks(item.desc) +}
-
-
-
- - -
- -
Deprecated:
-
{+ resolveLinks(member.deprecated) +}
-
- - -
Since:
-
{+ member.since +}
-
- - -
Throws:
- -
- {+((item.type)?"{"+(new Link().toSymbol(item.type))+"} " : "")+} {+item.name+} -
-
{+ resolveLinks(item.desc) +}
-
-
- - -
Returns:
- -
{+((item.type)?"{"+(new Link().toSymbol(item.type))+"} " : "")+}{+resolveLinks(item.desc)+}
-
-
- - -
Requires:
- -
{+ resolveLinks(item) +}
-
-
- - -
See:
- -
{+ new Link().toSymbol(item) +}
-
-
-
-
- -
-
-
-
-
-
-
- - - - diff --git a/lib/jsdoc-toolkit/templates/codeview/css/all.css b/lib/jsdoc-toolkit/templates/codeview/css/all.css deleted file mode 100755 index bc6cb796..00000000 --- a/lib/jsdoc-toolkit/templates/codeview/css/all.css +++ /dev/null @@ -1,340 +0,0 @@ -/* - * TABLE OF CONTENTS: - * - Browser reset - * - HTML elements - * - JsDoc styling - */ - - - - - - -/* - * BEGIN BROWSER RESET - */ - -body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,p,pre,form,fieldset,input,textarea,p,blockquote,th,td { - margin:0; - padding:0 -} -html { - height:100%; - overflow:-moz-scrollbars-vertical; - overflow-x:auto -} -table { - border:0; - border-collapse:collapse; - border-spacing:0 -} -fieldset,img { - border:0 -} -address,caption,cite,code,dfn,em,strong,th,var { - font-style:normal; - font-weight:normal -} -em,cite { - font-style:italic -} -strong { - font-weight:bold -} -ol,ul { - list-style:none -} -caption,th { - text-align:left -} -h1,h2,h3,h4,h5,h6 { - font-size:100%; - font-weight:normal; - margin:0; - padding:0 -} -q:before,q:after { - content:'' -} -abbr,acronym { - border:0 -} - -/* - * END BROWSER RESET - */ - - - - - - -/* - * HTML ELEMENTS - */ - -@font-face { - font-family: 'M1m'; - src: url('fonts/mplus-1m-regular-webfont.eot'); - src: local('☺'), url('fonts/mplus-1m-regular-webfont.woff') format('woff'), url('fonts/mplus-1m-regular-webfont.ttf') format('truetype'), url('fonts/mplus-1m-regular-webfont.svg#webfontVd14f4NN') format('svg'); - font-weight: normal; - font-style: normal; -} - -@font-face { - font-family: 'M1m'; - src: url('fonts/mplus-1m-bold-webfont.eot'); - src: local('☺'), url('fonts/mplus-1m-bold-webfont.woff') format('woff'), url('fonts/mplus-1m-bold-webfont.ttf') format('truetype'), url('fonts/mplus-1m-bold-webfont.svg#webfontIjI5mZqE') format('svg'); - font-weight: bold; - font-style: normal; -} - - - -* { - line-height: 1.4em; -} - -html { - font-size: 100%; -} - -body { - font-size: 0.75em; - padding: 15px 0; - background: #eee; - background-image: -moz-linear-gradient(left, #dddddd, #f9f9f9) fixed; - background-image: -webkit-gradient(linear,left bottom,right bottom,color-stop(0, #dddddd),color-stop(1, #f9f9f9)) fixed; - } - -body, -input, -select, -textarea { - color: #000; - font-family: Arial, Geneva, sans-serif; -} - -a:link, -a:hover, -a:active, -a:visited { - color: #19199e; -} -a:hover, -a:focus { - color: #00f; - text-decoration: none; -} - -p { - margin: 0 0 1.5em 0; -} - -/* - * END HTML ELEMENTS - */ - - - -/* - * BEGIN HACK - */ - -div.containerMain:after, -div.safeBox:after { - content:""; - display:block; - height:0; - clear:both; -} - -/* - * END HACK - */ - - - -/* - * BEGIN JSDOC - */ - -/* Start menu */ -div.index *.heading1 { - margin-bottom: 0.5em; - border-bottom: 1px solid #999999; - font-family: M1m, Arial, sans-serif; - font-size: 1.6em; - letter-spacing: 1px; - line-height: 1.3em; -} - -div.index div.menu { - background-color: #FFFFFF; -} -*+html div.index div.menu { - background-color: #FFFFFF; -} -* html div.index div.menu { - background-color: #FFFFFF; -} - -div.index div.menu div { - text-align: left; -} - -div.index div.menu a { - text-decoration: none; -} -div.index div.menu a:hover { - text-decoration: underline; -} - -div.index ul.classList a { - display: block; - padding: 4px 0 2px 20px; - text-indent: -20px; -} - -div.index div.fineprint { - color: #777; - font-size: 0.9em; -} -div.index div.fineprint a { - color: #777; -} -/* End menu */ - - - -/* Start content */ -div.content *.classTitle { - font-family: M1m, sans-serif; - font-size: 2.5em; - letter-spacing: 2px; - text-shadow: 1px 1px 1px #999999; -} - -div.content *.classTitle span { - font-weight: bold; -} - -div.content p.summary { - font-size: 1.25em; -} - -div.content ul *.classname a, -div.content ul *.filename a { - font-family: Consolas, "Courier New", Courier, monospace; - text-decoration: none; - font-weight: bold; -} -div.content ul *.classname a:hover, -div.content ul *.filename a:hover { - text-decoration: underline; -} - -div.content div.props { - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - border-radius: 5px; - background: #fff; - background: -moz-linear-gradient(top, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.2)); /* FF3.6 */ - background: -webkit-gradient(linear,left top,left bottom,color-stop(0, rgba(255, 255, 255, 0.7)),color-stop(1, rgba(255, 255, 255, 0.2))); - -moz-box-shadow: 0px 0px 10px #ccc; - -webkit-box-shadow: 0px 0px 5px #bbb; - box-shadow: 0px 0px 5px #bbb; -} - -div.content div.props div.sectionTitle { - font-family: M1m, sans-serif; - font-size: 1.6em; - letter-spacing: 1px; -} - - - -table.summaryTable caption { - font-family: M1m, sans-serif; - font-size: 1.6em; - letter-spacing: 1px; -} - -table.summaryTable td, -table.summaryTable th { - vertical-align: top; -} -table.summaryTable tr:last-child td { - padding-bottom: 0; -} - -table.summaryTable th { - font-weight: bold; -} - -table.summaryTable td.attributes { - font-family: Consolas, "Courier New", Courier, monospace; - color: #666; -} - -table.summaryTable td.nameDescription div.fixedFont { - font-weight: bold; -} - -table.summaryTable div.description { - color: #333; -} - - - -dl.detailList dt { - font-weight: bold; -} - - - -.fixedFont { - font-family: Consolas, "Courier New", Courier, monospace; -} - -.fixedFont.heading { - font-size: 1.25em; - line-height: 1.1em -} - -.fixedFont.heading + .description { - font-size: 1.2em; -} - -.fixedFont.heading .light, -.fixedFont.heading .lighter { - font-weight: bold; -} - -pre.code { - overflow: auto; - font-family: Consolas, "Courier New", Courier, monospace; - background: #eee; -} -/* Start content */ - - - -/* Start general styles */ -.light { - color: #666; -} - -.lighter { - color: #999; -} - -span.break { - font-size: 1px; - line-height: 1px; -} -/* End general styles */ - -/* - * END JSDOC - */ \ No newline at end of file diff --git a/lib/jsdoc-toolkit/templates/codeview/css/fonts/mplus-1m-bold-webfont.eot b/lib/jsdoc-toolkit/templates/codeview/css/fonts/mplus-1m-bold-webfont.eot deleted file mode 100755 index 6c64f8d7..00000000 Binary files a/lib/jsdoc-toolkit/templates/codeview/css/fonts/mplus-1m-bold-webfont.eot and /dev/null differ diff --git a/lib/jsdoc-toolkit/templates/codeview/css/fonts/mplus-1m-bold-webfont.svg b/lib/jsdoc-toolkit/templates/codeview/css/fonts/mplus-1m-bold-webfont.svg deleted file mode 100755 index 51295128..00000000 --- a/lib/jsdoc-toolkit/templates/codeview/css/fonts/mplus-1m-bold-webfont.svg +++ /dev/null @@ -1,134 +0,0 @@ - - - - -This is a custom SVG webfont generated by Font Squirrel. -Foundry URL : http://mplus-fonts.sourceforge.jp - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/lib/jsdoc-toolkit/templates/codeview/css/fonts/mplus-1m-bold-webfont.ttf b/lib/jsdoc-toolkit/templates/codeview/css/fonts/mplus-1m-bold-webfont.ttf deleted file mode 100755 index 0cf54cbb..00000000 Binary files a/lib/jsdoc-toolkit/templates/codeview/css/fonts/mplus-1m-bold-webfont.ttf and /dev/null differ diff --git a/lib/jsdoc-toolkit/templates/codeview/css/fonts/mplus-1m-bold-webfont.woff b/lib/jsdoc-toolkit/templates/codeview/css/fonts/mplus-1m-bold-webfont.woff deleted file mode 100755 index f90475d8..00000000 Binary files a/lib/jsdoc-toolkit/templates/codeview/css/fonts/mplus-1m-bold-webfont.woff and /dev/null differ diff --git a/lib/jsdoc-toolkit/templates/codeview/css/fonts/mplus-1m-regular-webfont.eot b/lib/jsdoc-toolkit/templates/codeview/css/fonts/mplus-1m-regular-webfont.eot deleted file mode 100755 index a53f8b54..00000000 Binary files a/lib/jsdoc-toolkit/templates/codeview/css/fonts/mplus-1m-regular-webfont.eot and /dev/null differ diff --git a/lib/jsdoc-toolkit/templates/codeview/css/fonts/mplus-1m-regular-webfont.svg b/lib/jsdoc-toolkit/templates/codeview/css/fonts/mplus-1m-regular-webfont.svg deleted file mode 100755 index 3c835a31..00000000 --- a/lib/jsdoc-toolkit/templates/codeview/css/fonts/mplus-1m-regular-webfont.svg +++ /dev/null @@ -1,134 +0,0 @@ - - - - -This is a custom SVG webfont generated by Font Squirrel. -Foundry URL : http://mplus-fonts.sourceforge.jp - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/lib/jsdoc-toolkit/templates/codeview/css/fonts/mplus-1m-regular-webfont.ttf b/lib/jsdoc-toolkit/templates/codeview/css/fonts/mplus-1m-regular-webfont.ttf deleted file mode 100755 index 684abfd1..00000000 Binary files a/lib/jsdoc-toolkit/templates/codeview/css/fonts/mplus-1m-regular-webfont.ttf and /dev/null differ diff --git a/lib/jsdoc-toolkit/templates/codeview/css/fonts/mplus-1m-regular-webfont.woff b/lib/jsdoc-toolkit/templates/codeview/css/fonts/mplus-1m-regular-webfont.woff deleted file mode 100755 index 49585d82..00000000 Binary files a/lib/jsdoc-toolkit/templates/codeview/css/fonts/mplus-1m-regular-webfont.woff and /dev/null differ diff --git a/lib/jsdoc-toolkit/templates/codeview/css/fonts/stylesheet.css b/lib/jsdoc-toolkit/templates/codeview/css/fonts/stylesheet.css deleted file mode 100755 index 188d8474..00000000 --- a/lib/jsdoc-toolkit/templates/codeview/css/fonts/stylesheet.css +++ /dev/null @@ -1,44 +0,0 @@ -/* Generated by Font Squirrel (http://www.fontsquirrel.com) on September 11, 2010 04:44:41 PM America/New_York */ - - - -@font-face { - font-family: 'M1mthin'; - src: url('mplus-1m-thin-webfont.eot'); - src: local('☺'), url('mplus-1m-thin-webfont.woff') format('woff'), url('mplus-1m-thin-webfont.ttf') format('truetype'), url('mplus-1m-thin-webfont.svg#webfont8E89OCqX') format('svg'); - font-weight: normal; - font-style: normal; -} - -@font-face { - font-family: 'M1mlight'; - src: url('mplus-1m-light-webfont.eot'); - src: local('☺'), url('mplus-1m-light-webfont.woff') format('woff'), url('mplus-1m-light-webfont.ttf') format('truetype'), url('mplus-1m-light-webfont.svg#webfontupkFZh1U') format('svg'); - font-weight: normal; - font-style: normal; -} - -@font-face { - font-family: 'M1mregular'; - src: url('mplus-1m-regular-webfont.eot'); - src: local('☺'), url('mplus-1m-regular-webfont.woff') format('woff'), url('mplus-1m-regular-webfont.ttf') format('truetype'), url('mplus-1m-regular-webfont.svg#webfontVd14f4NN') format('svg'); - font-weight: normal; - font-style: normal; -} - -@font-face { - font-family: 'M1mmedium'; - src: url('mplus-1m-medium-webfont.eot'); - src: local('☺'), url('mplus-1m-medium-webfont.woff') format('woff'), url('mplus-1m-medium-webfont.ttf') format('truetype'), url('mplus-1m-medium-webfont.svg#webfontdB2YMuVi') format('svg'); - font-weight: normal; - font-style: normal; -} - -@font-face { - font-family: 'M1mbold'; - src: url('mplus-1m-bold-webfont.eot'); - src: local('☺'), url('mplus-1m-bold-webfont.woff') format('woff'), url('mplus-1m-bold-webfont.ttf') format('truetype'), url('mplus-1m-bold-webfont.svg#webfontIjI5mZqE') format('svg'); - font-weight: normal; - font-style: normal; -} - diff --git a/lib/jsdoc-toolkit/templates/codeview/css/handheld.css b/lib/jsdoc-toolkit/templates/codeview/css/handheld.css deleted file mode 100755 index 529bebb8..00000000 --- a/lib/jsdoc-toolkit/templates/codeview/css/handheld.css +++ /dev/null @@ -1,207 +0,0 @@ -/* - * TABLE OF CONTENTS: - * - Browser reset - * - HTML elements - * - JsDoc styling - * - Media query check - */ - - - - - - -/* - * HTML ELEMENTS - */ - -body { - padding: 1% 4% 1% 4%; -} - -/* - * HTML ELEMENTS - */ - - - - - -/* - * BEGIN JSDOC - */ - -/* Start menu */ -div.index div.menu { - position: fixed; - top: 0; - right: 0; - -moz-border-radius-bottomleft: 15px; - -webkit-border-bottom-left-radius: 15px; - -border-bottom-left-radius: 15px; - padding: 4px 5px 8px 10px; - -moz-box-shadow: 0px 0px 10px #c4c4c4; - -webkit-box-shadow: 0px 0px 10px #c4c4c4; - box-shadow: 0px 0px 10px #c4c4c4; - background-color: rgba(255, 255, 255, 0.9); -} - -div.index div.indexLinks a { - float: right; - clear: both; - font-size: 1.1em; -} - -div.index *.heading1 { - display:none; -} - -div.index ul.classList { - display:none; -} - -div.index div.fineprint { - display:none; -} - -div.indexStatic { - display: none; -} -/* End menu */ - - - -/* Start content */ -div.content *.classTitle { - margin-right: 60px; - margin-bottom: 0.8em; - font-size: 2em -} - -div.content p.description.summary { - margin-bottom: 0.2em; -} - -div.content div.props { - margin: 1.5em -2% 0 -2%; - padding: 2%; -} - -table.summaryTable { - position: relative; - left: -10px; - width: 100%; - border-collapse: collapse; - box-sizing: content-box; - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; - -ms-box-sizing: content-box; - -o-box-sizing: content-box; - -icab-box-sizing: content-box; - -khtml-box-sizing: content-box; -} - -table.summaryTable caption { - padding: 0 10px 10px 10px; -} - -table.summaryTable td, -table.summaryTable th { - padding: 0px 10px 10px 10px; -} -table.summaryTable tr:last-child td { - padding-bottom: 0; -} - -table.summaryTable td.attributes { - width: 35%; -} - -table.summaryTable td.nameDescription { - width: 65% -} - - - -dl.detailList { - margin-top: 0.5em; -} - -dl.detailList.nomargin + dl.detailList.nomargin { - margin-top: 0; -} - -dl.detailList dt { - display: inline; - margin-right: 5px; -} - -dl.detailList dt:before { - display: block; - content: ""; -} - -dl.detailList dd { - display: inline; -} - -dl.detailList.params dt { - display: block; -} -dl.detailList.params dd { - display: block; - padding-left: 2em; - padding-bottom: 0.4em; -} - - - - -ul.fileList li { - margin-bottom: 1.5em; -} - - - -.fixedFont.heading { - margin-bottom: 0.5em; -} - -pre.code { - margin: 10px 0 10px 0; - padding: 10px; - border: 1px solid #ccc; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - border-radius: 2px; -} -/* End content */ - -/* - * END JSDOC - */ - - - - - - - -/* - * START MEDIA QUERY CHECK - */ - -.cssLoadCheck { - position: absolute; - top: -99999px; - left: -99999px; - border: 0; - width: 100px; - padding: 0; - overflow: hidden; -} - -/* - * END MEDIA QUERY CHECK - */ - diff --git a/lib/jsdoc-toolkit/templates/codeview/css/screen.css b/lib/jsdoc-toolkit/templates/codeview/css/screen.css deleted file mode 100755 index 786765a2..00000000 --- a/lib/jsdoc-toolkit/templates/codeview/css/screen.css +++ /dev/null @@ -1,280 +0,0 @@ -/* - * TABLE OF CONTENTS: - * - JsDoc styling - * - Media query check - */ - - - - - - -/* - * BEGIN JSDOC - */ - -/* Start menu */ -div.index { - position: fixed; - top: 0; - bottom: 0; - float: left; - width: 30%; - min-width: 100px; - max-width: 300px; - padding: 0 0 10px 0; - overflow: auto; -} - -div.index *.heading1 { - padding: 8px 0 0.4em 0; -} - -div.index div.menu { - margin: 0 15px 0 -15px; - -moz-border-radius-bottomright: 15px; - -webkit-border-bottom-right-radius: 15px; - -border-bottom-right-radius: 15px; - padding: 15px 15px 15px 30px; - -moz-box-shadow: 0px 0px 10px #c4c4c4; - -webkit-box-shadow: 0px 0px 10px #c4c4c4; - box-shadow: 0px 0px 10px #c4c4c4; - background-color: rgba(255, 255, 255, 0.5); -} - -div.index div.indexLinks { - margin-top: 13px; - position: absolute; - right: 30px; -} - -div.index div.indexLinks a { - color: #999999; - text-transform: lowercase; -} - -div.index div.indexLinks a:first-child { - margin-right: 3px; - border-right: 1px solid #999999; - padding-right: 5px; -} - -div.index ul.classList a { - line-height: 1.1em; - font-family: Consolas, "Courier New", Courier, monospace; -} - -div.index ul.classList a + a { - margin-left: 0.5em; -} - -div.index div.fineprint { - margin: 1em 0 0 15px; - color: #777; - font-size: 0.9em; -} - -div.index div.fineprint a { - color: #777; -} - -div.indexStatic { - position: static; - min-height: 1em; -} -/* End menu */ - - -/* Start content */ -div.content { - float: left; - width: 70%; - min-width: 300px; - max-width: 600px; -} -div.innerContent { - padding: 0 0 0 2.5em; -} - -div.content ul, -div.content ol { - margin-bottom: 3em; -} - -div.content *.classTitle { - position: relative; - left: -10px; - margin: -30px 0 0.5em 0; - -moz-border-radius: 15px; - -webkit-border-radius: 15px; - border-radius: 15px; - padding: 25px 15px 15px 15px; - background-color: #FFFFFF; - background-color: rgba(255, 255, 255, 0.5); - -moz-box-shadow: 0px 0px 10px #c4c4c4; - -webkit-box-shadow: 0px 0px 10px #c4c4c4; - box-shadow: 0px 0px 10px #c4c4c4; -} - -div.content p.summary { - margin-bottom: 0.5em; -} - -div.content ul.summary { - margin-bottom: 1.5em; -} - -div.content ul *.classname a, -div.content ul *.filename a { - font-family: Consolas, "Courier New", Courier, monospace; - text-decoration: none; - font-weight: bold; -} -div.content ul *.classname a:hover, -div.content ul *.filename a:hover { - text-decoration: underline; -} - -div.content div.props { - position: relative; - left: -10px; - margin-bottom: 2.5em; - padding: 10px 15px 15px 15px; - overflow: hidden; -} - -div.content div.props div.sectionTitle { - padding-bottom: 10px; -} - -div.content div.hr { - margin: 0 10px 0 0; - height: 4em; -} - - - -table.summaryTable { - position: relative; - left: -10px; - width: 100%; - border-collapse: collapse; - box-sizing: content-box; - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; - -ms-box-sizing: content-box; - -o-box-sizing: content-box; - -icab-box-sizing: content-box; - -khtml-box-sizing: content-box; -} - -table.summaryTable caption { - padding: 0 10px 10px 10px; -} - -table.summaryTable td, -table.summaryTable th { - padding: 0px 10px 10px 10px; -} -table.summaryTable tr:last-child td { - padding-bottom: 0; -} - -table.summaryTable td.attributes { - width: 35%; -} - -table.summaryTable td.nameDescription { - width: 65% -} - - - -dl.detailList { - margin-top: 0.5em; -} - -dl.detailList.nomargin + dl.detailList.nomargin { - margin-top: 0; -} - -dl.detailList dt { - display: inline; - margin-right: 5px; -} - -dl.detailList dt:before { - display: block; - content: ""; -} - -dl.detailList dd { - display: inline; -} - -dl.detailList.params dt { - display: block; -} -dl.detailList.params dd { - display: block; - padding-left: 2em; - padding-bottom: 0.4em; -} - - - - -ul.fileList li { - margin-bottom: 1.5em; -} - - - -.fixedFont.heading { - margin-bottom: 0.5em; -} - -pre.code { - margin: 10px 0 10px 0; - padding: 10px; - border: 1px solid #ccc; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - border-radius: 2px; -} -/* End content */ - -.clear { - clear: both; - width: 100%; - min-height: 0; -} - -/* - * END JSDOC - */ - - - - - - - -/* - * START MEDIA QUERY CHECK - */ - -.cssLoadCheck { - position: absolute; - top: -99999px; - left: -99999px; - border: 0; - width: 100px; - padding: 0; - overflow: hidden; -} - -/* - * END MEDIA QUERY CHECK - */ - diff --git a/lib/jsdoc-toolkit/templates/codeview/index.tmpl b/lib/jsdoc-toolkit/templates/codeview/index.tmpl deleted file mode 100755 index d0caa2a5..00000000 --- a/lib/jsdoc-toolkit/templates/codeview/index.tmpl +++ /dev/null @@ -1,54 +0,0 @@ - - - - - JsDoc Reference - Index - - - - - - - - - - - - - - - {+include("static/header.html")+} - -
- - -
- ©{+JSDOC.opt.D.copyright+}
- Generated by JsDoc Toolkit {+JSDOC.VERSION+} on {+new Date()+}
- HTML template: Codeview 1.1.1 -
-
-
- -
-
-

Class Index

- -
    - -
  • -

    {+(new Link().toSymbol(thisClass.alias))+}

    -

    {+resolveLinks(summarize(thisClass.classDesc))+}

    -
  • -
    -
-
-
- - - - \ No newline at end of file diff --git a/lib/jsdoc-toolkit/templates/codeview/javascript/wbos.csstools.mediaqueryfallback.js b/lib/jsdoc-toolkit/templates/codeview/javascript/wbos.csstools.mediaqueryfallback.js deleted file mode 100755 index 6caf5bf5..00000000 --- a/lib/jsdoc-toolkit/templates/codeview/javascript/wbos.csstools.mediaqueryfallback.js +++ /dev/null @@ -1,185 +0,0 @@ -/** - * @fileOverview Media Query FallBack - * @author Wouter Bos (www.thebrightlines.com) - * @since 1.0 - 2010-09-10 - * @version 1.0 - 2010-09-10 - */ - - - - - - -if (typeof(wbos) == "undefined") { - /** - * @namespace wbos = Wouter Bos (www.thebrightlines.com) - */ - wbos = {} -} -if (typeof(wbos.CssTools) == "undefined") { - /** - * @namespace Namespace for CSS-related functionality - */ - wbos.CssTools = {} -} - - - - -/** - * @namespace Fallback for CSS advanced media query - * @class - * @since 1.0 - 2010-09-10 - * @version 1.0 - 2010-09-10 - */ -wbos.CssTools.MediaQueryFallBack = ( function() { - var config = { - cssScreen: "/css/screen.css", - cssHandheld: "/css/handheld.css", - mobileMaxWidth: 660, - testDivClass: "cssLoadCheck", - dynamicCssLinkId: "DynCssLink", - resizeDelay: 30 - } - var noMediaQuery = false; - var delay; - var currentCssMediaType; - - // Adding events to elements in the DOM without overwriting it - function addEvent(element, newFunction, eventType) { - var oldEvent = eval("element." + eventType); - var eventContentType = eval("typeof element." + eventType) - - if ( eventContentType != 'function' ) { - eval("element." + eventType + " = newFunction") - } else { - eval("element." + eventType + " = function(e) { oldEvent(e); newFunction(e); }") - } - } - - // Get the the inner width of the browser window - function getWindowWidth() { - if (window.innerWidth) { - return window.innerWidth; - } else if (document.documentElement.clientWidth) { - return document.documentElement.clientWidth; - } else if (document.body.clientWidth) { - return document.body.clientWidth; - } else{ - return 0; - } - } - - function addCssLink(cssHref) { - var cssNode = document.createElement('link'); - var windowWidth; - cssNode.type = 'text/css'; - cssNode.rel = 'stylesheet'; - cssNode.media = 'screen, handheld, fallback'; - //cssNode.id = config.dynamicCssLinkId; - cssNode.href = cssHref; - document.getElementsByTagName("head")[0].appendChild(cssNode); - } - - - - /* Start public */ - return { - /** - * Adds link to CSS in the head if no CSS is loaded - * - * @since 1.0 - 2010-08-21 - * @version 1.0 - 2010-08-21 - * @param {String|Object} cssScreen URL to CSS file for larger screens - * @param {String|Object} cssHandheld URL to CSS file for smaller screens - * @param {Number} mobileMaxWidth Maximum width for handheld devices - * @example - * wbos.CssTools.MediaQueryFallBack.LoadCss(['screen.css', 'screen2.css'], 'mobile.css', 480) - */ - LoadCss: function(cssScreen, cssHandheld, mobileMaxWidth) { - // Set config values - if (typeof(cssScreen) != "undefined") { - config.cssScreen = cssScreen; - } - if (typeof(cssHandheld) != "undefined") { - config.cssHandheld = cssHandheld; - } - if (typeof(mobileMaxWidth) != "undefined") { - config.mobileMaxWidth = mobileMaxWidth; - } - - // Check if CSS is loaded - var cssloadCheckNode = document.createElement('div'); - cssloadCheckNode.className = config.testDivClass; - document.getElementsByTagName("body")[0].appendChild(cssloadCheckNode); - if (cssloadCheckNode.offsetWidth != 100 && noMediaQuery == false) { - noMediaQuery = true; - } - cssloadCheckNode.parentNode.removeChild(cssloadCheckNode) - - if (noMediaQuery == true) { - // Browser does not support Media Queries, so JavaScript will supply a fallback - var cssHref = ""; - - // Determines what CSS file to load - if (getWindowWidth() <= config.mobileMaxWidth) { - cssHref = config.cssHandheld; - newCssMediaType = "handheld"; - } else { - cssHref = config.cssScreen; - newCssMediaType = "screen"; - } - - // Add CSS link to of page - if (cssHref != "" && currentCssMediaType != newCssMediaType) { - var currentCssLinks = document.styleSheets - for (var i = 0; i < currentCssLinks.length; i++) { - for (var ii = 0; ii < currentCssLinks[i].media.length; ii++) { - if (typeof(currentCssLinks[i].media) == "object") { - if (currentCssLinks[i].media.item(ii) == "fallback") { - currentCssLinks[i].ownerNode.parentNode.removeChild(currentCssLinks[i].ownerNode) - i-- - break; - } - } else { - if (currentCssLinks[i].media.indexOf("fallback") >= 0) { - currentCssLinks[i].owningElement.parentNode.removeChild(currentCssLinks[i].owningElement) - i-- - break; - } - } - } - } - if (typeof(cssHref) == "object") { - for (var i = 0; i < cssHref.length; i++) { - addCssLink(cssHref[i]) - } - } else { - addCssLink(cssHref) - } - - currentCssMediaType = newCssMediaType; - } - - - // Check screen size again if user resizes window - addEvent(window, wbos.CssTools.MediaQueryFallBack.LoadCssDelayed, 'onresize') - } - }, - - /** - * Runs LoadCSS after a short delay - * - * @since 1.0 - 2010-08-21 - * @version 1.0 - 2010-08-21 - * @example - * wbos.CssTools.MediaQueryFallBack.LoadCssDelayed() - */ - LoadCssDelayed: function() { - clearTimeout(delay); - delay = setTimeout( "wbos.CssTools.MediaQueryFallBack.LoadCss()", config.resizeDelay) - } - - } - /* End public */ -})(); diff --git a/lib/jsdoc-toolkit/templates/codeview/publish.js b/lib/jsdoc-toolkit/templates/codeview/publish.js deleted file mode 100755 index 02bfbaec..00000000 --- a/lib/jsdoc-toolkit/templates/codeview/publish.js +++ /dev/null @@ -1,228 +0,0 @@ -/** Called automatically by JsDoc Toolkit. */ -function publish(symbolSet) { - publish.conf = { // trailing slash expected for dirs - ext: ".html", - outDir: JSDOC.opt.d || SYS.pwd+"../out/jsdoc/", - templatesDir: JSDOC.opt.t || SYS.pwd+"../templates/jsdoc/", - cssDir: "css/", - jsDir: "javascript/", - fontsDir: "css/fonts/", - symbolsDir: "symbols/", - srcDir: "symbols/src/" - }; - - // is source output is suppressed, just display the links to the source file - if (JSDOC.opt.s && defined(Link) && Link.prototype._makeSrcLink) { - Link.prototype._makeSrcLink = function(srcFilePath) { - return "<"+srcFilePath+">"; - } - } - - // create the folders and subfolders to hold the output - IO.mkPath((publish.conf.outDir+publish.conf.cssDir)); - IO.mkPath((publish.conf.outDir+publish.conf.fontsDir)); - IO.mkPath((publish.conf.outDir+publish.conf.jsDir)); - IO.mkPath((publish.conf.outDir+"symbols/src").split("/")); - - // used to allow Link to check the details of things being linked to - Link.symbolSet = symbolSet; - - // create the required templates - try { - //var styleTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+publish.conf.cssDir+"all.css"); - var classTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"class.tmpl"); - var classesTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"allclasses.tmpl"); - } - catch(e) { - print("Couldn't create the required templates: "+e); - quit(); - } - - // some utility filters - function hasNoParent($) {return ($.memberOf == "")} - function isaFile($) {return ($.is("FILE"))} - function isaClass($) {return ($.is("CONSTRUCTOR") || $.isNamespace)} - - // get an array version of the symbolset, useful for filtering - var symbols = symbolSet.toArray(); - - // create the hilited source code files - var files = JSDOC.opt.srcFiles; - for (var i = 0, l = files.length; i < l; i++) { - var file = files[i]; - var srcDir = publish.conf.outDir + "symbols/src/"; - makeSrcFile(file, srcDir); - } - - // get a list of all the classes in the symbolset - var classes = symbols.filter(isaClass).sort(makeSortby("alias")); - - // create a filemap in which outfiles must be to be named uniquely, ignoring case - if (JSDOC.opt.u) { - var filemapCounts = {}; - Link.filemap = {}; - for (var i = 0, l = classes.length; i < l; i++) { - var lcAlias = classes[i].alias.toLowerCase(); - - if (!filemapCounts[lcAlias]) filemapCounts[lcAlias] = 1; - else filemapCounts[lcAlias]++; - - Link.filemap[classes[i].alias] = - (filemapCounts[lcAlias] > 1)? - lcAlias+"_"+filemapCounts[lcAlias] : lcAlias; - } - } - - // create a class index, displayed in the left-hand column of every class page - Link.base = "../"; - publish.classesIndex = classesTemplate.process(classes); // kept in memory - - // create each of the class pages - for (var i = 0, l = classes.length; i < l; i++) { - var symbol = classes[i]; - - symbol.events = symbol.getEvents(); // 1 order matters - symbol.methods = symbol.getMethods(); // 2 - - var output = ""; - output = classTemplate.process(symbol); - - IO.saveFile(publish.conf.outDir+"symbols/", ((JSDOC.opt.u)? Link.filemap[symbol.alias] : symbol.alias) + publish.conf.ext, output); - } - - // regenerate the index with different relative links, used in the index pages - Link.base = ""; - publish.classesIndex = classesTemplate.process(classes); - - // create the class index page - try { - var classesindexTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"index.tmpl"); - } - catch(e) { print(e.message); quit(); } - - var classesIndex = classesindexTemplate.process(classes); - IO.saveFile(publish.conf.outDir, "index"+publish.conf.ext, classesIndex); - classesindexTemplate = classesIndex = classes = null; - - // create the file index page - try { - var fileindexTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"allfiles.tmpl"); - } - catch(e) { print(e.message); quit(); } - - var documentedFiles = symbols.filter(isaFile); // files that have file-level docs - var allFiles = []; // not all files have file-level docs, but we need to list every one - - for (var i = 0; i < files.length; i++) { - allFiles.push(new JSDOC.Symbol(files[i], [], "FILE", new JSDOC.DocComment("/** */"))); - } - - for (var i = 0; i < documentedFiles.length; i++) { - var offset = files.indexOf(documentedFiles[i].alias); - allFiles[offset] = documentedFiles[i]; - } - - allFiles = allFiles.sort(makeSortby("name")); - - // output the file index page - var filesIndex = fileindexTemplate.process(allFiles); - IO.saveFile(publish.conf.outDir, "files"+publish.conf.ext, filesIndex); - fileindexTemplate = filesIndex = files = null; - - // copy files - IO.copyFile(publish.conf.templatesDir+"/"+publish.conf.cssDir+"all.css", publish.conf.outDir+"/"+publish.conf.cssDir); - IO.copyFile(publish.conf.templatesDir+"/"+publish.conf.cssDir+"screen.css", publish.conf.outDir+"/"+publish.conf.cssDir); - IO.copyFile(publish.conf.templatesDir+"/"+publish.conf.cssDir+"handheld.css", publish.conf.outDir+"/"+publish.conf.cssDir); - IO.copyFile(publish.conf.templatesDir+"/"+publish.conf.jsDir+"wbos.csstools.mediaqueryfallback.js", publish.conf.outDir+"/"+publish.conf.jsDir); - IO.copyFile(publish.conf.templatesDir+"/"+publish.conf.fontsDir+"mplus-1m-regular-webfont.eot", publish.conf.outDir+"/"+publish.conf.fontsDir); - IO.copyFile(publish.conf.templatesDir+"/"+publish.conf.fontsDir+"mplus-1m-regular-webfont.svg", publish.conf.outDir+"/"+publish.conf.fontsDir); - IO.copyFile(publish.conf.templatesDir+"/"+publish.conf.fontsDir+"mplus-1m-regular-webfont.ttf", publish.conf.outDir+"/"+publish.conf.fontsDir); - IO.copyFile(publish.conf.templatesDir+"/"+publish.conf.fontsDir+"mplus-1m-regular-webfont.woff", publish.conf.outDir+"/"+publish.conf.fontsDir); - IO.copyFile(publish.conf.templatesDir+"/"+publish.conf.fontsDir+"mplus-1m-bold-webfont.eot", publish.conf.outDir+"/"+publish.conf.fontsDir); - IO.copyFile(publish.conf.templatesDir+"/"+publish.conf.fontsDir+"mplus-1m-bold-webfont.svg", publish.conf.outDir+"/"+publish.conf.fontsDir); - IO.copyFile(publish.conf.templatesDir+"/"+publish.conf.fontsDir+"mplus-1m-bold-webfont.ttf", publish.conf.outDir+"/"+publish.conf.fontsDir); - IO.copyFile(publish.conf.templatesDir+"/"+publish.conf.fontsDir+"mplus-1m-bold-webfont.woff", publish.conf.outDir+"/"+publish.conf.fontsDir); -} - - -/** Just the first sentence (up to a full stop). Should not break on dotted variable names. */ -function summarize(desc) { - if (typeof desc != "undefined") - return desc.match(/([\w\W]+?\.)[^a-z0-9_$]/i)? RegExp.$1 : desc; -} - -/** Make a symbol sorter by some attribute. */ -function makeSortby(attribute) { - return function(a, b) { - if (a[attribute] != undefined && b[attribute] != undefined) { - a = a[attribute].toLowerCase(); - b = b[attribute].toLowerCase(); - if (a < b) return -1; - if (a > b) return 1; - return 0; - } - } -} - -function wordwrapNamespace(classLink) { - var classText = classLink.match(/[^<>]+(?=[<])/) + ""; - var classTextNew = classText.replace(/\./g, " . ") + ""; - classLink = classLink.replace(/[^<>]+(?=[<])/, classTextNew); - return classLink; -} - -/** Pull in the contents of an external file at the given path. */ -function include(path) { - var path = publish.conf.templatesDir+path; - return IO.readFile(path); -} - -/** Turn a raw source file into a code-hilited page in the docs. */ -function makeSrcFile(path, srcDir, name) { - if (JSDOC.opt.s) return; - - if (!name) { - name = path.replace(/\.\.?[\\\/]/g, "").replace(/[\\\/]/g, "_"); - name = name.replace(/\:/g, "_"); - } - - var src = {path: path, name:name, charset: IO.encoding, hilited: ""}; - - if (defined(JSDOC.PluginManager)) { - JSDOC.PluginManager.run("onPublishSrc", src); - } - - if (src.hilited) { - IO.saveFile(srcDir, name+publish.conf.ext, src.hilited); - } -} - -/** Build output for displaying function parameters. */ -function makeSignature(params) { - if (!params) return "()"; - var signature = "(" - + - params.filter( - function($) { - return $.name.indexOf(".") == -1; // don't show config params in signature - } - ).map( - function($) { - return $.name; - } - ).join(", ") - + - ")"; - return signature; -} - -/** Find symbol {@link ...} strings in text and turn into html links */ -function resolveLinks(str, from) { - str = str.replace(/\{@link ([^} ]+) ?\}/gi, - function(match, symbolName) { - return new Link().toSymbol(symbolName); - } - ); - - return str; -} diff --git a/lib/jsdoc-toolkit/templates/codeview/static/header.html b/lib/jsdoc-toolkit/templates/codeview/static/header.html deleted file mode 100755 index 353b735a..00000000 --- a/lib/jsdoc-toolkit/templates/codeview/static/header.html +++ /dev/null @@ -1,2 +0,0 @@ - \ No newline at end of file diff --git a/lib/jsdoc-toolkit/templates/codeview/static/index.html b/lib/jsdoc-toolkit/templates/codeview/static/index.html deleted file mode 100755 index 661f6f67..00000000 --- a/lib/jsdoc-toolkit/templates/codeview/static/index.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - Generated Javascript Documentation - - - - - - <body> - <p> - This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. - </p> - </body> - - - \ No newline at end of file diff --git a/lib/jsdoc-toolkit/templates/codeview/symbol.tmpl b/lib/jsdoc-toolkit/templates/codeview/symbol.tmpl deleted file mode 100755 index f8f4bd1f..00000000 --- a/lib/jsdoc-toolkit/templates/codeview/symbol.tmpl +++ /dev/null @@ -1,35 +0,0 @@ - - {+data.name+} - {+data.memberOf+} - {+data.isStatic+} - {+data.isa+} - {+data.desc+} - {+data.classDesc+} - - - - {+method.name+} - {+method.memberOf+} - {+method.isStatic+} - {+method.desc+} - - - {+param.type+} - {+param.name+} - {+param.desc+} - {+param.defaultValue+} - - - - - - - - {+property.name+} - {+property.memberOf+} - {+property.isStatic+} - {+property.desc+} - {+property.type+} - - - diff --git a/lib/jsdoc-toolkit/templates/jsdoc/allclasses.tmpl b/lib/jsdoc-toolkit/templates/jsdoc/allclasses.tmpl deleted file mode 100644 index 46a0a26e..00000000 --- a/lib/jsdoc-toolkit/templates/jsdoc/allclasses.tmpl +++ /dev/null @@ -1,16 +0,0 @@ -
{+new Link().toFile("index.html").withText("Class Index")+} -| {+new Link().toFile("files.html").withText("File Index")+}
-
-

Classes

-
    - -
  • {! - if (thisClass.alias == "_global_") { - output += ""+new Link().toClass(thisClass.alias)+""; - } - else { - output += new Link().toClass(thisClass.alias); - } - !}
  • -
    -
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/templates/jsdoc/allfiles.tmpl b/lib/jsdoc-toolkit/templates/jsdoc/allfiles.tmpl deleted file mode 100644 index 3405d39d..00000000 --- a/lib/jsdoc-toolkit/templates/jsdoc/allfiles.tmpl +++ /dev/null @@ -1,50 +0,0 @@ ---- -layout: default -title: Fabric.js API Reference - File Index ---- - - - -{+include("static/header.html")+} - -
- {+publish.classesIndex+} -
- -
-

File Index

- - -
-

{+new Link().toSrc(item.alias).withText(item.name)+}

- {+resolveLinks(item.desc)+} -
- -
Author:
-
{+item.author+}
-
- -
Version:
-
{+item.version+}
-
- {! var locations = item.comment.getTag('location').map(function($){return $.toString().replace(/(^\$ ?| ?\$$)/g, '').replace(/^HeadURL: https:/g, 'http:');}) !} - -
Location:
- -
{+location+}
-
-
-
-
-
-
-
- -
- ©{+JSDOC.opt.D.copyright+}
- Documentation generated by - JsDoc Toolkit - {+JSDOC.VERSION+} on {+new Date()+} -
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/templates/jsdoc/class.tmpl b/lib/jsdoc-toolkit/templates/jsdoc/class.tmpl deleted file mode 100644 index 68d1a152..00000000 --- a/lib/jsdoc-toolkit/templates/jsdoc/class.tmpl +++ /dev/null @@ -1,641 +0,0 @@ ---- -layout: doc -title: Fabric.js API Reference - {+data.alias+} ---- - - - - - -{+include("static/header.html")+} - - - -
- - {+publish.classesIndex+} - -
- -
- -

- {! - var classType = ""; - - if (data.isBuiltin()) { - classType += "Built-In "; - } - - if (data.isNamespace) { - if (data.is('FUNCTION')) { - classType += "Function "; - } - classType += "Namespace "; - } - else { - classType += "Class "; - } - !} - {+classType+}{+data.alias+} -

- - -

-
Version - {+ data.version +}.
-
-
Extends - {+ - data.augments - .sort() - .map( - function($) { return new Link().toSymbol($); } - ) - .join(", ") - +}.
-
- - {+resolveLinks(data.classDesc)+} - - {# isn't defined in any file #} -
Defined in: {+new Link().toSrc(data.srcFile)+}. -
-

- - - - - - - - - - - - - - - - - -
{+classType+}Summary
Constructor AttributesConstructor Name and Description
{! - if (data.isPrivate) output += "<private> "; - if (data.isInner) output += "<inner> "; - !}  -
- {+ new Link().toSymbol(data.alias).inner('constructor')+}{+ makeSignature(data.params) +} -
-
{+resolveLinks(summarize(data.desc))+}
-
-
- - - - {! var ownProperties = data.properties.filter(function($){return $.memberOf == data.alias && !$.isNamespace}).sort(makeSortby("name")); !} - - - - - - - - - - - - - - - - - -
Field Summary
Field AttributesField Name and Description
{! - if (member.isPrivate) output += "<private> "; - if (member.isInner) output += "<inner> "; - if (member.isStatic) output += "<static> "; - if (member.isConstant) output += "<constant> "; - !}  -
- {+member.memberOf+}.{+new Link().toSymbol(member.alias).withText(member.name)+} -
-
{+resolveLinks(summarize(member.desc))+}
-
-
- - -
- {! - var borrowedMembers = data.properties.filter(function($) {return $.memberOf != data.alias}); - - var contributers = []; - borrowedMembers.map(function($) {if (contributers.indexOf($.memberOf) < 0) contributers.push($.memberOf)}); - for (var i = 0, l = contributers.length; i < l; i++) { - output += - "
Fields borrowed from class "+new Link().toSymbol(contributers[i])+":
" - + - "
" + - borrowedMembers - .filter( - function($) { return $.memberOf == contributers[i] } - ) - .sort(makeSortby("name")) - .map( - function($) { return new Link().toSymbol($.alias).withText($.name) } - ) - .join(", ") - + - "
"; - } - !} -
-
-
- - - - {! var ownMethods = data.methods.filter(function($){return $.memberOf == data.alias && !$.isNamespace}).sort(makeSortby("name")); !} - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
{! - if (member.isPrivate) output += "<private> "; - if (member.isInner) output += "<inner> "; - if (member.isStatic) output += "<static> "; - !}  -
{+member.memberOf+}.{+new Link().toSymbol(member.alias).withText(member.name.replace(/\^\d+$/, ''))+}{+makeSignature(member.params)+} -
-
{+resolveLinks(summarize(member.desc))+}
-
-
- - -
- {! - var borrowedMembers = data.methods.filter(function($) {return $.memberOf != data.alias}); - var contributers = []; - borrowedMembers.map(function($) {if (contributers.indexOf($.memberOf) < 0) contributers.push($.memberOf)}); - for (var i = 0, l = contributers.length; i < l; i++) { - output += - "
Methods borrowed from class "+new Link().toSymbol(contributers[i])+":
" - + - "
" + - borrowedMembers - .filter( - function($) { return $.memberOf == contributers[i] } - ) - .sort(makeSortby("name")) - .map( - function($) { return new Link().toSymbol($.alias).withText($.name) } - ) - .join(", ") - + - "
"; - } - - !} -
-
-
- - - {! var ownEvents = data.events.filter(function($){return $.memberOf == data.alias && !$.isNamespace}).sort(makeSortby("name")); !} - - - - - - - - - - - - - - - - - -
Event Summary
Event AttributesEvent Name and Description
{! - if (member.isPrivate) output += "<private> "; - if (member.isInner) output += "<inner> "; - if (member.isStatic) output += "<static> "; - !}  -
{+member.memberOf+}.{+new Link().toSymbol(member.alias).withText(member.name)+}{+makeSignature(member.params)+} -
-
{+resolveLinks(summarize(member.desc))+}
-
-
- - -
- {! - var borrowedMembers = data.events.filter(function($) {return $.memberOf != data.alias}); - var contributers = []; - borrowedMembers.map(function($) {if (contributers.indexOf($.memberOf) < 0) contributers.push($.memberOf)}); - for (var i = 0, l = contributers.length; i < l; i++) { - output += - "
Events borrowed from class "+new Link().toSymbol(contributers[i])+":
" - + - "
" + - borrowedMembers - .filter( - function($) { return $.memberOf == contributers[i] } - ) - .sort(makeSortby("name")) - .map( - function($) { return new Link().toSymbol($.alias).withText($.name) } - ) - .join(", ") - + - "
"; - } - - !} -
-
-
- - - -
-
- {+classType+}Detail -
- -
{! - if (data.isPrivate) output += "<private> "; - if (data.isInner) output += "<inner> "; - !} - {+ data.alias +}{+ makeSignature(data.params) +} -
- -
- {+resolveLinks(data.desc)+} -
Author: {+data.author+}.
-
- - - -
{+example+}
-
-
- - - -
-
Parameters:
- -
- {+((item.type)?""+("{"+(new Link().toSymbol(item.type)+"} ")) : "")+} {+item.name+} - Optional, Default: {+item.defaultValue+} -
-
{+resolveLinks(item.desc)+}
-
-
-
- -
-
Deprecated:
-
- {+resolveLinks(data.deprecated)+} -
-
-
- -
-
Since:
-
{+ data.since +}
-
-
- -
-
Throws:
- -
- {+((item.type)?"{"+(new Link().toSymbol(item.type))+"} " : "")+} {+item.name+} -
-
{+resolveLinks(item.desc)+}
-
-
-
- -
-
Returns:
- -
{+((item.type)?"{"+(new Link().toSymbol(item.type))+"} " : "")+}{+resolveLinks(item.desc)+}
-
-
-
- -
-
Requires:
- -
{+ new Link().toSymbol(item) +}
-
-
-
- -
-
See:
- -
{+ new Link().toSymbol(item) +}
-
-
-
- -
-
- - - -
- Field Detail -
- - -
{! - if (member.isPrivate) output += "<private> "; - if (member.isInner) output += "<inner> "; - if (member.isStatic) output += "<static> "; - if (member.isConstant) output += "<constant> "; - !} - - {{+new Link().toSymbol(member.type)+}} - {+member.memberOf+}.{+member.name+} - -
-
- {+resolveLinks(member.desc)+} - -
- Defined in: {+new Link().toSrc(member.srcFile)+}. -
-
Author: {+member.author+}.
-
- - - -
{+example+}
-
-
- - -
-
Deprecated:
-
- {+ resolveLinks(member.deprecated) +} -
-
-
- -
-
Since:
-
{+ member.since +}
-
-
- -
-
See:
- -
{+ new Link().toSymbol(item) +}
-
-
-
- -
-
Default Value:
-
- {+resolveLinks(member.defaultValue)+} -
-
-
- -
-
-
- - - -
- Method Detail -
- - -
{! - if (member.isPrivate) output += "<private> "; - if (member.isInner) output += "<inner> "; - if (member.isStatic) output += "<static> "; - !} - - {{+new Link().toSymbol(member.type)+}} - {+member.memberOf+}.{+member.name.replace(/\^\d+$/, '')+}{+makeSignature(member.params)+} - -
-
- {+resolveLinks(member.desc)+} - -
- Defined in: {+new Link().toSrc(member.srcFile)+}. -
-
Author: {+member.author+}.
-
- - - -
{+example+}
-
-
- - -
-
Parameters:
- -
- {+((item.type)?"{"+(new Link().toSymbol(item.type))+"} " : "")+}{+item.name+} - Optional, Default: {+item.defaultValue+} -
-
{+resolveLinks(item.desc)+}
-
-
-
- -
-
Deprecated:
-
- {+ resolveLinks(member.deprecated) +} -
-
-
- -
-
Since:
-
{+ member.since +}
-
- -
- -
-
Throws:
- -
- {+((item.type)?"{"+(new Link().toSymbol(item.type))+"} " : "")+} {+item.name+} -
-
{+resolveLinks(item.desc)+}
-
-
-
- -
-
Returns:
- -
{+((item.type)?"{"+(new Link().toSymbol(item.type))+"} " : "")+}{+resolveLinks(item.desc)+}
-
-
-
- -
-
Requires:
- -
{+ resolveLinks(item) +}
-
-
-
- -
-
See:
- -
{+ new Link().toSymbol(item) +}
-
-
-
- -
-
-
- - - -
- Event Detail -
- - -
{! - if (member.isPrivate) output += "<private> "; - if (member.isInner) output += "<inner> "; - if (member.isStatic) output += "<static> "; - !} - - {{+new Link().toSymbol(member.type)+}} - {+member.memberOf+}.{+member.name+}{+makeSignature(member.params)+} - -
-
- {+resolveLinks(member.desc)+} - -
- Defined in: {+new Link().toSrc(member.srcFile)+}. -
-
Author: {+member.author+}.
-
- - - -
{+example+}
-
-
- - -
-
Parameters:
- -
- {+((item.type)?"{"+(new Link().toSymbol(item.type))+"} " : "")+}{+item.name+} - Optional, Default: {+item.defaultValue+} -
-
{+ resolveLinks(item.desc) +}
-
-
-
- -
-
Deprecated:
-
- {+ resolveLinks(member.deprecated) +} -
-
-
- -
-
Since:
-
{+ member.since +}
-
- -
- -
-
Throws:
- -
- {+((item.type)?"{"+(new Link().toSymbol(item.type))+"} " : "")+} {+item.name+} -
-
{+ resolveLinks(item.desc) +}
-
-
-
- -
-
Returns:
- -
{+((item.type)?"{"+(new Link().toSymbol(item.type))+"} " : "")+}{+resolveLinks(item.desc)+}
-
-
-
- -
-
Requires:
- -
{+ resolveLinks(item) +}
-
-
-
- -
-
See:
- -
{+ new Link().toSymbol(item) +}
-
-
-
- -
-
-
- -
-
- - - -
- ©{+JSDOC.opt.D.copyright+}
- Documentation generated by JsDoc Toolkit {+JSDOC.VERSION+} on {+new Date()+} -
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/templates/jsdoc/index.tmpl b/lib/jsdoc-toolkit/templates/jsdoc/index.tmpl deleted file mode 100644 index 940414b0..00000000 --- a/lib/jsdoc-toolkit/templates/jsdoc/index.tmpl +++ /dev/null @@ -1,33 +0,0 @@ ---- -layout: default -title: Fabric.js API Reference ---- - - - -{+include("static/header.html")+} - -
- {+publish.classesIndex+} -
- -
-

Class Index

- - -
-

{+(new Link().toSymbol(thisClass.alias))+}

- {+resolveLinks(summarize(thisClass.classDesc))+} -
-
-
-
- -
- ©{+JSDOC.opt.D.copyright+}
- Documentation generated by - JsDoc Toolkit - {+JSDOC.VERSION+} on {+new Date()+} -
\ No newline at end of file diff --git a/lib/jsdoc-toolkit/templates/jsdoc/publish.js b/lib/jsdoc-toolkit/templates/jsdoc/publish.js deleted file mode 100644 index 42300f4b..00000000 --- a/lib/jsdoc-toolkit/templates/jsdoc/publish.js +++ /dev/null @@ -1,201 +0,0 @@ -/** Called automatically by JsDoc Toolkit. */ -function publish(symbolSet) { - publish.conf = { // trailing slash expected for dirs - ext: ".html", - outDir: JSDOC.opt.d || SYS.pwd+"../out/jsdoc/", - templatesDir: JSDOC.opt.t || SYS.pwd+"../templates/jsdoc/", - symbolsDir: "symbols/", - srcDir: "symbols/src/" - }; - - // is source output is suppressed, just display the links to the source file - if (JSDOC.opt.s && defined(Link) && Link.prototype._makeSrcLink) { - Link.prototype._makeSrcLink = function(srcFilePath) { - return "<"+srcFilePath+">"; - } - } - - // create the folders and subfolders to hold the output - IO.mkPath((publish.conf.outDir+"symbols/src").split("/")); - - // used to allow Link to check the details of things being linked to - Link.symbolSet = symbolSet; - - // create the required templates - try { - var classTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"class.tmpl"); - var classesTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"allclasses.tmpl"); - } - catch(e) { - print("Couldn't create the required templates: "+e); - quit(); - } - - // some ustility filters - function hasNoParent($) {return ($.memberOf == "")} - function isaFile($) {return ($.is("FILE"))} - function isaClass($) {return ($.is("CONSTRUCTOR") || $.isNamespace)} - - // get an array version of the symbolset, useful for filtering - var symbols = symbolSet.toArray(); - - // create the hilited source code files - var files = JSDOC.opt.srcFiles; - for (var i = 0, l = files.length; i < l; i++) { - var file = files[i]; - var srcDir = publish.conf.outDir + "symbols/src/"; - makeSrcFile(file, srcDir); - } - - // get a list of all the classes in the symbolset - var classes = symbols.filter(isaClass).sort(makeSortby("alias")); - - // create a filemap in which outfiles must be to be named uniquely, ignoring case - if (JSDOC.opt.u) { - var filemapCounts = {}; - Link.filemap = {}; - for (var i = 0, l = classes.length; i < l; i++) { - var lcAlias = classes[i].alias.toLowerCase(); - - if (!filemapCounts[lcAlias]) filemapCounts[lcAlias] = 1; - else filemapCounts[lcAlias]++; - - Link.filemap[classes[i].alias] = - (filemapCounts[lcAlias] > 1)? - lcAlias+"_"+filemapCounts[lcAlias] : lcAlias; - } - } - - // create a class index, displayed in the left-hand column of every class page - Link.base = "../"; - publish.classesIndex = classesTemplate.process(classes); // kept in memory - - // create each of the class pages - for (var i = 0, l = classes.length; i < l; i++) { - var symbol = classes[i]; - - symbol.events = symbol.getEvents(); // 1 order matters - symbol.methods = symbol.getMethods(); // 2 - - Link.currentSymbol= symbol; - var output = ""; - output = classTemplate.process(symbol); - - IO.saveFile(publish.conf.outDir+"symbols/", ((JSDOC.opt.u)? Link.filemap[symbol.alias] : symbol.alias) + publish.conf.ext, output); - } - - // regenerate the index with different relative links, used in the index pages - Link.base = ""; - publish.classesIndex = classesTemplate.process(classes); - - // create the class index page - try { - var classesindexTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"index.tmpl"); - } - catch(e) { print(e.message); quit(); } - - var classesIndex = classesindexTemplate.process(classes); - IO.saveFile(publish.conf.outDir, "index"+publish.conf.ext, classesIndex); - classesindexTemplate = classesIndex = classes = null; - - // create the file index page - try { - var fileindexTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"allfiles.tmpl"); - } - catch(e) { print(e.message); quit(); } - - var documentedFiles = symbols.filter(isaFile); // files that have file-level docs - var allFiles = []; // not all files have file-level docs, but we need to list every one - - for (var i = 0; i < files.length; i++) { - allFiles.push(new JSDOC.Symbol(files[i], [], "FILE", new JSDOC.DocComment("/** */"))); - } - - for (var i = 0; i < documentedFiles.length; i++) { - var offset = files.indexOf(documentedFiles[i].alias); - allFiles[offset] = documentedFiles[i]; - } - - allFiles = allFiles.sort(makeSortby("name")); - - // output the file index page - var filesIndex = fileindexTemplate.process(allFiles); - IO.saveFile(publish.conf.outDir, "files"+publish.conf.ext, filesIndex); - fileindexTemplate = filesIndex = files = null; -} - - -/** Just the first sentence (up to a full stop). Should not break on dotted variable names. */ -function summarize(desc) { - if (typeof desc != "undefined") - return desc.match(/([\w\W]+?\.)[^a-z0-9_$]/i)? RegExp.$1 : desc; -} - -/** Make a symbol sorter by some attribute. */ -function makeSortby(attribute) { - return function(a, b) { - if (a[attribute] != undefined && b[attribute] != undefined) { - a = a[attribute].toLowerCase(); - b = b[attribute].toLowerCase(); - if (a < b) return -1; - if (a > b) return 1; - return 0; - } - } -} - -/** Pull in the contents of an external file at the given path. */ -function include(path) { - var path = publish.conf.templatesDir+path; - return IO.readFile(path); -} - -/** Turn a raw source file into a code-hilited page in the docs. */ -function makeSrcFile(path, srcDir, name) { - if (JSDOC.opt.s) return; - - if (!name) { - name = path.replace(/\.\.?[\\\/]/g, "").replace(/[\\\/]/g, "_"); - name = name.replace(/\:/g, "_"); - } - - var src = {path: path, name:name, charset: IO.encoding, hilited: ""}; - - if (defined(JSDOC.PluginManager)) { - JSDOC.PluginManager.run("onPublishSrc", src); - } - - if (src.hilited) { - IO.saveFile(srcDir, name+publish.conf.ext, src.hilited); - } -} - -/** Build output for displaying function parameters. */ -function makeSignature(params) { - if (!params) return "()"; - var signature = "(" - + - params.filter( - function($) { - return $.name.indexOf(".") == -1; // don't show config params in signature - } - ).map( - function($) { - return $.name; - } - ).join(", ") - + - ")"; - return signature; -} - -/** Find symbol {@link ...} strings in text and turn into html links */ -function resolveLinks(str, from) { - str = str.replace(/\{@link ([^} ]+) ?\}/gi, - function(match, symbolName) { - return new Link().toSymbol(symbolName); - } - ); - - return str; -} diff --git a/lib/jsdoc-toolkit/templates/jsdoc/static/default.css b/lib/jsdoc-toolkit/templates/jsdoc/static/default.css deleted file mode 100644 index 7b3f89b6..00000000 --- a/lib/jsdoc-toolkit/templates/jsdoc/static/default.css +++ /dev/null @@ -1,152 +0,0 @@ -/* default.css */ -#bd-wrapper -{ - font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif; -} - -.header -{ - clear: both; - background-color: #ccc; - padding: 8px; -} - -h1 -{ - font-size: 150%; - font-weight: bold; - padding: 0; - margin: 1em 0 0 .3em; -} - -hr -{ - border: none 0; - border-top: 1px solid #7F8FB1; - height: 1px; -} - -pre.code -{ - display: block; - padding: 8px; - border: 1px dashed #ccc; -} - -#index { - margin-top: 24px; - float: left; - width: 190px; - position: absolute; - left: 8px; - background-color: #F3F3F3; - padding: 8px; -} - -#content { - margin-left: 220px; - width: 770px; -} - -.classList { - list-style-type: none; - padding: 0; - margin: 0 0 0 8px; - font-family: arial, sans-serif; - font-size: 1em; - overflow: auto; -} - -.classList li { - paddinging: 0; - margin: 0 0 8px 0; -} - -.summaryTable { width: 100%; } - -h1.classTitle { - font-size:170%; - line-height:130%; -} - -h2 { font-size: 110%; } -caption, div.sectionTitle { - background-color: #7F8FB1; - color: #fff; - font-size:130%; - text-align: left; - padding: 2px 6px 2px 6px; - border: 1px #7F8FB1 solid; -} - -div.sectionTitle { margin-bottom: 8px; } -.summaryTable thead { display: none; } - -.summaryTable td { - vertical-align: top; - padding: 4px; - border-bottom: 1px #C0C8D8 solid; - border-right: 1px #C0C8D8 solid; -} - -/*col#summaryAttributes {}*/ -.summaryTable td.attributes { - border-left: 1px #C0C8D8 solid; - width: 140px; - text-align: right; -} - -td.attributes, .fixedFont { - line-height: 15px; - color: #002EBE; - font-family: "Courier New",Courier,monospace; - font-size: 13px; -} - -.summaryTable td.nameDescription { - text-align: left; - font-size: 13px; - line-height: 15px; -} - -.summaryTable td.nameDescription, .description { - line-height: 15px; - padding: 4px; - padding-left: 4px; -} - -.summaryTable { margin-bottom: 8px; } - -ul.inheritsList { - list-style: square; - margin-left: 20px; - padding-left: 0; -} - -.detailList { - margin-left: 20px; - line-height: 15px; -} -.detailList dt { margin-left: 20px; } - -.detailList .heading { - font-weight: bold; - padding-bottom: 6px; - margin-left: 0; -} - -.light, td.attributes, .light a:link, .light a:visited { - color: #777; - font-style: italic; -} - -.fineprint { - text-align: right; - font-size: 10px; -} - -.inheritsList dd { - margin-left: 0; - margin-top: 3px; - margin-bottom: 8px; -} \ No newline at end of file diff --git a/lib/jsdoc-toolkit/templates/jsdoc/static/header.html b/lib/jsdoc-toolkit/templates/jsdoc/static/header.html deleted file mode 100644 index 353b735a..00000000 --- a/lib/jsdoc-toolkit/templates/jsdoc/static/header.html +++ /dev/null @@ -1,2 +0,0 @@ - \ No newline at end of file diff --git a/lib/jsdoc-toolkit/templates/jsdoc/static/index.html b/lib/jsdoc-toolkit/templates/jsdoc/static/index.html deleted file mode 100644 index 661f6f67..00000000 --- a/lib/jsdoc-toolkit/templates/jsdoc/static/index.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - Generated Javascript Documentation - - - - - - <body> - <p> - This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. - </p> - </body> - - - \ No newline at end of file diff --git a/lib/jsdoc-toolkit/templates/jsdoc/symbol.tmpl b/lib/jsdoc-toolkit/templates/jsdoc/symbol.tmpl deleted file mode 100644 index f8f4bd1f..00000000 --- a/lib/jsdoc-toolkit/templates/jsdoc/symbol.tmpl +++ /dev/null @@ -1,35 +0,0 @@ - - {+data.name+} - {+data.memberOf+} - {+data.isStatic+} - {+data.isa+} - {+data.desc+} - {+data.classDesc+} - - - - {+method.name+} - {+method.memberOf+} - {+method.isStatic+} - {+method.desc+} - - - {+param.type+} - {+param.name+} - {+param.desc+} - {+param.defaultValue+} - - - - - - - - {+property.name+} - {+property.memberOf+} - {+property.isStatic+} - {+property.desc+} - {+property.type+} - - -