Commit 8397b280 authored by esanroman's avatar esanroman
Browse files

fix multipipe to top

parent ee055bea
......@@ -174,25 +174,27 @@ export class DummyPipe extends Pipe {
*/
setTempType(type, nextPipe) {
if (matchTypes(this.tempType, type)) {
this.tempType = typeCompare(this.tempType, type);
if (type == VALUES_TYPES.POINT){
this.multipipeTypes = [VALUES_TYPES.NUMBER, VALUES_TYPES.NUMBER];
this.multipipeConstruction = [[VALUES_TYPES.NUMBER], [VALUES_TYPES.NUMBER]]
} else if (type == VALUES_TYPES.MULTIPIPE_OUT || type == 'MULTIPIPE') {
if (this.tempInDirection == nextPipe.dir) {
//si entra aca es porque el next es el que le envía la info
if (nextPipe.pipe.multipipeConstruction.length > 1){
this.multipipeConstruction = nextPipe.pipe.multipipeConstruction;
var lefType = nextPipe.pipe.multipipeConstruction[0].length > 1 ? 'MULTIPIPE_OUT' : nextPipe.pipe.multipipeConstruction[0][0]
var rightType = nextPipe.pipe.multipipeConstruction[1].length > 1 ? 'MULTIPIPE_OUT' : nextPipe.pipe.multipipeConstruction[1][0]
this.multipipeTypes = [lefType, rightType];
} else if (nextPipe.pipe.multipipeConstruction.length == 1) {
this.tempType = nextPipe.pipe.multipipeConstruction[0]
this.multipipeConstruction = nextPipe.pipe.multipipeConstruction[0];
if (this.tempInDirection == nextPipe.dir){
this.tempType = typeCompare(this.tempType, type);
if (type == VALUES_TYPES.POINT){
this.multipipeTypes = [VALUES_TYPES.NUMBER, VALUES_TYPES.NUMBER];
this.multipipeConstruction = [[VALUES_TYPES.NUMBER], [VALUES_TYPES.NUMBER]]
} else if (type == VALUES_TYPES.MULTIPIPE_OUT || type == 'MULTIPIPE') {
if (this.tempInDirection == nextPipe.dir) {
//si entra aca es porque el next es el que le envía la info
if (nextPipe.pipe.multipipeConstruction.length > 1){
this.multipipeConstruction = nextPipe.pipe.multipipeConstruction;
var lefType = nextPipe.pipe.multipipeConstruction[0].length > 1 ? 'MULTIPIPE_OUT' : nextPipe.pipe.multipipeConstruction[0][0]
var rightType = nextPipe.pipe.multipipeConstruction[1].length > 1 ? 'MULTIPIPE_OUT' : nextPipe.pipe.multipipeConstruction[1][0]
this.multipipeTypes = [lefType, rightType];
} else if (nextPipe.pipe.multipipeConstruction.length == 1) {
this.tempType = nextPipe.pipe.multipipeConstruction[0]
this.multipipeConstruction = nextPipe.pipe.multipipeConstruction[0];
}
}
} else {
this.multipipeConstruction = type
}
} else {
this.multipipeConstruction = type
}
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment