This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Usermode view
#1
Hi,
Is it possible to apply usermode view "Center horizontally, auto-size width" to specific plans (not to all project)?
Thanks.
Reply
#2
Not possible, this setting is global for all plans.
Reply
#3
(19.09.2024, 11:00)admin Wrote: Not possible, this setting is global for all plans.

And is it not possible to override using css or js in any way?
Reply
#4
Explain in more detail what do you want to achieve.
Reply
#5
(19.09.2024, 11:05)admin Wrote: Explain in more detail what do you want to achieve.

I want to use some plans as mobile visualitzation (like a menu view) and need to scroll up/down and I want to use other plans as desktop visualitzation (and need to fit them to the screen)
Reply
#6
(19.09.2024, 11:05)admin Wrote: Explain in more detail what do you want to achieve.

Is there any way to do it?
Reply
#7
Only one view mode is supported for all users.
Reply
#8
(03.03.2025, 07:38)admin Wrote: Only one view mode is supported for all users.

And is it not possible to override this mode for specific plans? (not users)
Reply
#9
(03.03.2025, 07:40)jmir Wrote:
(03.03.2025, 07:38)admin Wrote: Only one view mode is supported for all users.

And is it not possible to override this mode for specific plans? (not users)

No way to override for specific plans?
Reply
#10
Try this CSS, adjust plan IDs as needed. Some features like backgrounds won't work correctly.
Code:
.layers {
  overflow-y: auto;
}

#plan-2,
#plan-3 {
  transform: none !important;
  margin: 0 auto !important;
  position: relative !important;
  top: auto !important;
  left: auto !important;  
}
Reply
#11
Hello.
I have tried the code and it doesn't work. Is it possible to apply the Usermode View "Center plans, enable auto-sizing" on a specific plan using css or js?
Thanks
Reply
#12
No, it's not possible.

Did you adjust the rules with relevant plan IDs?
Reply
#13
(05.03.2025, 10:15)admin Wrote: No, it's not possible.

Did you adjust the rules with relevant plan IDs?

Yes, I have set the rule according to the id plan. It doesn't work
Reply
#14
You need to set view mode to "Center plans, enable auto-sizing". Plans added to the CSS rule will be shown as is using their original size without scaling. If plan height is larger than the screen height then a scrollbar will appear.
Reply
#15
Try this:

CSS:
Code:
.layers {
  overflow-y: auto;
}
.layer-centered-h {
  margin-top: 0 !important;
}

JS (change scrollIds array as needed):
Code:
var origDoShowPlan = window.doShowPlan
if (origDoShowPlan) {
  var scrollIds = [2, 3, 4]
 
  $(function() {
    scrollIds.forEach(function(id) {
      $('#plan-' + id).addClass('layer-centered-h')
    })
  })

  doShowPlan = function(plan) {
    visAutoWidth = scrollIds.indexOf(currentPlanId) >= 0
    origDoShowPlan(plan)
  }
}
Reply
#16
Changing the set view mode and using the above code works, but only with 1920x1080 screens. With smaller screens, I can't see the full width. Also, with this modification, I can't scroll if I open a widget. Now I'll try this new example.

Thanks
Reply
#17
(05.03.2025, 13:02)admin Wrote: Try this:

CSS:
Code:
.layers {
  overflow-y: auto;
}
.layer-centered-h {
  margin-top: 0 !important;
}

JS (change scrollIds array as needed):
Code:
var origDoShowPlan = window.doShowPlan
if (origDoShowPlan) {
  var scrollIds = [2, 3, 4]
 
  $(function() {
    scrollIds.forEach(function(id) {
      $('#plan-' + id).addClass('layer-centered-h')
    })
  })

  doShowPlan = function(plan) {
    visAutoWidth = scrollIds.indexOf(currentPlanId) >= 0
    origDoShowPlan(plan)
  }
}

Hi, I've done some tests and it works if don't open any widget... When I do it (inside a scrollable plan) then scrollbar appears on non-scrollable plans...
Reply
#18
Remove from CSS:
Code:
.layers {
  overflow-y: auto;
}

Modify JS:
Code:
doShowPlan = function(plan) {
  visAutoWidth = scrolIds.indexOf(currentPlanId) >= 0
  $('.layers').css('overflow-y', visAutoWidth ? 'auto' : 'hidden')
  origDoShowPlan(plan)
}
Reply
#19
(06.03.2025, 14:54)admin Wrote: Remove from CSS:
Code:
.layers {
  overflow-y: auto;
}

Modify JS:
Code:
doShowPlan = function(plan) {
  visAutoWidth = scrolIds.indexOf(currentPlanId) >= 0
  $('.layers').css('overflow-y', visAutoWidth ? 'auto' : 'hidden')
  origDoShowPlan(plan)
}

Now I does not switch between plans....
Reply
#20
You need to replace only the doShowPlan function not the whole JS code. Complete JS should look like this:
Code:
var origDoShowPlan = window.doShowPlan
if (origDoShowPlan) {
  var scrolIds = [2, 3, 4]
  
  $(function() {
    scrolIds.forEach(function(id) {
      $('#plan-' + id).addClass('layer-centered-h')
    })
  })

  doShowPlan = function(plan) {
    visAutoWidth = scrolIds.indexOf(currentPlanId) >= 0
    $('.layers').css('overflow-y', visAutoWidth ? 'auto' : 'hidden');
    origDoShowPlan(plan)
  }
}
Reply


Forum Jump: