mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-09-12 07:10:07 +02:00
Renamed SymetricSorter->SymmetricSorter
This commit is contained in:
parent
63876ccb38
commit
a98f8a898a
@ -149,7 +149,7 @@ mindplot.nlayout.BalancedSorter = new Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
var yOffset = ysum + heights[i].height/2;
|
var yOffset = ysum + heights[i].height/2;
|
||||||
var xOffset = direction * (node.getSize().width + mindplot.nlayout.SymetricSorter.INTERNODE_HORIZONTAL_PADDING);
|
var xOffset = direction * (node.getSize().width + mindplot.nlayout.SymmetricSorter.INTERNODE_HORIZONTAL_PADDING);
|
||||||
|
|
||||||
$assert(!isNaN(xOffset), "xOffset can not be null");
|
$assert(!isNaN(xOffset), "xOffset can not be null");
|
||||||
$assert(!isNaN(yOffset), "yOffset can not be null");
|
$assert(!isNaN(yOffset), "yOffset can not be null");
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
mindplot.nlayout.GridSorter = new Class({
|
mindplot.nlayout.GridSorter = new Class({
|
||||||
Extends: mindplot.nlayout.SymetricSorter,
|
Extends: mindplot.nlayout.SymmetricSorter,
|
||||||
|
|
||||||
computeOffsets: function(treeSet, node) {
|
computeOffsets: function(treeSet, node) {
|
||||||
$assert(treeSet, "treeSet can no be null.");
|
$assert(treeSet, "treeSet can no be null.");
|
||||||
|
@ -28,7 +28,7 @@ mindplot.nlayout.OriginalLayout = new Class({
|
|||||||
|
|
||||||
var strategy = type === 'root' ?
|
var strategy = type === 'root' ?
|
||||||
mindplot.nlayout.OriginalLayout.BALANCED_SORTER :
|
mindplot.nlayout.OriginalLayout.BALANCED_SORTER :
|
||||||
mindplot.nlayout.OriginalLayout.SYMETRIC_SORTER;
|
mindplot.nlayout.OriginalLayout.SYMMETRIC_SORTER;
|
||||||
return new mindplot.nlayout.Node(id, size, position, strategy);
|
return new mindplot.nlayout.Node(id, size, position, strategy);
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -120,7 +120,7 @@ mindplot.nlayout.OriginalLayout = new Class({
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
mindplot.nlayout.OriginalLayout.SYMETRIC_SORTER = new mindplot.nlayout.SymetricSorter();
|
mindplot.nlayout.OriginalLayout.SYMMETRIC_SORTER = new mindplot.nlayout.SymmetricSorter();
|
||||||
mindplot.nlayout.OriginalLayout.GRID_SORTER = new mindplot.nlayout.GridSorter();
|
mindplot.nlayout.OriginalLayout.GRID_SORTER = new mindplot.nlayout.GridSorter();
|
||||||
mindplot.nlayout.OriginalLayout.BALANCED_SORTER = new mindplot.nlayout.BalancedSorter();
|
mindplot.nlayout.OriginalLayout.BALANCED_SORTER = new mindplot.nlayout.BalancedSorter();
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
mindplot.nlayout.SymetricSorter = new Class({
|
mindplot.nlayout.SymmetricSorter = new Class({
|
||||||
Extends: mindplot.nlayout.ChildrenSorterStrategy,
|
Extends: mindplot.nlayout.ChildrenSorterStrategy,
|
||||||
initialize:function() {
|
initialize:function() {
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ mindplot.nlayout.SymetricSorter = new Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_computeChildrenHeight : function(treeSet, node, heightCache) {
|
_computeChildrenHeight : function(treeSet, node, heightCache) {
|
||||||
var height = node.getSize().height + (mindplot.nlayout.SymetricSorter.INTERNODE_VERTICAL_PADDING * 2); // 2* Top and down padding;
|
var height = node.getSize().height + (mindplot.nlayout.SymmetricSorter.INTERNODE_VERTICAL_PADDING * 2); // 2* Top and down padding;
|
||||||
|
|
||||||
var result;
|
var result;
|
||||||
var children = treeSet.getChildren(node);
|
var children = treeSet.getChildren(node);
|
||||||
@ -74,7 +74,7 @@ mindplot.nlayout.SymetricSorter = new Class({
|
|||||||
// Ok, no overlap. Suggest a new order.
|
// Ok, no overlap. Suggest a new order.
|
||||||
if (result) {
|
if (result) {
|
||||||
var last = children.getLast();
|
var last = children.getLast();
|
||||||
result = [last.getOrder() + 1,{x:cpos.x,y:cpos.y - (mindplot.nlayout.SymetricSorter.INTERNODE_VERTICAL_PADDING * 4)}];
|
result = [last.getOrder() + 1,{x:cpos.x,y:cpos.y - (mindplot.nlayout.SymmetricSorter.INTERNODE_VERTICAL_PADDING * 4)}];
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -152,7 +152,7 @@ mindplot.nlayout.SymetricSorter = new Class({
|
|||||||
var direction = parent.getPosition().x > 0 ? 1 : -1;
|
var direction = parent.getPosition().x > 0 ? 1 : -1;
|
||||||
|
|
||||||
var yOffset = ysum + heights[i].height/2;
|
var yOffset = ysum + heights[i].height/2;
|
||||||
var xOffset = direction * (node.getSize().width + mindplot.nlayout.SymetricSorter.INTERNODE_HORIZONTAL_PADDING);
|
var xOffset = direction * (node.getSize().width + mindplot.nlayout.SymmetricSorter.INTERNODE_HORIZONTAL_PADDING);
|
||||||
|
|
||||||
$assert(!isNaN(xOffset), "xOffset can not be null");
|
$assert(!isNaN(xOffset), "xOffset can not be null");
|
||||||
$assert(!isNaN(yOffset), "yOffset can not be null");
|
$assert(!isNaN(yOffset), "yOffset can not be null");
|
||||||
@ -171,7 +171,7 @@ mindplot.nlayout.SymetricSorter = new Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
mindplot.nlayout.SymetricSorter.INTERNODE_VERTICAL_PADDING = 5;
|
mindplot.nlayout.SymmetricSorter.INTERNODE_VERTICAL_PADDING = 5;
|
||||||
mindplot.nlayout.SymetricSorter.INTERNODE_HORIZONTAL_PADDING = 5;
|
mindplot.nlayout.SymmetricSorter.INTERNODE_HORIZONTAL_PADDING = 5;
|
||||||
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
<script type='text/javascript' src='../../../main/javascript/nlayout/LayoutManager.js'></script>
|
<script type='text/javascript' src='../../../main/javascript/nlayout/LayoutManager.js'></script>
|
||||||
<script type='text/javascript' src='../../../main/javascript/nlayout/ChildrenSorterStrategy.js'></script>
|
<script type='text/javascript' src='../../../main/javascript/nlayout/ChildrenSorterStrategy.js'></script>
|
||||||
<script type='text/javascript' src='../../../main/javascript/nlayout/SymetricSorter.js'></script>
|
<script type='text/javascript' src='../../../main/javascript/nlayout/SymmetricSorter.js'></script>
|
||||||
<script type='text/javascript' src='../../../main/javascript/nlayout/GridSorter.js'></script>
|
<script type='text/javascript' src='../../../main/javascript/nlayout/GridSorter.js'></script>
|
||||||
<script type='text/javascript' src='../../../main/javascript/nlayout/BalancedSorter.js'></script>
|
<script type='text/javascript' src='../../../main/javascript/nlayout/BalancedSorter.js'></script>
|
||||||
<script type='text/javascript' src='../../../main/javascript/nlayout/OriginalLayout.js'></script>
|
<script type='text/javascript' src='../../../main/javascript/nlayout/OriginalLayout.js'></script>
|
||||||
|
Loading…
Reference in New Issue
Block a user