Skip to content
Snippets Groups Projects
Commit 393179f8 authored by Lauri Himanen's avatar Lauri Himanen
Browse files

Fixed issues with viewers.

parent d442cedc
No related branches found
No related tags found
No related merge requests found
Pipeline #135417 skipped
Source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -367,31 +367,11 @@ class StructureViewerWrapper {
// Determine the periodic indices
let nPeriodic = 0;
let periodicIndices = [];
let p1 = periodicity[0];
let p2 = periodicity[1];
let p3 = periodicity[2];
if (p1 && p2 && p3) {
nPeriodic = 3;
} else if (!p1 && !p2 && !p3) {
nPeriodic = 0;
} else {
for (let dim = 0; dim < 3; ++dim) {
let p1 = periodicity[dim];
let p2 = periodicity[(dim+1) % 3];
let p3 = periodicity[(dim+2) % 3];
if (p1 && !p2 && !p3) {
nPeriodic = 1;
periodicIndices.push(dim)
break;
}
else if (p1 && p2 && !p3) {
nPeriodic = 2;
periodicIndices.push(dim);
periodicIndices.push((dim+1) % 3);
break;
}
}
for (let i = 0; i < 3; ++i) {
if (periodicity[i]) {
periodicIndices.push(i)
++nPeriodic
}
}
/**
......@@ -407,7 +387,6 @@ class StructureViewerWrapper {
return multiplier
}
// 2D:
if (nPeriodic == 2) {
let dim1 = periodicIndices[0]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment