mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-27 02:04:33 +08:00
Merge pull request #5793 from G-Chubinidze/gc_SCI_8663
Clunky parts: button initialization when P/E/T view is changed [SCI-8663]
This commit is contained in:
commit
3e5de32105
1 changed files with 6 additions and 3 deletions
|
@ -249,9 +249,12 @@ var HelperModule = (function(){
|
|||
return exit;
|
||||
});
|
||||
|
||||
const RESIZE_OBSERVER = new ResizeObserver(function(entries) {
|
||||
entries.forEach((entry) => {
|
||||
if (entry.target.offsetWidth <= parseInt(entry.target.getAttribute('data-width-breakpoint'))) {
|
||||
const RESIZE_OBSERVER = new ResizeObserver(entries => {
|
||||
entries.forEach(entry => {
|
||||
const { offsetWidth } = entry.target;
|
||||
const breakpoint = parseInt(entry.target.getAttribute('data-width-breakpoint'));
|
||||
|
||||
if (offsetWidth <= breakpoint && offsetWidth !== 0) {
|
||||
entry.target.classList.add('narrow');
|
||||
} else {
|
||||
entry.target.classList.remove('narrow');
|
||||
|
|
Loading…
Reference in a new issue