Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c3c71e6

Browse filesBrowse files
committed
Merge pull request #2 from plotly/reorg-src
Reorganization [part 2]
2 parents ad6f080 + 4491321 commit c3c71e6
Copy full SHA for c3c71e6

File tree

Expand file treeCollapse file tree

158 files changed

+7642
-7363
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

158 files changed

+7642
-7363
lines changed

‎.jshintrc

Copy file name to clipboard
+72Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
// environments
3+
"browser": true, // Define globals exposed by modern browsers.
4+
"jquery": false, // Define globals exposed by jQuery.
5+
"node": true, // Define globals exposed by Node.js.
6+
"jasmine": true, // Define globals exposed by jasmine
7+
8+
// enforcing (true means bug us about it)
9+
"camelcase": false, // Force all variable names to use either camelCase style or UPPER_CASE with underscores.
10+
"curly": false, // This option requires you to always put curly braces around blocks in loops and conditionals.
11+
"eqeqeq": true, // Prohibit use of == and != in favor of === and !==.
12+
"es3": true, // This option tells JSHint that your code needs to adhere to ECMAScript 3 spec (old browsers)
13+
"forin": false, // This option requires all for in loops to filter object's items.
14+
"freeze": true, // This options prohibits overwriting prototypes of native objects such as Array, Date and so on.
15+
"immed": true, // This option prohibits the use of immediate function invocations without wrapping them in parentheses.
16+
"indent": 4, // Enforce tab width of 4 spaces.
17+
"latedef": "nofunc", // Prohibit use of a variable before it is defined.
18+
"maxcomplexity": false, // This option lets you control cyclomatic complexity throughout your code.
19+
"maxdepth": 6, // This option lets you control how nested do you want your blocks to be
20+
"maxlen": 120, // Enforce line length to 120 characters
21+
"newcap": true, // Require capitalized names for constructor functions.
22+
"noarg": true, // This option prohibits the use of arguments.caller and arguments.callee.
23+
"noempty": true, // This option warns when you have an empty block in your code.
24+
"nonbsp": true, // This option warns about "non-breaking whitespace" characters.
25+
"nonew": true, // This option prohibits the use of constructor functions for side-effects.
26+
"plusplus": false, // This option prohibits the use of unary increment and decrement operators.
27+
"quotmark": "single", // Enforce use of single quotation marks for strings.
28+
"strict": true, // Enforce placing 'use strict' at the top function scope
29+
"trailing": true, // Prohibit trailing whitespace.
30+
"undef": true, // Prohibit use of explicitly undeclared variables.
31+
"unused": true, // Warn when variables are defined but never used.
32+
33+
// relaxing (true means DON'T bug us about it)
34+
"asi": false, // This option suppresses warnings about missing semicolons.
35+
"boss": false, // This option suppresses warnings about the use of assignments in cases where comparisons are expected.
36+
"debug": false, // This option suppresses warnings about the debugger statements in your code.
37+
"eqnull": true, // Suppress warnings about == null comparisons.
38+
"esnext": true, // This option tells JSHint that your code uses ECMAScript 6 specific syntax.
39+
"evil": false, // This option suppresses warnings about the use of eval.
40+
"expr": false, // This option suppresses warnings about the use of expressions where normally you would expect to see assignments or function calls.
41+
"funcscope": false, // This option suppresses warnings about declaring variables inside of control structures while accessing them later from the outside.
42+
"globalstrict": false, // This option suppresses warnings about the use of global strict mode.
43+
"iterator": false, // This option suppresses warnings about the __iterator__ property.
44+
"lastsemic": false, // This option suppresses warnings about missing semicolons
45+
"laxbreak": false, // This option suppresses most of the warnings about possibly unsafe line breakings in your code.
46+
"laxcomma": false, // This option suppresses warnings about comma-first coding style
47+
"loopfunc": false, // This option suppresses warnings about functions inside of loops.
48+
"maxerr": 500, // This options allows you to set the maximum amount of warnings JSHint will produce before giving up.
49+
"moz": false, // This options tells JSHint that your code uses Mozilla JavaScript extensions.
50+
"multistr": false, // This option suppresses warnings about multi-line strings.
51+
"notypeof": false, // This option suppresses warnings about invalid typeof operator values.
52+
"proto": false, // This option suppresses warnings about the __proto__ property.
53+
"scripturl": false, // This option suppresses warnings about the use of script-targeted URLs—such as javascript:...
54+
"shadow": false, // This option suppresses warnings about variable shadowing
55+
"sub": false, // This option suppresses warnings about using [] notation when it can be expressed in dot notation
56+
"supernew": false, // This option suppresses warnings about "weird" constructions like new function () { ... } and new Object;
57+
"validthis": false, // This option suppresses warnings about possible strict violations when the code is running in strict mode
58+
"noyield": false, // This option suppresses warnings about generator functions with no yield statement in them.
59+
60+
// global pre defined variables
61+
"predef": [
62+
"JSON",
63+
"Uint8Array",
64+
"Uint16Array",
65+
"Uint32Array",
66+
"Int8Array",
67+
"Int16Array",
68+
"Int32Array",
69+
"Float32Array",
70+
"Float64Array"
71+
]
72+
}

