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 48d2ae6 commit 2336c0c
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 31 deletions.
6 changes: 0 additions & 6 deletions resources/css/pedigree-chart.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,13 @@
.webtrees-pedigree-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-pedigree-chart-container svg:active {
cursor: grabbing;
/*cursor: -webkit-grabbing;*/
}

.webtrees-pedigree-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
16 changes: 8 additions & 8 deletions resources/views/modules/pedigree-chart/form/generations.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ use MagicSunday\Webtrees\PedigreeChart\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>
<div class="col-sm-9 wt-page-options-value">
<?=
view('components/select', [
'name' => 'generations',
'selected' => $configuration->getGenerations(),
'options' => $configuration->getGenerationsList(),
'class' => 'form-control-sm',
])
view('components/select', [
'name' => 'generations',
'selected' => $configuration->getGenerations(),
'options' => $configuration->getGenerationsList(),
'class' => 'form-control-sm',
])
?>
</div>
</fieldset>
</div>
8 changes: 4 additions & 4 deletions resources/views/modules/pedigree-chart/form/layout.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ use MagicSunday\Webtrees\PedigreeChart\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 @@ -60,4 +60,4 @@ use MagicSunday\Webtrees\PedigreeChart\Configuration;
</small>
</div>
</div>
</fieldset>
</div>
18 changes: 9 additions & 9 deletions resources/views/modules/pedigree-chart/form/orientation.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ use MagicSunday\Webtrees\PedigreeChart\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', [
'name' => 'layout',
'options' => $configuration->getLayouts(),
'selected' => $configuration->getLayout(),
])
view('components/radios-inline', [
'name' => 'layout',
'options' => $configuration->getLayouts(),
'selected' => $configuration->getLayout(),
])
?>
</div>
</fieldset>
</div>
8 changes: 4 additions & 4 deletions resources/views/modules/pedigree-chart/page.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use MagicSunday\Webtrees\PedigreeChart\Configuration;
<form id="webtrees-pedigree-chart-form" method="post" class="wt-page-options wt-page-options-pedigree-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\PedigreeChart\Configuration;
])
?>
</div>
</fieldset>
</div>

<?= view($moduleName . '::modules/pedigree-chart/form/generations', ['configuration' => $configuration]) ?>
<?= view($moduleName . '::modules/pedigree-chart/form/orientation', ['configuration' => $configuration]) ?>
Expand All @@ -57,7 +57,7 @@ use MagicSunday\Webtrees\PedigreeChart\Configuration;
<?= view($moduleName . '::modules/pedigree-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\PedigreeChart\Configuration;
</div>
</div>
</div>
</fieldset>
</div>
</form>

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

0 comments on commit 2336c0c

Please sign in to comment.