nemo here we go
First of all, make ALL layer scales to 1
Then instead of using your zoom value (For example 0.1) , zoom the layers(Not layout) with 0.1/(YourLayerScaleYouHadBefore/100)
Here you also see that when one layer has zoomed in too far, it sets the zoom to the min/max value.
But it does that for every single layer you zoomed, since if 1 layer has zoomed to far, every other has too.
Then we come to the "what if we have zoomed in, and are coming to the end of the playable area?"
MapSize is the X variable where the layout will end (For unbounded scrolling), for this example we will set it to 1920 (Whole playable layout 1920x1080)
Here you see, if they cross the Max values, it get's put pack into the playable area.
Explanation for Action 1 (Right Side Borders):
960 is the value of your default Width for the project/2 in my case its 1920/2 = 960
LayerScale(2) is in this case a layer that normally would have the layer scale = 100 (So here you need to pick you'r layer that normally would have a layer scale = 100)
Explanation for Action 2 (Left Side Borders):
Again 960 is the value of your default Width for the project/2
Same thing with LayerScale(2)
Explanation for Action 3 (Down Side Borders):
540 is the value of your default height for the project/2 (In my case 1080/2 = 540)
Now we come to Action 4
Don't ask me why i've done it this way, but it works, and im happy with it, but i can't explain it
But you can see 440 is = 540-100. and that is the default layer scale for my layer 2.
Now to: How to set the "Resolution"
Here you see, first i define the 2 values that i want to be my new width/height resolution (ResX and ResY)
Then i set the canvas size to their Resolution.
Then i set the Layout Scale to the new Width Resolution / 1920 (My default Width Resolution)
And then in node webkit i set the height/width.
As you can see i use it together with WebStorage so the returning user doesn't always need to change the option again
I hope this is explanation enough.
Remember ALL Layer scales MUST be = 1 in your whole project.