Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
danilosalvati committed Mar 23, 2019
2 parents 3b34794 + d72f9e3 commit 4e99a99
Show file tree
Hide file tree
Showing 13 changed files with 59 additions and 14 deletions.
2 changes: 2 additions & 0 deletions demo/dist/37cefb9b14a5dabb56df.app.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions demo/dist/37cefb9b14a5dabb56df.app.js.map

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions demo/dist/6b94cd3f66e35597e6af.app.js

This file was deleted.

1 change: 0 additions & 1 deletion demo/dist/6b94cd3f66e35597e6af.app.js.map

This file was deleted.

2 changes: 1 addition & 1 deletion demo/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
alt="Fork me on GitHub"
data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png"/>
</a>
<script type="text/javascript" src="d591705cb70e17587c16.vendor.js"></script><script type="text/javascript" src="6b94cd3f66e35597e6af.app.js"></script></body>
<script type="text/javascript" src="d591705cb70e17587c16.vendor.js"></script><script type="text/javascript" src="37cefb9b14a5dabb56df.app.js"></script></body>
</html>
6 changes: 4 additions & 2 deletions es/class/line.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ var Line = function () {

//add splitted lines to the original line's group
var lineGroups = state.getIn(['scene', 'groups']).filter(function (group) {
return group.getIn(['elements', layerID, 'lines']).contains(lineID);
var lines = group.getIn(['elements', layerID, 'lines']);
return lines && lines.contains(lineID);
});

lineGroups.forEach(function (group) {
Expand Down Expand Up @@ -593,7 +594,8 @@ var Line = function () {

var lineGroups = state //get groups membership if present
.getIn(['scene', 'groups']).filter(function (group) {
return group.getIn(['elements', layerID, 'lines']).contains(lineID);
var lines = group.getIn(['elements', layerID, 'lines']);
return lines && lines.contains(lineID);
});

state = Layer.mergeEqualsVertices(state, layerID, line.vertices.get(0)).updatedState;
Expand Down
3 changes: 2 additions & 1 deletion es/class/vertex.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ var Vertex = function () {
var lineProps = reducedState.getIn(['scene', 'layers', layerID, 'lines', lineID, 'properties']);
var lineGroups = reducedState //get groups membership if present
.getIn(['scene', 'groups']).filter(function (group) {
return group.getIn(['elements', layerID, 'lines']).contains(lineID);
var lines = group.getIn(['elements', layerID, 'lines']);
return lines && lines.contains(lineID);
});

reducedState = Layer.removeZeroLengthLines(reducedState, layerID).updatedState;
Expand Down
30 changes: 30 additions & 0 deletions es/styles/tabs.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.react-tabs__tab-list {
border-bottom: 1px solid #aaa;
margin: 0 0 10px;
padding: 0;
}

.react-tabs__tab {
display: inline-block;
border: 1px solid transparent;
border-bottom: none;
bottom: -1px;
position: relative;
list-style: none;
padding: 6px 12px;
cursor: pointer;
}

.react-tabs__tab--selected, .react-tabs__tab:focus {
border-color: #aaa;
color: #1CA6FC;
outline: none;
}

.react-tabs__tab-panel {
display: none;
}

.react-tabs__tab-panel--selected {
display: block;
}
6 changes: 4 additions & 2 deletions lib/class/line.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ var Line = function () {

//add splitted lines to the original line's group
var lineGroups = state.getIn(['scene', 'groups']).filter(function (group) {
return group.getIn(['elements', layerID, 'lines']).contains(lineID);
var lines = group.getIn(['elements', layerID, 'lines']);
return lines && lines.contains(lineID);
});

lineGroups.forEach(function (group) {
Expand Down Expand Up @@ -603,7 +604,8 @@ var Line = function () {

var lineGroups = state //get groups membership if present
.getIn(['scene', 'groups']).filter(function (group) {
return group.getIn(['elements', layerID, 'lines']).contains(lineID);
var lines = group.getIn(['elements', layerID, 'lines']);
return lines && lines.contains(lineID);
});

state = _export.Layer.mergeEqualsVertices(state, layerID, line.vertices.get(0)).updatedState;
Expand Down
3 changes: 2 additions & 1 deletion lib/class/vertex.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ var Vertex = function () {
var lineProps = reducedState.getIn(['scene', 'layers', layerID, 'lines', lineID, 'properties']);
var lineGroups = reducedState //get groups membership if present
.getIn(['scene', 'groups']).filter(function (group) {
return group.getIn(['elements', layerID, 'lines']).contains(lineID);
var lines = group.getIn(['elements', layerID, 'lines']);
return lines && lines.contains(lineID);
});

reducedState = _export2.Layer.removeZeroLengthLines(reducedState, layerID).updatedState;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"start": "webpack-dev-server --inline --config demo/webpack.config.js --port 9000 --mode development",
"build-demo": "webpack --config demo/webpack.config.js --mode production",
"build-commonjs": "cross-env BABEL_ENV=commonjs babel src --out-dir lib",
"build-es": "cross-env BABEL_ENV=es babel src --out-dir es",
"build-es": "cross-env BABEL_ENV=es babel src --copy-files --out-dir es",
"build": "npm run clean && npm run build-demo && npm run build-commonjs && npm run build-es",
"add-build-to-vcs": "git add -A src/version.js && git add -A es && git add -A lib && git add -A demo/dist",
"clean": "rimraf lib es demo/dist",
Expand Down
10 changes: 8 additions & 2 deletions src/class/line.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ class Line{
//add splitted lines to the original line's group
let lineGroups = state
.getIn(['scene', 'groups'])
.filter( group => group.getIn(['elements', layerID, 'lines']).contains(lineID) );
.filter( group => {
const lines = group.getIn(['elements', layerID, 'lines']);
return lines && lines.contains(lineID);
});

lineGroups.forEach( group => {
state = Group.addElement( state, group.id, layerID, 'lines', line0.id ).updatedState;
Expand Down Expand Up @@ -481,7 +484,10 @@ class Line{

let lineGroups = state //get groups membership if present
.getIn(['scene', 'groups'])
.filter( group => group.getIn(['elements', layerID, 'lines']).contains(lineID) );
.filter( group => {
const lines = group.getIn(['elements', layerID, 'lines']);
return lines && lines.contains(lineID);
});

state = Layer.mergeEqualsVertices( state, layerID, line.vertices.get(0) ).updatedState;
state = Layer.mergeEqualsVertices( state, layerID, line.vertices.get(1) ).updatedState;
Expand Down
5 changes: 4 additions & 1 deletion src/class/vertex.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,10 @@ class Vertex{
let lineProps = reducedState.getIn(['scene', 'layers', layerID, 'lines', lineID, 'properties']);
let lineGroups = reducedState //get groups membership if present
.getIn(['scene', 'groups'])
.filter( group => group.getIn(['elements', layerID, 'lines']).contains(lineID) );
.filter( group => {
const lines = group.getIn(['elements', layerID, 'lines']);
return lines && lines.contains(lineID);
});

reducedState = Layer.removeZeroLengthLines( reducedState, layerID ).updatedState;
reducedState = Layer.mergeEqualsVertices( reducedState, layerID, vertexID ).updatedState;
Expand Down

0 comments on commit 4e99a99

Please sign in to comment.