‎devtools/test_dashboard/test-geo.js

Copy file name to clipboardExpand all lines: devtools/test_dashboard/test-geo.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var plotButtons = require('./buttons');
22

3-
var figDir = '../../test/image/baseline/geo_';
3+
var figDir = '../../test/image/baselines/geo_';
44

55
var plots = {};
66

‎package.json

Copy file name to clipboardExpand all lines: package.json
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.0.0",
44
"description": "The premier javascript graphing library",
55
"license": "MIT",
6-
"main": "./src/plotly.js",
6+
"main": "./src/index.js",
77
"repository": {
88
"type": "git",
99
"url": "https://github.com/plotly/plotly.js.git"
@@ -43,9 +43,11 @@
4343
],
4444
"scripts": {
4545
"preprocess": "node tasks/preprocess.js",
46+
"postinstall": "npm run preprocess",
4647
"bundle": "node tasks/bundle.js",
4748
"build": "npm run preprocess && npm run bundle",
4849
"watch": "node tasks/watch_plotly.js",
50+
"lint": "cd src && jshint . || true",
4951
"test-jasmine": "karma start test/jasmine/karma.conf.js",
5052
"test-image": "echo TODO",
5153
"test": "npm run test-jasmine && npm test-image",
@@ -97,6 +99,7 @@
9799
"browserify-transform-tools": "^1.5.0",
98100
"ecstatic": "^1.2.0",
99101
"jasmine-core": "^2.3.4",
102+
"jshint": "^2.8.0",
100103
"karma": "^0.13.15",
101104
"karma-browserify": "^4.4.0",
102105
"karma-chrome-launcher": "^0.2.1",
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+49Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/**
2+
* centerx is a center of scaling tuned for maximum scalability of
3+
* the arrowhead ie throughout mag=0.3..3 the head is joined smoothly
4+
* to the line, but the endpoint moves.
5+
* backoff is the distance to move the arrowhead, and the end of the
6+
* line, in order to end at the right place
7+
*
8+
* TODO: option to have the pointed-to point a little in front of the
9+
* end of the line, as people tend to want a bit of a gap there...
10+
*/
11+
module.exports = [
12+
// no arrow
13+
'',
14+
// wide with flat back
15+
{
16+
path: 'M-2.4,-3V3L0.6,0Z',
17+
backoff: 0.6
18+
},
19+
// narrower with flat back
20+
{
21+
path: 'M-3.7,-2.5V2.5L1.3,0Z',
22+
backoff: 1.3
23+
},
24+
// barbed
25+
{
26+
path: 'M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z',
27+
backoff: 1.55
28+
},
29+
// wide line-drawn
30+
{
31+
path: 'M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z',
32+
backoff: 1.6
33+
},
34+
// narrower line-drawn
35+
{
36+
path: 'M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z',
37+
backoff: 2
38+
},
39+
// circle
40+
{
41+
path: 'M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z',
42+
backoff: 0
43+
},
44+
// square
45+
{
46+
path: 'M2,2V-2H-2V2Z',
47+
backoff: 0
48+
}
49+
];

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.