Skip to content

Commit

Permalink
Miscellaneous changes before release
Browse files Browse the repository at this point in the history
- Constraint demo is updated to show constraints in a more stylish and understandable way
- Other demo styles are updated
- Small bug on applying only cose step is fixed
- A new gif file that shows incremental constraint support is added
  • Loading branch information
hasanbalci committed Dec 25, 2020
1 parent f531682 commit 7942df1
Show file tree
Hide file tree
Showing 13 changed files with 523 additions and 384 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ var defaultOptions = {
uniformNodeDimensions: false,
// Whether to pack disconnected components - valid only if randomize: true
packComponents: true,
// Layout step - all, transformed, enforced - for debug purpose only
// Layout step - all, transformed, enforced, cose - for debug purpose only
step: "all",

/* spectral layout options */
Expand Down
14 changes: 7 additions & 7 deletions cytoscape-fcose.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ var defaults = Object.freeze({
uniformNodeDimensions: false,
// Whether to pack disconnected components - valid only if randomize: true
packComponents: true,
// Layout step - all, transformed, enforced - for debug purpose only
// Layout step - all, transformed, enforced, cose - for debug purpose only
step: "all",

/* spectral layout options */
Expand Down Expand Up @@ -860,16 +860,16 @@ var coseLayout = function coseLayout(options, spectralResult) {
CoSEConstants.ENFORCE_CONSTRAINTS = true;
CoSEConstants.APPLY_LAYOUT = false;
}
if (options.step == "cose") {
CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = false;
CoSEConstants.ENFORCE_CONSTRAINTS = false;
CoSEConstants.APPLY_LAYOUT = true;
}
if (options.step == "all") {
if (options.randomize) CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = true;else CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = false;
CoSEConstants.ENFORCE_CONSTRAINTS = true;
CoSEConstants.APPLY_LAYOUT = true;
}
if (!options.step) {
CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = false;
CoSEConstants.ENFORCE_CONSTRAINTS = false;
CoSEConstants.APPLY_LAYOUT = true;
}

if (options.randomize && !(options.fixedNodeConstraint || options.alignmentConstraint || options.relativePlacementConstraint)) {
CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = true;
Expand Down Expand Up @@ -1322,7 +1322,7 @@ var spectralLayout = function spectralLayout(options) {

/**** Apply spectral layout ****/

if (options.step == "initial" || options.step == "all") {
if (options.quality == "draft" || options.step == "all") {
allBFS(samplingType);
sample();
powerIteration();
Expand Down
32 changes: 28 additions & 4 deletions demo/demo-compound.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,41 @@
background-color: #0f0;
}

.btn-sm {
font-size: 13px
}
.btn-group-sm>.btn, .btn-sm {
font-size: 13px;
background-color: #7d8991;
border-color: #7d8991;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .open>.dropdown-toggle.btn-primary {
color: #fff;
background-color: #60717d;
border-color: #60717d; /*set the color you want here*/
}

.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active, .btn-outline-primary.active, .open>.dropdown-toggle.btn-primary {
color: #fff;
background-color: #60717d;
border-color: #60717d; /*set the color you want here*/
}

.form-control-sm {
font-size: 13px
}

.custom-select-sm {
font-size: 13px
}
}

.custom-control-label {
padding-top: 2px;
}

.custom-control-input:checked~.custom-control-label::before {
color: #fff;
border-color: #7d8991;
background-color: #7d8991;
}
</style>

<script>
Expand Down
Loading

0 comments on commit 7942df1

Please sign in to comment.