Skip to content

Commit

Permalink
Fix layout break on mobile devices
Browse files Browse the repository at this point in the history
  • Loading branch information
magicsunday committed Apr 4, 2024
1 parent 5f18128 commit 21dba96
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 20 deletions.
6 changes: 0 additions & 6 deletions resources/css/descendants-chart.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,13 @@
.webtrees-descendants-chart-container svg {
display: block;
margin: auto;
cursor: move;
/*cursor: -webkit-grab;*/
/*cursor: -moz-grab;*/
cursor: grab;
/*-webkit-filter: drop-shadow(3px 1px 3px rgba(0, 0, 0, 0.4));*/
/*filter: drop-shadow(3px 1px 3px rgba(0, 0, 0, 0.4));*/
}

.webtrees-descendants-chart-container svg:active {
cursor: grabbing;
/*cursor: -webkit-grabbing;*/
}

.webtrees-descendants-chart-container svg .person {
Expand Down Expand Up @@ -71,8 +67,6 @@
position: relative;
margin: 0;
top: 50%;
/*-webkit-transform: translateY(-50%);*/
/*-ms-transform: translateY(-50%);*/
transform: translateY(-50%);
opacity: 1;
text-align: center;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use MagicSunday\Webtrees\DescendantsChart\Configuration;
*/
?>

<fieldset class="form-group row">
<div class="row">
<label class="col-sm-3 col-form-label wt-page-options-label" for="generations">
<?= I18N::translate('Generations') ?>
</label>
Expand All @@ -31,4 +31,4 @@ use MagicSunday\Webtrees\DescendantsChart\Configuration;
])
?>
</div>
</fieldset>
</div>
8 changes: 4 additions & 4 deletions resources/views/modules/descendants-chart/form/layout.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ use MagicSunday\Webtrees\DescendantsChart\Configuration;
*/
?>

<fieldset class="form-group row">
<legend class="col-form-label col-sm-3 wt-page-options-label">
<div class="row">
<div class="col-form-label col-sm-3 wt-page-options-label">
<?= I18N::translate('Layout') ?>
</legend>
</div>
<div class="col-sm-9 wt-page-options-value">
<?=
view($moduleName . '::modules/components/checkbox', [
Expand Down Expand Up @@ -74,4 +74,4 @@ use MagicSunday\Webtrees\DescendantsChart\Configuration;
</small>
</div>
</div>
</fieldset>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ use MagicSunday\Webtrees\DescendantsChart\Configuration;
*/
?>

<fieldset class="form-group row">
<legend class="col-form-label col-sm-3 wt-page-options-label">
<div class="row">
<div class="col-form-label col-sm-3 wt-page-options-label">
<?= I18N::translate('Orientation') ?>
</legend>
</div>
<div class="col-sm-9 wt-page-options-value" id="layout">
<?=
view('components/radios-inline', [
Expand All @@ -30,4 +30,4 @@ use MagicSunday\Webtrees\DescendantsChart\Configuration;
])
?>
</div>
</fieldset>
</div>
8 changes: 4 additions & 4 deletions resources/views/modules/descendants-chart/page.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use MagicSunday\Webtrees\DescendantsChart\Configuration;
<form id="webtrees-descendants-chart-form" method="post" class="wt-page-options wt-page-options-descendants-chart d-print-none">
<?= csrf_field() ?>

<fieldset class="form-group row">
<div class="row">
<label class="col-sm-3 col-form-label wt-page-options-label" for="xref">
<?= I18N::translate('Individual') ?>
</label>
Expand All @@ -48,7 +48,7 @@ use MagicSunday\Webtrees\DescendantsChart\Configuration;
])
?>
</div>
</fieldset>
</div>

<?= view($moduleName . '::modules/descendants-chart/form/generations', ['configuration' => $configuration]) ?>
<?= view($moduleName . '::modules/descendants-chart/form/orientation', ['configuration' => $configuration]) ?>
Expand All @@ -57,7 +57,7 @@ use MagicSunday\Webtrees\DescendantsChart\Configuration;
<?= view($moduleName . '::modules/descendants-chart/form/layout', ['configuration' => $configuration, 'moduleName' => $moduleName]) ?>
</div>

<fieldset class="form-group row mt-2">
<div class="row mt-3">
<div class="col-sm-12 wt-page-options-value text-center">
<div class="btn-toolbar justify-content-between">
<div class="btn-group btn-group-sm">
Expand Down Expand Up @@ -94,7 +94,7 @@ use MagicSunday\Webtrees\DescendantsChart\Configuration;
</div>
</div>
</div>
</fieldset>
</div>
</form>

<div id="descendants-chart-url" class="row wt-ajax-load wt-page-content wt-chart wt-descendants-chart"></div>
Expand Down

0 comments on commit 21dba96

Please sign in to comment.