Skip to content

Reorganization [part 2] #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 39 commits into from
Nov 16, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
ba421a8
mv topojsons to src/assets/topojson
etpinard Nov 11, 2015
edb54d3
put all trace modules into src/traces/*/
etpinard Nov 11, 2015
03fd865
put constants files into src/constants/
etpinard Nov 11, 2015
db76f02
put events.js & queue.js in lib/ rename plotly_util --> svg_text_utils
etpinard Nov 11, 2015
ce39cf5
put plot components into src/components/
etpinard Nov 11, 2015
97cb7bb
break up graph_obj.js:
etpinard Nov 11, 2015
942e49e
put plot-type-specific lib functions in lib/
etpinard Nov 11, 2015
dd7ccc5
change path to geo assets index file
etpinard Nov 11, 2015
edae224
put plot_schema in plot_api/
etpinard Nov 11, 2015
df06911
break lib.js into smaller lib modules:
etpinard Nov 11, 2015
4181e97
split color attributes into attribute.js file
etpinard Nov 11, 2015
f842118
make attributes files require in attributes file directly:
etpinard Nov 11, 2015
01ee254
update colorbar Plotly.Plots.titles --> Plotly.Title.draw
etpinard Nov 11, 2015
2d40132
fix choropleth plot params --> constants
etpinard Nov 11, 2015
865476a
mv geo module to plots/geo :
etpinard Nov 11, 2015
968257e
put gl2d modules in src/plots/gl2d/
etpinard Nov 11, 2015
ff7c994
put gl3d module in plots/gl3d/ :
etpinard Nov 11, 2015
9edbce3
break attributes from axes.js
etpinard Nov 11, 2015
769f6dd
put graph_interact in plots/cartesian
etpinard Nov 11, 2015
914dcbf
put polar modules in plots/polar
etpinard Nov 11, 2015
c833198
re-org plotly.js
etpinard Nov 11, 2015
4f57bff
fix paths + lint
etpinard Nov 11, 2015
3349e7b
fix paths in jamsine tests
etpinard Nov 11, 2015
d3087b1
add index file exporting only API Plotly methods:
etpinard Nov 12, 2015
55e203a
mv plots/plots/* to plots/* :
etpinard Nov 12, 2015
4fd274a
mv colorscale attributes out of colorbar/ into colorscale/
etpinard Nov 12, 2015
ad49e57
be more consistent about attribute file names:
etpinard Nov 12, 2015
9d2568d
rm check for Plotly.ErrorBars (rm sub-bundles for now)
etpinard Nov 12, 2015
94a450c
rm check for Plotly.Queue:
etpinard Nov 12, 2015
f8ce24a
lint
etpinard Nov 12, 2015
f49923f
Merge branch 'master' into reorg-src
etpinard Nov 13, 2015
7150055
add postinstall hook to preprocess plot css and icons on install
etpinard Nov 15, 2015
ce393fb
make Snapshot and PlotSchema to 'beta' exposed methods
etpinard Nov 15, 2015
dd8b3d3
mv plot_config to plot_api/
etpinard Nov 15, 2015
6d0e221
add Plotly.setPlotConfig to API:
etpinard Nov 15, 2015
a2c72ed
change inner module pattern:
etpinard Nov 15, 2015
2de1313
jshintrc copied from streambed
alexcjohnson Nov 15, 2015
6c279ee
update jshintrc:
etpinard Nov 16, 2015
4491321
add jshint devDep and 'run lint' script
etpinard Nov 16, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
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