Skip to content

Commit

Permalink
Merge pull request #2 from plotly/reorg-src
Browse files Browse the repository at this point in the history
Reorganization [part 2]
  • Loading branch information
etpinard committed Nov 16, 2015
2 parents ad6f080 + 4491321 commit c3c71e6
Show file tree
Hide file tree
Showing 158 changed files with 7,642 additions and 7,363 deletions.
72 changes: 72 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
// environments
"browser": true, // Define globals exposed by modern browsers.
"jquery": false, // Define globals exposed by jQuery.
"node": true, // Define globals exposed by Node.js.
"jasmine": true, // Define globals exposed by jasmine

// enforcing (true means bug us about it)
"camelcase": false, // Force all variable names to use either camelCase style or UPPER_CASE with underscores.
"curly": false, // This option requires you to always put curly braces around blocks in loops and conditionals.
"eqeqeq": true, // Prohibit use of == and != in favor of === and !==.
"es3": true, // This option tells JSHint that your code needs to adhere to ECMAScript 3 spec (old browsers)
"forin": false, // This option requires all for in loops to filter object's items.
"freeze": true, // This options prohibits overwriting prototypes of native objects such as Array, Date and so on.
"immed": true, // This option prohibits the use of immediate function invocations without wrapping them in parentheses.
"indent": 4, // Enforce tab width of 4 spaces.
"latedef": "nofunc", // Prohibit use of a variable before it is defined.
"maxcomplexity": false, // This option lets you control cyclomatic complexity throughout your code.
"maxdepth": 6, // This option lets you control how nested do you want your blocks to be
"maxlen": 120, // Enforce line length to 120 characters
"newcap": true, // Require capitalized names for constructor functions.
"noarg": true, // This option prohibits the use of arguments.caller and arguments.callee.
"noempty": true, // This option warns when you have an empty block in your code.
"nonbsp": true, // This option warns about "non-breaking whitespace" characters.
"nonew": true, // This option prohibits the use of constructor functions for side-effects.
"plusplus": false, // This option prohibits the use of unary increment and decrement operators.
"quotmark": "single", // Enforce use of single quotation marks for strings.
"strict": true, // Enforce placing 'use strict' at the top function scope
"trailing": true, // Prohibit trailing whitespace.
"undef": true, // Prohibit use of explicitly undeclared variables.
"unused": true, // Warn when variables are defined but never used.

// relaxing (true means DON'T bug us about it)
"asi": false, // This option suppresses warnings about missing semicolons.
"boss": false, // This option suppresses warnings about the use of assignments in cases where comparisons are expected.
"debug": false, // This option suppresses warnings about the debugger statements in your code.
"eqnull": true, // Suppress warnings about == null comparisons.
"esnext": true, // This option tells JSHint that your code uses ECMAScript 6 specific syntax.
"evil": false, // This option suppresses warnings about the use of eval.
"expr": false, // This option suppresses warnings about the use of expressions where normally you would expect to see assignments or function calls.
"funcscope": false, // This option suppresses warnings about declaring variables inside of control structures while accessing them later from the outside.
"globalstrict": false, // This option suppresses warnings about the use of global strict mode.
"iterator": false, // This option suppresses warnings about the __iterator__ property.
"lastsemic": false, // This option suppresses warnings about missing semicolons
"laxbreak": false, // This option suppresses most of the warnings about possibly unsafe line breakings in your code.
"laxcomma": false, // This option suppresses warnings about comma-first coding style
"loopfunc": false, // This option suppresses warnings about functions inside of loops.
"maxerr": 500, // This options allows you to set the maximum amount of warnings JSHint will produce before giving up.
"moz": false, // This options tells JSHint that your code uses Mozilla JavaScript extensions.
"multistr": false, // This option suppresses warnings about multi-line strings.
"notypeof": false, // This option suppresses warnings about invalid typeof operator values.
"proto": false, // This option suppresses warnings about the __proto__ property.
"scripturl": false, // This option suppresses warnings about the use of script-targeted URLs—such as javascript:...
"shadow": false, // This option suppresses warnings about variable shadowing
"sub": false, // This option suppresses warnings about using [] notation when it can be expressed in dot notation
"supernew": false, // This option suppresses warnings about "weird" constructions like new function () { ... } and new Object;
"validthis": false, // This option suppresses warnings about possible strict violations when the code is running in strict mode
"noyield": false, // This option suppresses warnings about generator functions with no yield statement in them.

// global pre defined variables
"predef": [
"JSON",
"Uint8Array",
"Uint16Array",
"Uint32Array",
"Int8Array",
"Int16Array",
"Int32Array",
"Float32Array",
"Float64Array"
]
}
2 changes: 1 addition & 1 deletion devtools/test_dashboard/test-geo.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var plotButtons = require('./buttons');

var figDir = '../../test/image/baseline/geo_';
var figDir = '../../test/image/baselines/geo_';

var plots = {};

Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"description": "The premier javascript graphing library",
"license": "MIT",
"main": "./src/plotly.js",
"main": "./src/index.js",
"repository": {
"type": "git",
"url": "https://github.com/plotly/plotly.js.git"
Expand Down Expand Up @@ -43,9 +43,11 @@
],
"scripts": {
"preprocess": "node tasks/preprocess.js",
"postinstall": "npm run preprocess",
"bundle": "node tasks/bundle.js",
"build": "npm run preprocess && npm run bundle",
"watch": "node tasks/watch_plotly.js",
"lint": "cd src && jshint . || true",
"test-jasmine": "karma start test/jasmine/karma.conf.js",
"test-image": "echo TODO",
"test": "npm run test-jasmine && npm test-image",
Expand Down Expand Up @@ -97,6 +99,7 @@
"browserify-transform-tools": "^1.5.0",
"ecstatic": "^1.2.0",
"jasmine-core": "^2.3.4",
"jshint": "^2.8.0",
"karma": "^0.13.15",
"karma-browserify": "^4.4.0",
"karma-chrome-launcher": "^0.2.1",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
49 changes: 49 additions & 0 deletions src/components/annotations/arrow_paths.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/**
* centerx is a center of scaling tuned for maximum scalability of
* the arrowhead ie throughout mag=0.3..3 the head is joined smoothly
* to the line, but the endpoint moves.
* backoff is the distance to move the arrowhead, and the end of the
* line, in order to end at the right place
*
* TODO: option to have the pointed-to point a little in front of the
* end of the line, as people tend to want a bit of a gap there...
*/
module.exports = [
// no arrow
'',
// wide with flat back
{
path: 'M-2.4,-3V3L0.6,0Z',
backoff: 0.6
},
// narrower with flat back
{
path: 'M-3.7,-2.5V2.5L1.3,0Z',
backoff: 1.3
},
// barbed
{
path: 'M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z',
backoff: 1.55
},
// wide line-drawn
{
path: 'M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z',
backoff: 1.6
},
// narrower line-drawn
{
path: 'M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z',
backoff: 2
},
// circle
{
path: 'M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z',
backoff: 0
},
// square
{
path: 'M2,2V-2H-2V2Z',
backoff: 0
}
];
Loading

0 comments on commit c3c71e6

Please sign in to comment.