cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Get Client Screen Resolution

pshashipreetham
17-Peridot

Get Client Screen Resolution

Hi

Is there a way to get the client screen resolution on Load of Mashup, such that based on it, Mashup made for that particular Screen resolution can be loaded.

As we know a perfect responsive Mashup can't be made since there are less Responsive Widgets present in Thingworx, eventually end up showing the scroll bars in the Mashup.

Thanks,

Shashi Preetham
1 ACCEPTED SOLUTION

Accepted Solutions

In ThingWorx 9.0, I'm able to access screen.width and screen.height in an Expression function:

 

console.log("Width: " + screen.width);
console.log("Height: " + screen.height);

nmilleson_0-1662671615979.png

 

That may help

 

-Nick

View solution in original post

4 REPLIES 4

In ThingWorx 9.0, I'm able to access screen.width and screen.height in an Expression function:

 

console.log("Width: " + screen.width);
console.log("Height: " + screen.height);

nmilleson_0-1662671615979.png

 

That may help

 

-Nick

@nmilleson You are awesome, Thank you !

Thanks,

Shashi Preetham

Out of curiosity, how will mashup screen resolution will help in the context of a mobile device like Huawei P30 Pro which has a 1080 x 2340 resolution (close to laptop)?

 

Hi @VladimirRosu ,

So Team tried a lot to create a Responsive Mashup which gets adjusted to any resolution, but label, Buttons are not responsive and showing scroll bars, I agree that this Screen resolution will not help, as of now to do a workaround we are building based on few Resolutions of Client Displays, Meanwhile R&D Team will fix things.

Thanks,

Shashi Preetham
Top Tags