Update: As of version 3.1, desktop scaling is now built into in5 and can be found in the Advanced section of the export dialog.
It can also be easily applied to mobile devices.
![image options in v3.1](https://ajarproductions.com/blog/wp-content/uploads/2017/10/in5_3_1_ui_scaling_viewport.gif)
This can be done with some custom code by adding the following code as a .js file using the Resources section of the in5 dialog:
$(function(){
function scaleForDesktop() {
var targ = (true || $('.activePage').is(':empty')) ? $('.page') : $('.activePage');
var targW = targ.width(), winW = $(window).innerWidth(),
xScaleFactor = winW/targW, yScaleFactor = $(window).innerHeight()/targ.height(),
scaleFactor = (xScaleFactor < yScaleFactor) ? xScaleFactor : yScaleFactor;
var prefixes = ['','-ms-','-webkit-','-moz-'];
var n = prefixes.length;
var xorigin = (winW > targW) ? '50% 0 0' : '0% 0 0'
while(n--){
$('#container').css(prefixes[n]+'transform', 'scale('+scaleFactor+','+scaleFactor+')').css(prefixes[n]+'transform-origin', xorigin);
}
}
if(!touchEnabled){
scaleForDesktop();
$(window).on('load resize', function() { scaleForDesktop(); });
}
});
Some additional CSS may be required depending on the document and Page Format.
For multi-page formats (Baker Framework & Liquid State Publishing System),
change $('#container') to $('#page')
This may only be necessary if you're using the built-in back & next navigation.
For the Vertical Slider, you may want to add the following:
$('#container .anythingSlider-in5').css('padding',0);
before the while line.