{"is-c3-clipboard-data":true,"type":"events","items":[{"eventType":"comment","text":"Viewport"},{"eventType":"variable","name":"boundLeft","type":"number","initialValue":"0","comment":"","isStatic":false,"isConstant":false},{"eventType":"variable","name":"boundRight","type":"number","initialValue":"0","comment":"","isStatic":false,"isConstant":false},{"eventType":"variable","name":"boundTop","type":"number","initialValue":"0","comment":"","isStatic":false,"isConstant":false},{"eventType":"variable","name":"boundBottom","type":"number","initialValue":"0","comment":"","isStatic":false,"isConstant":false},{"eventType":"comment","text":"ZoomScale"},{"eventType":"variable","name":"UseWidthScale","type":"boolean","initialValue":"false","comment":"","isStatic":false,"isConstant":false},{"eventType":"variable","name":"WidthScale","type":"number","initialValue":"0","comment":"","isStatic":false,"isConstant":false},{"eventType":"variable","name":"HeightScale","type":"number","initialValue":"0","comment":"","isStatic":false,"isConstant":false},{"eventType":"variable","name":"minZoomScale","type":"number","initialValue":"0","comment":"","isStatic":false,"isConstant":false},{"eventType":"variable","name":"maxZoomScale","type":"number","initialValue":"0","comment":"","isStatic":false,"isConstant":false},{"eventType":"block","conditions":[{"id":"on-start-of-layout","objectClass":"System"}],"actions":[{"type":"comment","text":"Viewport Bound"},{"id":"set-eventvar-value","objectClass":"System","parameters":{"variable":"boundLeft","value":"(ViewportLeft(\"UI\") + ViewportMidX(\"UI\")) / LayoutScale"}},{"id":"set-eventvar-value","objectClass":"System","parameters":{"variable":"boundRight","value":"LayoutWidth - (ViewportRight(\"UI\") -ViewportMidX(\"UI\")) / LayoutScale"}},{"id":"set-eventvar-value","objectClass":"System","parameters":{"variable":"boundTop","value":"(ViewportMidY(\"UI\") - ViewportTop(\"UI\")) / LayoutScale"}},{"id":"set-eventvar-value","objectClass":"System","parameters":{"variable":"boundBottom","value":"LayoutHeight - (ViewportBottom(\"UI\") - ViewportMidY(\"UI\")) / LayoutScale"}},{"type":"comment","text":"Viewport Aspect Ratio"},{"id":"set-eventvar-value","objectClass":"System","parameters":{"variable":"WidthScale","value":"ViewportWidth(\"UI\") / LayoutWidth"}},{"id":"set-eventvar-value","objectClass":"System","parameters":{"variable":"HeightScale","value":"ViewportHeight(\"UI\") / LayoutHeight"}},{"type":"comment","text":"Zoom Scale"},{"id":"set-eventvar-value","objectClass":"System","parameters":{"variable":"minZoomScale","value":"UseWidthScale ? max(WidthScale, HeightScale) : min(WidthScale, HeightScale)"}},{"id":"set-eventvar-value","objectClass":"System","parameters":{"variable":"maxZoomScale","value":"minZoomScale * 3"}}]}]}
clamp(scrollx, boundLeft, boundRight)
clamp(scrolly, boundTop, boundBottom)
clamp(LayoutScale, minZoomScale, maxZoomScale)
And uncheck the Unbounded scrolling property