Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
375dc28a
Commit
375dc28a
authored
Aug 30, 2016
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change order drawing edges
parent
019ceb58
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
69 deletions
+37
-69
common/Charts/ChartsDrawer.js
common/Charts/ChartsDrawer.js
+37
-69
No files found.
common/Charts/ChartsDrawer.js
View file @
375dc28a
...
...
@@ -12032,100 +12032,68 @@ CSortFaces.prototype =
}
/*var getFirst = function()
var
g
=
res2
;
var
color
=
{};
// цвет вершины (0, 1, или 2)
var
time_in
=
{},
time_out
=
{};
// "времена" захода и выхода из вершины
var
dfs_timer
=
0
;
var
dfs
=
function
(
v
)
{
var result = null;
for(var i = 0; i < cubs.length; i++)
time_in
[
v
]
=
dfs_timer
++
;
color
[
v
]
=
1
;
for
(
var
i
in
g
[
v
])
{
if
((res[i] === undefined || res[i].length === 0) && !firstAr
r[i])
if
(
!
colo
r
[
i
])
{
result = parseInt(i);
break;
dfs
(
i
);
}
}
return result;
};
color
[
v
]
=
2
;
time_out
[
v
]
=
dfs_timer
++
;
}
var getLast = function(
)
for
(
var
i
=
0
;
i
<
startIndexs
.
length
;
i
++
)
{
var result = null;
for(var i = 0; i < cubs.length; i++)
{
if((res2[i] === undefined || res2[i].length === 0) && !firstArr[i])
{
result = parseInt(i);
break;
}
}
return result;
};
dfs
(
startIndexs
[
i
].
index
);
}
var cleanStartIndex = function(startIndex)
{
res2.splice(startIndex, 1);
for(var i = 0; i < res.length; i++)
{
if(res[i] && res[i][startIndex])
{
res[i].splice(startIndex, 1);
}
}
};
var cleanLastIndex = function(lastIndex)
var
addIndexes
=
{};
var
getMax
=
function
()
{
res.splice(lastIndex, 1);
for(var i = 0; i < res2.length; i++)
var
max
=
0
;
var
res
=
null
;
for
(
var
i
in
time_out
)
{
if(
res2[i] && res2[i][lastIndex]
)
if
(
!
addIndexes
[
i
]
&&
time_out
[
i
]
>
max
)
{
res2[i].splice(lastIndex, 1);
max
=
time_out
[
i
];
res
=
i
;
}
}
return
res
;
};
var
firstMainArray = []
;
var
lastMainArray
= [];
var
i
=
0
;
var
test
=
[];
var firstArr = {};
var lastArr = {};
var arr1 = [];
var arr2 = [];
while
(
true
)
{
var startIndex = getFirst();
var lastIndex = getLast();
var
index
=
getMax
();
if(null !== startIndex)
{
firstMainArray.push({nextIndex: startIndex});
}
if(null !== lastIndex)
{
lastMainArray.push({nextIndex: lastIndex});
}
firstArr[startIndex] = 1;
firstArr[lastIndex] = 1;
cleanStartIndex(startIndex);
cleanLastIndex(lastIndex);
if(res.length === 0 && res2.length === 0)
if
(
null
===
index
)
{
break
;
}
test
.
push
({
nextIndex
:
index
});
addIndexes
[
index
]
=
1
;
}
lastMainArray = lastMainArray.reverse()
var mainTest = lastMainArray.concat(firstMainArray);*/
//return mainTest;
return
test
.
reverse
();
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment