Skip to content

Commit

Permalink
Remove Freeform references and rename default_layout_id to audoLayout…
Browse files Browse the repository at this point in the history
…Name
  • Loading branch information
Isaac Connor committed May 23, 2024
1 parent 8a57f91 commit 4fcc69e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions web/skins/classic/views/js/montage.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ var defaultPresetRatio = 'auto';
var averageMonitorsRatio;

function isPresetLayout(name) {
name = (name == "Auto") ? "Freeform" : name;
return ((ZM_PRESET_LAYOUT_NAMES.indexOf(name) != -1) ? true : false);
}

Expand Down Expand Up @@ -154,8 +153,8 @@ function selectLayout(new_layout_id) {
}
const monitor_wrapper = monitor_frame.closest('[gs-id="' + monitor.id + '"]');

if (nameLayout == "Freeform") {
monitor_wrapper.attr('gs-w', layoutColumns / stringToNumber(freeform_layout_id)).removeAttr('gs-x').removeAttr('gs-y').removeAttr('gs-h');
if (nameLayout == 'Auto') {
monitor_wrapper.attr('gs-w', layoutColumns / stringToNumber(autoLayoutName)).removeAttr('gs-x').removeAttr('gs-y').removeAttr('gs-h');
//monitor_wrapper.attr('gs-w', 12).removeAttr('gs-x').removeAttr('gs-y').removeAttr('gs-h');
} else {
monitor_wrapper.attr('gs-w', widthFrame).removeAttr('gs-x').removeAttr('gs-y').removeAttr('gs-h');
Expand Down
2 changes: 1 addition & 1 deletion web/skins/classic/views/js/montage.js.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
<?php
} // end foreach layout
global $AutoLayoutName;
echo 'freeform_layout_id="'.$AutoLayoutName.'";'
echo 'const autoLayoutName="'.$AutoLayoutName.'";'
?>
2 changes: 1 addition & 1 deletion web/skins/classic/views/montage.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
$layouts = ZM\MontageLayout::find(NULL, array('order'=>"lower('Name')"));
// layoutsById is used in the dropdown, so needs to be sorted
$layoutsById = array();
$AutoLayoutName = '';
$presetLayoutsNames = array( //Order matters!
'Auto',
'1 Wide',
Expand Down Expand Up @@ -198,6 +197,7 @@
$need_janus = true;
}
} # end foreach Monitor

$default_layout = '';

$monitorCount = count($monitors);
Expand Down

0 comments on commit 4fcc69e

Please sign in to comment.