diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..facd180 --- /dev/null +++ b/.babelrc @@ -0,0 +1,3 @@ +{ + "presets": ["es2015", "react"] +} \ No newline at end of file diff --git a/.buildpacks b/.buildpacks deleted file mode 100644 index 1cf2c2d..0000000 --- a/.buildpacks +++ /dev/null @@ -1,2 +0,0 @@ -https://github.com/heroku/heroku-buildpack-nodejs -https://github.com/aguestuser/heroku-buildpack-webpack diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 27b21bf..0000000 --- a/.eslintrc +++ /dev/null @@ -1,34 +0,0 @@ -{ - "parser": "babel-eslint", - "env": { - "browser": true, - "es6": true, - "node": true, - "mocha": true - }, - "ecmaFeatures": { - "arrowFunctions": true, - "blockBindings": true, - "classes": true, - "defaultParams": true, - "destructuring": true, - "forOf": true, - "generators": true, - "modules": true, - "spread": true, - "templateStrings": true, - "jsx": true - }, - "rules": { - "consistent-return": [0], - "key-spacing": [0], - "quotes": [0], - "new-cap": [0], - "no-multi-spaces": [0], - "no-shadow": [0], - "no-unused-vars": [1], - "no-use-before-define": [2, "nofunc"], - "curly": [2, "multi-line"], - "camelcase": [2, {"properties": "never"}] - } -} diff --git a/.tern-project b/.tern-project deleted file mode 100644 index 081cbd5..0000000 --- a/.tern-project +++ /dev/null @@ -1,13 +0,0 @@ -{ - "defs": [ - "browser", - "ecma5", - "ecma6" - ], - "dontLoad": [ - "node_modules/**" - ], - "plugins": { - "node": true - } -} diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..aff917c --- /dev/null +++ b/.travis.yml @@ -0,0 +1,4 @@ +language: node_js + +node_js: + - "6.0.0" \ No newline at end of file diff --git a/app/CaptionDisplaySettings.js b/app/CaptionDisplaySettings.js index dc253fc..084d8b3 100644 --- a/app/CaptionDisplaySettings.js +++ b/app/CaptionDisplaySettings.js @@ -5,8 +5,9 @@ module.exports = { selectFillColor: "#0f0", textOpacity: { "normal": 1, + "editable": 1, "highlighted": 1, - "faded": 0.2 + "faded": 0.5 }, highlightOpacity: 0.5, selectOpacity: 0.5 diff --git a/app/EdgeDisplaySettings.js b/app/EdgeDisplaySettings.js index 6be7627..71b9215 100644 --- a/app/EdgeDisplaySettings.js +++ b/app/EdgeDisplaySettings.js @@ -2,22 +2,26 @@ module.exports = { curveStrength: 0.5, lineColor: { normal: "#999", + editable: "#999", highlighted: "#999", - faded: "#ddd" + faded: "#aaa" }, textColor: { normal: "#999", + editable: "#444", highlighted: "#444", - faded: "#ddd" + faded: "#aaa" }, bgColor: { normal: "#fff", + editable: "#ff9800", highlighted: "#ff0", faded: "#fff" }, selectColor: "#0f0", bgOpacity: { normal: 0, + editable: 0.5, highlighted: 0.5, faded: 0 }, diff --git a/app/NodeDisplaySettings.js b/app/NodeDisplaySettings.js index fb2a8aa..58d550f 100644 --- a/app/NodeDisplaySettings.js +++ b/app/NodeDisplaySettings.js @@ -7,39 +7,46 @@ module.exports = { cornerRadius: 5, circleColor: { normal: "#ccc", + editable: "#ccc", highlighted: "#ccc", faded: "#ccc" }, textColor: { normal: "#000", + editable: "#000", highlighted: "#000", faded: "#000" }, textOpacity: { normal: 1, + editable: 1, highlighted: 1, - faded: 0.2 + faded: 0.5 }, bgColor: { normal: "#fff", + editable: "#ff9800", highlighted: "#ff0", faded: "#fff" }, selectColor: "#0f0", bgOpacity: { normal: 0, - highlighted: 0.5, + editable: 0.75, + highlighted: 0.75, faded: 0 }, imageOpacity: { normal: 1, + editable: 1, highlighted: 1, - faded: 0.2 + faded: 0.5 }, circleOpacity: { normal: 1, + editable: 1, highlighted: 1, - faded: 0.2 + faded: 0.5 }, bgRadiusDiff: 4, selectionRadiusDiff: 10 diff --git a/app/actions.js b/app/actions.js index e5e7e20..9b9f77f 100644 --- a/app/actions.js +++ b/app/actions.js @@ -50,6 +50,7 @@ export const SET_TITLE = 'SET_TITLE'; export const SET_SETTINGS = 'SET_SETTINGS'; export const TOGGLE_HELP_SCREEN = 'TOGGLE_HELP_SCREEN'; export const TOGGLE_SETTINGS = 'TOGGLE_SETTINGS'; +export const TOGGLE_NODE_SELECTABLE = 'TOGGLE_NODE_SELECTABLE'; /* * action creators @@ -184,8 +185,8 @@ export function layoutCircle() { return { type: LAYOUT_CIRCLE }; } -export function setHighlights(highlights, otherwiseFaded = false) { - return { type: SET_HIGHLIGHTS, highlights, otherwiseFaded }; +export function setHighlights(highlights, otherwiseFaded = false, showEditTools, allowEditNodes) { + return { type: SET_HIGHLIGHTS, highlights, otherwiseFaded, showEditTools, allowEditNodes }; } export function clearHighlights() { @@ -247,4 +248,8 @@ export function toggleHelpScreen(value) { export function toggleSettings(value) { return { type: TOGGLE_SETTINGS, value }; +} + +export function toggleNodeSelectable(value) { + return { type: TOGGLE_NODE_SELECTABLE, value }; } \ No newline at end of file diff --git a/app/components/ChangeColorInput.jsx b/app/components/ChangeColorInput.jsx index d0773c9..2bfea99 100644 --- a/app/components/ChangeColorInput.jsx +++ b/app/components/ChangeColorInput.jsx @@ -38,17 +38,17 @@ export default class ChangeColorInput extends BaseComponent { render() { return ( -