Posts: 262
Threads: 59
Joined: Sep 2015
Reputation:
0
Hi,
Is it possible to apply usermode view "Center horizontally, auto-size width" to specific plans (not to all project)?
Thanks.
Posts: 8013
Threads: 43
Joined: Jun 2015
Reputation:
463
Not possible, this setting is global for all plans.
Posts: 262
Threads: 59
Joined: Sep 2015
Reputation:
0
(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?
Posts: 8013
Threads: 43
Joined: Jun 2015
Reputation:
463
Explain in more detail what do you want to achieve.
Posts: 262
Threads: 59
Joined: Sep 2015
Reputation:
0
(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)
Posts: 262
Threads: 59
Joined: Sep 2015
Reputation:
0
(19.09.2024, 11:05)admin Wrote: Explain in more detail what do you want to achieve.
Is there any way to do it?
Posts: 8013
Threads: 43
Joined: Jun 2015
Reputation:
463
Only one view mode is supported for all users.
Posts: 262
Threads: 59
Joined: Sep 2015
Reputation:
0
03.03.2025, 07:40
(This post was last modified: 04.03.2025, 06:43 by jmir.)
(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)
Posts: 262
Threads: 59
Joined: Sep 2015
Reputation:
0
(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?
Posts: 8013
Threads: 43
Joined: Jun 2015
Reputation:
463
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;
}
Posts: 10
Threads: 2
Joined: Dec 2024
Reputation:
0
05.03.2025, 10:12
(This post was last modified: 05.03.2025, 10:13 by didac.)
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
Posts: 8013
Threads: 43
Joined: Jun 2015
Reputation:
463
No, it's not possible.
Did you adjust the rules with relevant plan IDs?
Posts: 10
Threads: 2
Joined: Dec 2024
Reputation:
0
(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
Posts: 8013
Threads: 43
Joined: Jun 2015
Reputation:
463
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.
Posts: 8013
Threads: 43
Joined: Jun 2015
Reputation:
463
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)
}
}
Posts: 10
Threads: 2
Joined: Dec 2024
Reputation:
0
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
Posts: 262
Threads: 59
Joined: Sep 2015
Reputation:
0
(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...
Posts: 8013
Threads: 43
Joined: Jun 2015
Reputation:
463
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)
}
Posts: 262
Threads: 59
Joined: Sep 2015
Reputation:
0
(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....
Posts: 8013
Threads: 43
Joined: Jun 2015
Reputation:
463
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)
}
}
|